Scriptling Libraries

Scriptling-specific libraries that provide functionality not available in Python’s standard library. They use the scriptling. namespace prefix.

AI

  • AI: AI and LLM functions for OpenAI-compatible APIs
  • Agent: Agentic AI loop with automatic tool execution
  • Agent Interaction: Interactive terminal interface for AI agents
  • Memory: Long-term memory store for AI agents

MCP

Messaging

  • Telegram: Telegram Bot API client
  • Discord: Discord Bot API client
  • Slack: Slack Bot API client
  • Console: Console-based messaging client

Networking

  • Gossip: Gossip protocol cluster membership and messaging
  • Multicast: UDP multicast group messaging
  • Unicast: UDP and TCP point-to-point messaging
  • Resolve: DNS resolution for IP, SRV, and srv+http URLs
  • Websocket: WebSocket client for connecting to WebSocket servers

Provisioning

  • Provisioning: File/directory provisioning and HTTP/HTTPS fetch provisioning

Runtime

  • Runtime: Background tasks and async execution
  • HTTP: HTTP route registration and response helpers
  • JSON-RPC: JSON-RPC 2.0 server registration for stdio or HTTP
  • KV: Thread-safe key-value store
  • Sync: Named cross-environment concurrency primitives
  • Sandbox: Isolated script execution environments

Utilities

  • Console: Console input/output functions
  • Container: Container lifecycle management for Docker, Podman, and Apple Containers
  • Nomad: HashiCorp Nomad client covering CSI volumes and jobs
  • Grep: Fast file content search with regex or literal patterns
  • Find: Find files and directories by name, type, mtime, and size
  • CSV: CSV parsing and formatting (string-based, no filesystem access)
  • XML: XML parsing and formatting (dict-based, string-only)
  • Sed: In-place file content replacement with literal strings or regex patterns
  • Secrets: Resolve secrets through host-configured provider aliases
  • Wait For: Wait for resources to become available
  • Plugin: Control library for executable plugins
  • Toon: TOON (Token-Oriented Object Notation) encoding/decoding
  • Similarity: Text similarity utilities including fuzzy search and MinHash
  • Templates: Go-powered template rendering (HTML and text)
  • Markdown: Markdown to HTML conversion (GitHub Flavored Markdown)

Usage

import scriptling.ai as ai

response = ai.chat("gpt-4", "Hello!")
print(response)

Registration

These libraries require explicit registration when embedding Scriptling in Go. See Library Registration for registration code.

See Also