Features
Agent loop with Thought/Action/Observation cycle
LLM-controlled decision making
Pluggable tool interface (Python class)
Python REPL tool for executing code
Google Search tool via SerpAPI
Customizable prompt template
Date injection in prompt to avoid future-date confusion
Stop token trick to prevent hallucinated tool use
Minimal codebase for easy understanding
Simple parsing of Action and Action Input
Iterative reasoning until final answer
Tool name and description for LLM guidance
Built from scratch in under 200 lines of code
@ai_fn decorator for LLM-powered Python functions
@ai_classifier decorator for text classification
Structured data extraction via Pydantic models
Agent loops with tool calling and function calling
Built-in streaming (SSE) support
Async-first API for concurrent applications
Rate limiting and automatic retries
LLM response caching for performance
Concurrency control for workload management
CLI tool for monitoring and debugging
SQLite state store for persistence
OpenAI and Anthropic model support
Embeddings generation for semantic search
Local execution with no cloud dependency
Self-hosted deployable as a library