Skip to main content

Unified async Python API for driving coding agent CLIs — Claude Code, Codex, Gemini CLI, and more

Project description

agentabi

PyPI version GitHub release CI License: MIT

Unified interface layer for agentic coding CLIs.

One interface. Any coding agent.

What is agentabi?

agentabi provides a stable, unified interface (an "ABI") for interacting with different agentic coding CLIs. Write your integration once, swap agents with a config change.

Supported Agents

Agent Provider Status
Claude Code Anthropic Implemented
Codex OpenAI Implemented
Gemini CLI Google Implemented
OpenCode Open Source Implemented
Pi Open Source Implemented

Installation

pip install agentabi

With optional SDK integrations:

pip install agentabi[claude]   # Claude Code SDK support
pip install agentabi[codex]    # Codex SDK support
pip install agentabi[gemini]   # Gemini CLI SDK support
pip install agentabi[all]      # All optional SDKs

Note: Each agent's CLI must be installed separately (e.g., claude, codex, gemini, opencode, pi).

Quick Start

Run a task

import asyncio
from agentabi import Session

async def main():
    session = Session(agent="claude_code")
    result = await session.run(prompt="Fix the bug in auth.py")
    print(result["status"])       # "success"
    print(result["result_text"])  # agent's response

asyncio.run(main())

Stream events

async for event in session.stream(prompt="Explain this code"):
    if event["type"] == "message_delta":
        print(event["text"], end="")

Sync convenience

from agentabi import run_sync

result = run_sync(prompt="List Python files", agent="codex")

Discover available agents

from agentabi import detect_agents, get_agent_capabilities

agents = detect_agents()          # ["claude_code", "codex", ...]
caps = get_agent_capabilities("claude_code")
print(caps["supports_streaming"]) # True

Use Cases

  • Fleet Management — Unified entry point for managing multiple coding agents
  • Agent-to-Agent Calls — Translation layer for inter-agent invocation
  • Benchmarking — Run the same task across agents, compare results
  • Fallback & Routing — Automatic failover and cost-aware routing
  • Middleware Pipeline — Inject logging, metering, security scanning, audit trails
  • CI/CD Integration — Vendor-agnostic agent integration for pipelines

Ecosystem

agentabi is part of a layered stack:

agentabi  →  Agent CLI unified interface  →  like an OS ABI
llm-rosetta  →  LLM API format conversion    →  like a compiler IR
  • llm-rosetta — LLM API format conversion layer for translating between LLM provider API formats (OpenAI, Anthropic, Google)

License

MIT

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

agentabi-0.3.0.tar.gz (36.9 kB view details)

Uploaded Source

Built Distribution

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

agentabi-0.3.0-py3-none-any.whl (48.5 kB view details)

Uploaded Python 3

File details

Details for the file agentabi-0.3.0.tar.gz.

File metadata

  • Download URL: agentabi-0.3.0.tar.gz
  • Upload date:
  • Size: 36.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agentabi-0.3.0.tar.gz
Algorithm Hash digest
SHA256 1108b9fd1b05edc5b417e43eb6a074a910cb0bcaf93b5f81c0f9063d67d4b9b6
MD5 fca007c7bf98c1ff440bfb58ed89bc12
BLAKE2b-256 6fcb31cef7be85a14cd76f1e74d03b50c3a0d6c83df8c9bdedd13e75b3b0b984

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentabi-0.3.0.tar.gz:

Publisher: release.yml on Oaklight/agentabi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agentabi-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: agentabi-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 48.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agentabi-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a31c25b4f615f25d8696908245a61448874a75959f0693bf7fd76dd46f6ed626
MD5 197f7243495c5e0dffd36280869b84c6
BLAKE2b-256 2d6cd56e8fdbc2033e6d0add5149dfd7376bae5b8dc7ce83e9d07468e137a2c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentabi-0.3.0-py3-none-any.whl:

Publisher: release.yml on Oaklight/agentabi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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