Scriptling Libraries

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

AI & LLM

Library Description
scriptling.ai AI and LLM functions for OpenAI-compatible APIs
scriptling.ai.agent Agentic AI loop with automatic tool execution
scriptling.ai.agent.interact Interactive terminal interface for AI agents
scriptling.ai.memory Long-term memory store for AI agents

MCP Protocol

Library Description
scriptling.mcp MCP (Model Context Protocol) client for connecting to MCP servers
scriptling.mcp.tool Helper library for authoring MCP tools
Writing MCP Tools Guide for creating MCP tools

Messaging

Library Description
scriptling.messaging.telegram Telegram Bot API client
scriptling.messaging.discord Discord Bot API client
scriptling.messaging.slack Slack Bot API client
scriptling.messaging.console Console-based messaging client

Runtime

Library Description
scriptling.runtime Background tasks and async execution
scriptling.runtime.http HTTP route registration and response helpers
scriptling.runtime.kv Thread-safe key-value store
scriptling.runtime.sync Named cross-environment concurrency primitives
scriptling.runtime.sandbox Isolated script execution environments

Utilities

Library Description
scriptling.console Console input/output functions
scriptling.wait_for Wait for resources to become available
scriptling.websocket WebSocket client for connecting to WebSocket servers
scriptling.toon TOON (Token-Oriented Object Notation) encoding/decoding
scriptling.similarity Text similarity utilities including fuzzy search and MinHash

Usage

import scriptling.ai as ai

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