A transparent, minimal, and hackable agent framework. ~300 lines of readable code. Full control, no magic.
# Add to your Claude Code skills
git clone https://github.com/howl-anderson/agentsilexA transparent, minimal, and hackable agent framework for developers who want full control.
Read the entire codebase in one sitting. Understand exactly how your agents work. No magic, no hidden complexity.
While large agent frameworks offer extensive features, they often become black boxes that are hard to understand, customize, or debug. AgentSilex takes a different approach:
No comments yet. Be the first to share your thoughts!

Real-time streaming response demonstration - see how AgentSilex processes queries and streams results
pip install agentsilex
Or with uv:
uv add agentsilex
from agentsilex import Agent, Runner, Session, tool
# Define a simple tool
@tool
def get_weather(city: str) -> str:
"""Get weather information for a city."""
# In production, this would call a real weather API
return "SUNNY"
# Create an agent with the weather tool
agent = Agent(
name="Weather Assistant",
model="gemini/gemini-2.0-flash", # Switch models: openai/gpt-4, anthropic/claude-3-5-sonnet, deepseek/deepseek-chat, et al.
instructions="Help users find weather information using the available tools.",
tools=[get_weather]
)
# Create a session to track conversation history
session = Session()
# Run the agent with a user query
runner = Runner(session)
result = runner.run(agent, "What's the weather in Monte Cristo?")
print(result.final_output)
# Output: "The weather in Monte Cristo is SUNNY."
That's it! In just 20 lines, you have a working agent that:
AgentSilex supports intelligent agent handoffs, allowing a main agent to route requests to specialized sub-agents:
from agentsilex import Agent, Runner, Session, tool
# Specialized weather agent with tools
@tool
def get_weather(city: str) -> str:
"""Get weather information for a city."""
return "SUNNY"
weather_agent = Agent(
name="Weather Agent",
model="openai/gpt-4o-mini",
instructions="Help users find weather information using tools",
tools=[get_weather],
)
# Specialized FAQ agent
faq_agent = Agent(
name="FAQ Agent",
model="openai/gpt-4o-mini",
instructions="Answer frequently asked questions about our products",
)
# Main orchestrator agent
main_agent = Agent(
name="Main Agent",
model="openai/gpt-4o-mini",
instructions="Route user questions to the appropriate specialist agent",
handoffs=[weather_agent, faq_agent],
)
# Execute multi-agent workflow
session = Session()
result = Runner(session).run(main_agent, "What's the weather in Paris?")
print(result.final_output)
AgentSilex includes built-in OpenTelemetry tracing to visualize agent execution, tool calls, and handoffs.
# Install and start Phoenix
pip install arize-phoenix
python -m phoenix.server.main serve
# Set the endpoint
export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4317"
# Run your agent - view traces at http://localhost:6006
Phoenix will show a complete trace tree of your agent workflow, including all tool calls and agent handoffs.
@tool decorator to define callable functions with automatic schema extractionagent.as_tool()Agent, Runner, Session, and @tool abstractions