https://github.com/ashenfad/agex
Library-friendly Agents
https://github.com/ashenfad/agex
agentic-framework ai code-execution llm multi-agent python sandbox
Last synced: about 2 months ago
JSON representation
Library-friendly Agents
- Host: GitHub
- URL: https://github.com/ashenfad/agex
- Owner: ashenfad
- License: mit
- Created: 2025-06-20T17:02:09.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-08-23T03:32:05.000Z (6 months ago)
- Last Synced: 2025-08-23T03:35:41.640Z (6 months ago)
- Topics: agentic-framework, ai, code-execution, llm, multi-agent, python, sandbox
- Language: Python
- Homepage:
- Size: 27.9 MB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Roadmap: docs/roadmap/faded_memory.md
Awesome Lists containing this project
README
# agex: Library-Friendly Agents
**`agex`** (a portmanteau of **age**nt **ex**ecution) 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](https://modal.com/).

**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](https://ashenfad.github.io/agex/examples/agex101/)** or see **[geospatial routing with OSMnx](https://ashenfad.github.io/agex/examples/routing/)** for advanced multi-library integration.
For a full demo app where agex integrates with NiceGUI, see [`agex-ui`](https://github.com/ashenfad/agex-ui).
## Documentation
Complete documentation is hosted at **[ashenfad.github.io/agex](https://ashenfad.github.io/agex/)**.
Key sections:
- **[📚 Quick Start Guide](https://ashenfad.github.io/agex/quick-start/)**
- **[🔭 The Big Picture](https://ashenfad.github.io/agex/concepts/big-picture/)**
- **[💡 Examples](https://ashenfad.github.io/agex/examples/overview/)**
- **[📖 API Reference](https://ashenfad.github.io/agex/api/overview/)**
## Installation
Install agex with your preferred LLM provider:
```bash
# 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
> **⚠️** `agex` is 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`](https://github.com/huggingface/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](CONTRIBUTING.md) for details on our development workflow, code style, and how to submit pull requests. For bug reports and feature requests, please use [GitHub Issues](https://github.com/ashenfad/agex/issues).