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.
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.
What Makes This Different
agex uses a subset of Python as the agent action space, executing actions in a sandboxed environment within your process. This approach avoids the complexity of JSON serialization and allows complex objects to flow directly between your code and the agent. You control exactly what functions, classes, and modules are available, creating a powerful yet secure environment.
- Code-as-Action: Secure, sandboxed Python execution for agents.
- Library Integration: Use your existing code directly, no tool-making required.
- Workspace Persistence: Git-like versioning for agent state and memory.
- Multi-Agent: Orchestrate agents with natural Python control flow.
- Event Streams: Real-time, notebook-friendly observability.
- Benchmarking: A framework for data-driven agent evaluation.
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
⚠️ Pre-Release
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.1.0.tar.gz.
File metadata
- Download URL: agex-0.1.0.tar.gz
- Upload date:
- Size: 121.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a67a60c11439bd55a93ecc52663529abb7ff0b55dc1b6935643580022e406e3
|
|
| MD5 |
3897ffeaf58337640d832e065cd08365
|
|
| BLAKE2b-256 |
cc770d635ff9abda4d3d52b1830beee84a904c20b6a0e99d2a7649fcf1ecf54b
|
File details
Details for the file agex-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agex-0.1.0-py3-none-any.whl
- Upload date:
- Size: 148.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e95eb76dcff8b870c570c02c25522ab029e2883047023643698170f8b946282c
|
|
| MD5 |
9c1565c9811c85f6193efcb7ef707264
|
|
| BLAKE2b-256 |
5bfb31449f3eac050ca0911aedf2390b59933f737d5e3b288fd71f6f363f13e7
|