Skip to main content

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.

In agex, agents are just Python functions:

  • Defined by Signature: Input/output types are enforced by standard type hints.
  • Powered by Code: Agents write and execute Python in a secure sandbox to fulfill that signature.
  • Curated Scope: You whitelist exactly which modules and classes are available.
  • Stateful Memory: The entire workspace is versioned, enabling time-travel debugging and serverless-style background execution.
  • Unified Observability: Complete visibility into agent thought and action with real-time event & token streaming.
  • Multi-Agent Orchestration: Coordinate hierarchical or peer agents with natural Python control flow.
  • Integrated Benchmarking: A built-in framework for data-driven agent evaluation.

agex demo gif

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

⚠️ 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 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agex-0.7.0.tar.gz (157.8 kB view details)

Uploaded Source

Built Distribution

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

agex-0.7.0-py3-none-any.whl (192.6 kB view details)

Uploaded Python 3

File details

Details for the file agex-0.7.0.tar.gz.

File metadata

  • Download URL: agex-0.7.0.tar.gz
  • Upload date:
  • Size: 157.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for agex-0.7.0.tar.gz
Algorithm Hash digest
SHA256 9c109cb49eeb3c51d42ea5798175e7966e715389f60d4f751f2e103c5be58d0d
MD5 952b91993139befc86d66eee793a2da4
BLAKE2b-256 56170874c1819ce7341ddf456365ae66136dcea99ec79df531fc5e2bc1e59956

See more details on using hashes here.

File details

Details for the file agex-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: agex-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 192.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for agex-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1e3035bda2f47171487c5e67299377f1efe11b7f96ac524470110ffa1a788989
MD5 b5927cc7c3e0832b7b5118a545b1b205
BLAKE2b-256 73eb8c5746f46ccec891bfa0b8a637bfc6fb482c37db9d97d7470a05f6d5d030

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