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.

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.

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 safe and focused environment for the agent.

  • 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

⚠️ 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.1.4.tar.gz (122.5 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.1.4-py3-none-any.whl (149.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agex-0.1.4.tar.gz
  • Upload date:
  • Size: 122.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for agex-0.1.4.tar.gz
Algorithm Hash digest
SHA256 15b4902a791f7b84b5075d5026aab8eb85dd923d300ed2007fe51ec6225313df
MD5 6517858d03c93cc4f6e151e4ca5a6ae9
BLAKE2b-256 12ad830ad35ca038eb651044551edebf43e83865a39698a4fd53914fce812a6c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: agex-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 149.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for agex-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2148ef228127aa8f604ae8b1680e0dff82a33d2d05c5511cf478bb28b96bb9d4
MD5 d535cb0acfcf3e096fe26a2dd8964775
BLAKE2b-256 027a5a52a59b21db88be6899beb25d5f259a38c775322a4306e4f18e9f6a65af

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