Library-friendly agents that work directly with your existing Python codebase.
Project description
agex: Library-Friendly Agents
agex (a portmanteau of agent execution) is a Python-native agentic framework that enables AI agents to work directly with your existing libraries and codebase.
Core Concepts
agex executes sandboxed Python directly in your process, bypassing JSON serialization to let complex objects flow freely. You define a safe, focused environment by whitelisting exactly which capabilities are available.
Key features:
- Type-Safe Execution: Agents fulfill typed signatures by executing sandboxed Python.
- Curated Scope: Whitelist exactly which modules and classes are available.
- Stateful Memory: Versioned workspace enables time-travel debugging.
- Multi-Agent Orchestration: Coordinate agents with natural Python control flow.
- Flexible Hosting: Run locally (default), on HTTP servers, or serverless via Modal with GPU and auto-scaling.
This works because agex agents can accept and return complex types like pandas.DataFrame and plotly.Figure objects without intermediate JSON serialization. For a deeper dive, check out the full agex101.ipynb tutorial or see geospatial routing with OSMnx for advanced multi-library integration.
For a full demo app where agex integrates with NiceGUI, see agex-ui.
Documentation
Complete documentation is hosted at ashenfad.github.io/agex.
Key sections:
Installation
Install agex with your preferred LLM provider:
# Install with a specific provider
pip install "agex[openai]" # For OpenAI models
pip install "agex[anthropic]" # For Anthropic Claude models
pip install "agex[gemini]" # For Google Gemini models
# Or install with all providers
pip install "agex[all-providers]"
Project Status
⚠️
agexis a new framework in active development. While the core concepts are stabilizing, the API should be considered experimental and is subject to change.
For teams looking for a more battle-tested library built on the same "agents-that-think-in-code" philosophy, we highly recommend Hugging Face's excellent smolagents project. agex explores a different architectural path, focusing on deep runtime interoperability and a secure, sandboxed environment for direct integration with existing Python libraries.
Contributing
We welcome contributions! See our Contributing Guide for details on our development workflow, code style, and how to submit pull requests. For bug reports and feature requests, please use GitHub Issues.
Project details
Release history Release notifications | RSS feed
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 agex-0.8.1.tar.gz.
File metadata
- Download URL: agex-0.8.1.tar.gz
- Upload date:
- Size: 189.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea6025d9487557915715cc2b0f2c102ce851d2d981e523e88ca24179edeaa37d
|
|
| MD5 |
3134b11649bd31a7e34e575e128faf11
|
|
| BLAKE2b-256 |
b90d7c909be0c668192cb73cb3082f7f74e6ab05f33b1317c32bc1d45221f66c
|
File details
Details for the file agex-0.8.1-py3-none-any.whl.
File metadata
- Download URL: agex-0.8.1-py3-none-any.whl
- Upload date:
- Size: 235.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70fd0572f8491e6f2e2169683a17376964bb93a2f375575bcec920b7cd7f85a6
|
|
| MD5 |
5cd0e69aa4510b10d0066780ec8e29a0
|
|
| BLAKE2b-256 |
1b1ca089458441ced0a9c43111b182a4b269cf993dfc3542291bcc4d382e6327
|