multi-turn agentic loop with tool-calling orchestration
Implements a 5-iteration maximum agentic loop via AgentRuntime.processMessage() that accepts user messages, routes them through an LLM provider (15+ supported via @mariozechner/pi-ai), parses tool-call responses, executes registered tools with argument validation, and returns final responses. Uses a schema-based function registry where each tool declares input/output types and scopes, enabling the LLM to autonomously decide which of 125+ built-in tools to invoke based on user intent and conversation context.
Unique: Combines observation masking (hiding sensitive tool outputs from LLM context) with Reciprocal Rank Fusion-based memory retrieval, allowing the agent to reason over historical context without exposing raw blockchain data or private keys to the LLM
vs alternatives: Unlike LangChain or LlamaIndex agents that require explicit chain definitions, Teleton's agentic loop is implicit in the message processing pipeline and natively integrated with Telegram MTProto, eliminating middleware overhead
hybrid rag memory with sqlite-vec and fts5 fusion
Implements a dual-index memory system using SQLite with sqlite-vec extension for semantic similarity search (cosine distance on embeddings) and FTS5 for full-text BM25 ranking, fused via Reciprocal Rank Fusion (RRF). Automatically compacts old messages via CompactionManager, which summarizes conversation segments using the LLM and replaces them with condensed entries, maintaining a bounded context window while preserving semantic information. Supports configurable embedding providers (OpenAI, Ollama, local) and stores all data locally in a single SQLite file.
Unique: Combines semantic search (sqlite-vec) with BM25 full-text search (FTS5) and fuses results via RRF, then applies AI-driven auto-compaction that summarizes old context rather than discarding it, preserving semantic information across long conversations
vs alternatives: Pinecone or Weaviate require cloud infrastructure and API calls; Teleton's local sqlite-vec approach eliminates network latency and keeps all memory on-device, while RRF fusion outperforms single-index retrieval for mixed semantic/keyword queries
session management with automatic reconnection and state recovery
Manages Telegram session persistence via session.json (encrypted) or phone number + 2FA, with automatic reconnection on network failures. Implements exponential backoff for reconnection attempts and state recovery to resume message processing after interruptions. The SessionStore class handles session serialization and encryption, and the TelegramBridge manages connection lifecycle and event routing.
Unique: Implements encrypted session persistence with automatic reconnection and exponential backoff, enabling the agent to survive network interruptions and crashes without manual re-authentication
vs alternatives: GramJS provides basic session management; Teleton's wrapper adds automatic reconnection, state recovery, and encrypted storage, improving reliability for production deployments
multi-provider llm abstraction with 15+ model support
Abstracts LLM provider differences via @mariozechner/pi-ai, supporting 15+ providers (OpenAI, Anthropic, Ollama, Groq, Together, Mistral, etc.) and 70+ models. The LLM provider is configured in config.yaml and can be switched at runtime without code changes. Implements provider-agnostic message formatting, token counting, and error handling. Supports streaming responses and function calling across all providers with normalized schemas.
Unique: Leverages @mariozechner/pi-ai to provide a unified interface across 15+ LLM providers and 70+ models, enabling provider switching via config.yaml without code changes and supporting both proprietary and open-source models
vs alternatives: LangChain's LLM abstraction is less complete; Teleton's pi-ai integration provides broader provider coverage and simpler configuration-based switching
journal system for transaction and operation auditing
Maintains an immutable audit log (Journal) of all significant operations: tool executions, blockchain transactions, message sends, and configuration changes. Each journal entry includes timestamp, user, operation type, parameters, and result. The journal is stored in SQLite and queryable via workspace tools. Supports filtering by operation type, user, or date range. Integrates with access control to ensure users can only view their own operations (unless admin).
Unique: Provides an immutable audit log integrated with access control, enabling compliance-grade operation tracking without requiring external logging infrastructure
vs alternatives: Most agent frameworks lack built-in audit logging; Teleton's journal system provides out-of-the-box compliance support
dex integration with ston.fi and dedust swap execution
Integrates with STON.fi and DeDust decentralized exchanges to enable the agent to execute token swaps autonomously. Implements price quote fetching, slippage calculation, and transaction building for both DEXes. Supports jetton-to-jetton swaps and includes built-in tools for querying liquidity pools and swap rates. All swaps are executed via the TON wallet with transaction signing and blockchain confirmation.
Unique: Provides native STON.fi and DeDust integration with quote fetching and transaction building, enabling autonomous DEX swaps without external APIs or middleware
vs alternatives: Web3.py or ethers.js require manual DEX interaction; Teleton's built-in DEX tools abstract away quote fetching and transaction building
nft and dns operations on ton
Supports NFT operations (querying collections, checking ownership, transferring NFTs) and TON DNS operations (resolving DNS names to addresses, registering domains, managing DNS records). Implements tools for NFT metadata retrieval, transfer execution, and DNS name resolution. All operations are executed via the TON blockchain with transaction signing.
Unique: Provides native TON NFT and DNS tools integrated with the wallet system, enabling autonomous NFT management and DNS operations without external APIs
vs alternatives: Most blockchain agents lack TON-specific NFT/DNS support; Teleton's built-in tools provide native TON ecosystem integration
deals system for multi-step transaction workflows
Implements a Deals system that enables the agent to coordinate multi-step workflows involving multiple parties or transactions. A deal is a structured agreement with defined steps, participants, and conditions. The agent can propose deals, track their status, and execute steps as conditions are met. Deals are stored in the workspace and can be queried or modified via tools.
Unique: Provides a structured deals system for coordinating multi-step workflows with participant tracking and condition-based execution, enabling complex transaction orchestration
vs alternatives: Most agent frameworks lack built-in workflow coordination; Teleton's deals system provides out-of-the-box support for multi-step transactions
+8 more capabilities