A transparent, minimal, and hackable agent framework
Project description
AgentSilex
A transparent, minimal, and hackable agent framework for developers who want full control.
Why AgentSilex?
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:
- Transparent: Every line of code is readable and understandable. No magic, no hidden complexity.
- Minimal: Core implementation in ~300 lines. You can read the entire codebase in one sitting.
- Hackable: Designed for modification. Fork it, customize it, make it yours.
- Universal LLM Support: Built on LiteLLM, seamlessly switch between 100+ models - OpenAI, Anthropic, Google Gemini, DeepSeek, Azure, Mistral, local LLMs, and more. Change providers with one line of code.
- Educational: Perfect for learning how agents actually work under the hood.
Who is this for?
- Companies who need a customizable foundation for their agent systems
- Developers who want to understand agent internals, not just use them
- Educators teaching AI agent concepts
- Researchers prototyping new agent architectures
Installation
pip install agentsilex
Or with uv:
uv add agentsilex
Quick Start
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(agent, session)
result = runner.run("What's the weather in Monte Cristo?")
# Output the result
print("Final output:", result.final_output)
# Access the conversation history
for message in session.get_dialogs():
print(message)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentsilex-0.1.tar.gz.
File metadata
- Download URL: agentsilex-0.1.tar.gz
- Upload date:
- Size: 176.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
454d7dfcac777a15ad39f2df995fa118cd70c64dd6f921ac597db20aea6239c7
|
|
| MD5 |
4bed8a45da3c8faa597413617c4ab0de
|
|
| BLAKE2b-256 |
95a19fae45498b42ac7c030413494b0c3b12c9517a4863df84fb9e41cc966daf
|
File details
Details for the file agentsilex-0.1-py3-none-any.whl.
File metadata
- Download URL: agentsilex-0.1-py3-none-any.whl
- Upload date:
- Size: 15.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75720708f510b8af2e8410186126eb6dbe2ae43159d6dd31d1d395507bef74a8
|
|
| MD5 |
e5ca6f27ca5c6fcbc51932dc749b4eef
|
|
| BLAKE2b-256 |
fe78ea3e886216ef20f6c40d8a6cbd37d44636b5859470fb52684b7f992c54d0
|