One typed runtime API for Claude, Codex, and Antigravity agent SDKs.
Project description
agent-runtime-kit
agent-runtime-kit is a small Python runtime layer for agent SDKs. It gives
applications one typed async API for dispatching an agentic task through Claude
Agent SDK, OpenAI Codex SDK, or Google Antigravity SDK while keeping provider
capabilities visible.
Tags: agent-sdk agent-runtime coding-agents claude-code
openai-codex google-antigravity mcp typed-python async-python
developer-tools
About
agent-runtime-kit is for Python developers who want to run coding-agent tasks
through vendor runtimes without rewriting their application around each SDK. It
normalizes the runtime boundary: task inputs, capability checks, event streams,
tool audits, package/readiness diagnostics, and typed results.
The library keeps vendor differences visible. Claude, Codex, and Antigravity
still expose different capabilities, permission models, setup requirements, and
unsupported fields. agent-runtime-kit gives those differences a consistent
shape instead of hiding them behind a lowest-common-denominator wrapper.
The package is intentionally not a router, benchmark harness, queue, hosted service, or full agent framework. It is the reusable layer underneath those systems: task models, runtime capabilities, event sinks, package/readiness diagnostics, and adapters.
Install
If you want all first-party runtimes available, install the all extra:
pip install "agent-runtime-kit[all]"
Install the vendor-SDK-free core when you only need the public models, fake runtime, registry, diagnostics types, or you plan to add provider SDKs later:
pip install agent-runtime-kit
Install a single provider extra when your application only dispatches through one vendor runtime:
pip install "agent-runtime-kit[claude]"
pip install "agent-runtime-kit[codex]"
pip install "agent-runtime-kit[antigravity]"
Provider extras are a packaging boundary, not a separate API. They keep the core importable without vendor SDKs, avoid forcing every user to install every CLI binary or compiled runtime wheel, and contain dependency drift when one fast-moving vendor SDK changes independently of the others. Missing adapters raise typed setup errors that point to the matching extra.
import asyncio
from agent_runtime_kit import AgentTask, FakeAgentRuntime
async def main() -> None:
runtime = FakeAgentRuntime(output="done")
result = await runtime.run(AgentTask(goal="Summarize this repository"))
print(result.output)
asyncio.run(main())
The core package has no Claude, Codex, or Antigravity dependency. Vendor SDKs are added through optional extras.
Real Providers
AgentKit is the keyword-native hub: it registers the built-in runtimes,
caches them per kind, and turns Python types into structured output.
import asyncio
from dataclasses import dataclass
from agent_runtime_kit import AgentKit, ReadinessStatus
@dataclass
class RepoSummary:
name: str
languages: list[str]
async def main() -> None:
async with AgentKit() as kit:
readiness = await kit.readiness_for("claude")
if readiness.status is ReadinessStatus.NOT_READY:
raise RuntimeError(readiness.message)
result = await kit.run(
"claude",
goal="Summarize this repository",
permissions="strict",
output_type=RepoSummary,
)
print(result.parsed.languages if result.parsed else result.error)
asyncio.run(main())
Adapters also work standalone when you need vendor-specific configuration:
import asyncio
from agent_runtime_kit import AgentTask, ReadinessStatus, check_readiness
from agent_runtime_kit.adapters import ClaudeAgentRuntime
async def main() -> None:
runtime = ClaudeAgentRuntime(default_model="claude-sonnet-4-6")
readiness = await check_readiness(runtime)
if readiness.status is ReadinessStatus.NOT_READY:
raise RuntimeError(readiness.message)
result = await runtime.run(AgentTask(goal="Summarize this repository"))
print(result.output)
asyncio.run(main())
Runtime Fields
AgentTask supports goal, system prompt, model, reasoning effort, working
directory, permission profile, MCP stdio servers, session/resume handles, output
schema, budget, metadata, and an async event sink. (model and
reasoning_effort are first-class fields; the legacy metadata["model"] /
metadata["reasoning_effort"] aliases still work.) Where a runtime cannot honor
a field (for example only Claude maps budget_usd; Codex and Antigravity reject
it with a typed UnsupportedTaskInputError) the adapter raises rather than
silently dropping it.
Model selection follows one explicit precedence chain: AgentTask.model, then
legacy metadata["model"], then an adapter's default_model= constructor
override, then the provider's native configuration/default. Adapters omit the
vendor model option at the final step rather than pinning a library-owned model.
Results record metadata["model_source"]; metadata["model"] appears only when
the kit knows the selected value.
Call validate_task(runtime, task) (or kit.validate_task("codex", task)) to
inspect every statically detectable incompatibility before dispatch. The
returned TaskSupportReport is side-effect-free and lists source fields such as
budget_usd and permissions.network; run() still fails closed on the first
issue. Third-party runtimes can opt into provider-specific checks with the
TaskSupportProvider protocol, while older AgentRuntime implementations
continue to work through capability-based fallback checks.
availability() is deliberately synchronous, side-effect-free, and package-only.
Use await check_readiness(runtime) (or kit.readiness_for(...)) for an explicit,
bounded credential/setup probe. READY_TO_ATTEMPT means setup was positively
detected, not that a future provider call is guaranteed to succeed;
INDETERMINATE lets callers decide whether to attempt provider-chain or local
login authentication. Probe failures and timeouts never include credential values.
AgentResult returns output, finish reason (see FinishReason), locally
validated structured output, usage, cost, session id, tool-call audits, and
provider metadata. is_success is true only for a natural, error-free
completion. Unknown usage and cost fields are None; reported zero remains
distinct. parsed_output_available distinguishes an absent payload from valid
JSON null (both use parsed_output=None). artifacts is a reserved field: no
built-in runtime populates it yet, so it is always an empty tuple today.
Docs
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agent_runtime_kit-0.5.0.tar.gz.
File metadata
- Download URL: agent_runtime_kit-0.5.0.tar.gz
- Upload date:
- Size: 177.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af820fcb4a6322d83d9dbbe1e697e66617aab5df3620d1b51467028de65a009e
|
|
| MD5 |
5c9861d86fadd9ded90ade5f9a8445a0
|
|
| BLAKE2b-256 |
8f1a043a9f1a99cb76427eef26994db176f1a9a06798e1c0e6ed2c6aec1baa1d
|
Provenance
The following attestation bundles were made for agent_runtime_kit-0.5.0.tar.gz:
Publisher:
publish-pypi.yml on ebarti/agent-runtime-kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agent_runtime_kit-0.5.0.tar.gz -
Subject digest:
af820fcb4a6322d83d9dbbe1e697e66617aab5df3620d1b51467028de65a009e - Sigstore transparency entry: 2146381844
- Sigstore integration time:
-
Permalink:
ebarti/agent-runtime-kit@2e7e4c3f14d4d9eebfa024279be3a9f0c65d1f52 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/ebarti
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@2e7e4c3f14d4d9eebfa024279be3a9f0c65d1f52 -
Trigger Event:
release
-
Statement type:
File details
Details for the file agent_runtime_kit-0.5.0-py3-none-any.whl.
File metadata
- Download URL: agent_runtime_kit-0.5.0-py3-none-any.whl
- Upload date:
- Size: 77.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
caf8576ca6f7e7ecc47cd7f5fbcfa9376a766b413152a426013dbb889d202b3c
|
|
| MD5 |
11d7809a5b2c2ba0e281d0336bb8455d
|
|
| BLAKE2b-256 |
58137c72ddeaa4bedba5703af866967523e2da5b8402e860640aa64e5798807e
|
Provenance
The following attestation bundles were made for agent_runtime_kit-0.5.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on ebarti/agent-runtime-kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agent_runtime_kit-0.5.0-py3-none-any.whl -
Subject digest:
caf8576ca6f7e7ecc47cd7f5fbcfa9376a766b413152a426013dbb889d202b3c - Sigstore transparency entry: 2146381888
- Sigstore integration time:
-
Permalink:
ebarti/agent-runtime-kit@2e7e4c3f14d4d9eebfa024279be3a9f0c65d1f52 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/ebarti
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@2e7e4c3f14d4d9eebfa024279be3a9f0c65d1f52 -
Trigger Event:
release
-
Statement type: