AgentSilex
A transparent, minimal, and hackable Python agent framework built on LiteLLM, offering ~300 lines of readable code with full control over agent behavior and no hidden complexity.
At a Glance
Free and open-source under the MIT License. Use, modify, and distribute freely.
Engagement
Available On
Alternatives
Listed May 2026
About AgentSilex
AgentSilex is an open-source Python agent framework created by howl-anderson, designed for developers who want complete visibility into how their AI agents work. Built on top of LiteLLM, it provides a minimal core (~300 lines) that supports 100+ LLM providers while keeping the entire codebase readable in a single sitting. The project is licensed under MIT and hosted on GitHub.
What It Is
AgentSilex is a lightweight agent framework that prioritizes transparency and hackability over feature breadth. Unlike larger frameworks that abstract away implementation details, AgentSilex exposes every layer of its architecture so developers can understand, modify, and extend agent behavior without fighting a black box. It targets developers, educators, researchers, and companies that need a customizable foundation for agent systems.
Core Architecture
The framework is built around four primary abstractions:
- Agent — defines an agent with a name, model, instructions, and tools
- Runner — executes an agent against a user query
- Session — tracks conversation history across multiple turns
- @tool decorator — wraps Python functions as callable tools with automatic schema extraction from type hints
The entire core implementation sits at approximately 300 lines of Python, making it feasible to audit the full codebase before deploying it in production.
LLM Support and Model Switching
AgentSilex delegates model communication to LiteLLM, which provides access to over 100 LLM providers including OpenAI, Anthropic, Google Gemini, DeepSeek, Azure, Mistral, and local LLMs. Switching providers requires changing a single string in the model parameter — no other code changes are needed.
Multi-Agent and Tool Capabilities
The framework supports multi-agent workflows through an intelligent handoff system. A main orchestrator agent can route requests to specialized sub-agents based on query type. Agents can also be converted into tools for other agents using agent.as_tool(), enabling composable pipelines. Additional capabilities include:
- Structured output via Pydantic models for type-safe responses
- Context management for sharing mutable state across tools and turns
- Streaming support with an event-based architecture for real-time responses
- Callback-based agent memory management
- MCP (Model Context Protocol) client support for connecting to external tool servers
- Pluggable callback system for custom behaviors such as ReAct or Chain-of-Thought
- Built-in agent evaluation framework with tool trajectory, response matching, and LLM-as-judge metrics
Observability
AgentSilex includes built-in OpenTelemetry tracing that integrates with Phoenix (Arize) and other OTLP-compatible backends. Traces visualize the full execution tree including tool calls and agent handoffs, making it easier to debug complex multi-agent workflows.
Current Status
The repository was created in May 2025 and shows active development, with the last push recorded in January 2026. The project has accumulated 450 stars and 44 forks on GitHub. The roadmap lists several planned features not yet implemented, including guardrails, async support, parallel tool execution, state persistence, and human-in-the-loop approval flows.
Community Discussions
Be the first to start a conversation about AgentSilex
Share your experience with AgentSilex, ask questions, or help others learn from your insights.
Pricing
Open Source
Free and open-source under the MIT License. Use, modify, and distribute freely.
- Full source code access
- MIT License
- All framework features included
- Community support via GitHub
Capabilities
Key Features
- Single agent execution
- Multi-agent handoff routing
- Tool calling with @tool decorator
- Automatic parameter schema extraction from Python type hints
- Session-based conversation history
- Universal LLM support via LiteLLM (100+ models)
- Structured output with Pydantic models
- Streaming support with event-based architecture
- OpenTelemetry observability with Phoenix integration
- MCP client support
- Agent memory via callback system
- Agents as tools (agent.as_tool())
- Context management across tools and turns
- Agent evaluation framework (tool trajectory, response matching, LLM-as-judge)
- Pluggable callback system for custom behaviors (ReAct, Chain-of-Thought)
