Skip to main content

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

agentsilex-0.2.tar.gz (177.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentsilex-0.2-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file agentsilex-0.2.tar.gz.

File metadata

  • Download URL: agentsilex-0.2.tar.gz
  • Upload date:
  • Size: 177.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for agentsilex-0.2.tar.gz
Algorithm Hash digest
SHA256 73ccb82c4a970071802ac0425cb1bf171182222b9959ae7c35eb64d1d404d909
MD5 d3a838ea736ae03548cd5f91a451c6e5
BLAKE2b-256 bd1b47ad94401c13ed6fc1d5f2881e83e4a0e85c5bc9025b35b985cdccab5926

See more details on using hashes here.

File details

Details for the file agentsilex-0.2-py3-none-any.whl.

File metadata

  • Download URL: agentsilex-0.2-py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for agentsilex-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e49967d7361e2f3eb92708fb8565233747864066e491da63ce43695e0bee115a
MD5 3f3af26f6bd8c1a3a59a658dc9a4f6ed
BLAKE2b-256 c39293c8371f1f7b97211b750d6c0b86892a6e23cd2181bd363cb91fae034c3f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page