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

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).

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.2.2.tar.gz (35.2 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.2.2-py3-none-any.whl (45.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for agentabi-0.2.2.tar.gz
Algorithm Hash digest
SHA256 cc8acf9a7fb8d0c50b552e6b1965d3ab33a1fb5112ac2a40846386c202d3869f
MD5 3b63b172375bd887502b8dda40c88c27
BLAKE2b-256 6abbc94fc8f2c5e44fc3d5c5a5f62f4e00f3ab77545c8f30eaf3c7a394919bbb

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentabi-0.2.2.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.2.2-py3-none-any.whl.

File metadata

  • Download URL: agentabi-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 45.2 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.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5c627c95285b3703ef7a86e3cb58809fff11fac68cc0c39f19160c134a41e32e
MD5 9053b95837aa3b22bb63664dfb46c266
BLAKE2b-256 d9d94a507243813ef35d478d7032f25ae594c049272a98145141754cf6baf933

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentabi-0.2.2-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