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

  • MCP Client — MCP (Model Context Protocol) client for connecting to MCP servers
  • MCP Tools — Helper library for authoring MCP tools
  • Writing MCP Tools — Guide for creating MCP tools

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

Runtime

  • Runtime — Background tasks and async execution
  • HTTP — HTTP route registration and response helpers
  • 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
  • Grep — Fast file content search with regex or literal patterns
  • 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)

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