Skip to main content

Single-agent runtime SDK for A2A agents backed by MCP tools.

Project description

agent-runtime-sdk

Single-agent runtime SDK for exposing MCP tools as an A2A-compatible agent service.

Install

pip install agent-runtime-sdk

Install optional Langfuse/smolagents observability support:

pip install "agent-runtime-sdk[observability]"

Basic Usage

Create an agent project:

my-agent/
├── agent_app/
│   ├── agent.yaml
│   └── plugin.py
└── main.py

Example main.py:

from pathlib import Path

from agent_runtime.standalone import build_single_agent_app, run_single_agent_app


app = build_single_agent_app(
    Path(__file__).resolve().parent / "agent_app" / "agent.yaml"
)


if __name__ == "__main__":
    run_single_agent_app(app)

Example SDK import:

from agent_runtime import AgentBuilder

Minimal Configuration

Example agent_app/agent.yaml:

agent:
  agent_id: example-agent
  name: Example Agent
  description: Example A2A agent backed by MCP tools.

runtime:
  public_base_url: ${AGENT_PUBLIC_BASE_URL:-http://127.0.0.1:10020}
  model:
    provider: openai_compatible
    api_base: ${MODEL_SOURCE_API_BASE}
    model_id: ${MODEL_SOURCE_MODEL_ID}
    api_key_env: MODEL_SOURCE_API_KEY

mcps:
  - name: example
    url: ${MCP_EXAMPLE_URL}
    transport: streamable-http

Run:

export MODEL_SOURCE_API_BASE="https://your-model-api.example.com"
export MODEL_SOURCE_MODEL_ID="your-model-id"
export MODEL_SOURCE_API_KEY="your-api-key"
export MCP_EXAMPLE_URL="http://127.0.0.1:8000/mcp"
export AGENT_PUBLIC_BASE_URL="http://127.0.0.1:10020"

python main.py

Langfuse

After installing agent-runtime-sdk[observability], configure:

export MCP_AGENT_LANGFUSE_ENABLED=true
export LANGFUSE_BASE_URL="http://your-langfuse-host:3000"
export LANGFUSE_PUBLIC_KEY="pk-lf-..."
export LANGFUSE_SECRET_KEY="sk-lf-..."

Set MCP_AGENT_LANGFUSE_ENABLED=false to disable instrumentation.

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

agent_runtime_sdk-0.1.1.tar.gz (51.8 kB view details)

Uploaded Source

Built Distribution

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

agent_runtime_sdk-0.1.1-py3-none-any.whl (68.3 kB view details)

Uploaded Python 3

File details

Details for the file agent_runtime_sdk-0.1.1.tar.gz.

File metadata

  • Download URL: agent_runtime_sdk-0.1.1.tar.gz
  • Upload date:
  • Size: 51.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for agent_runtime_sdk-0.1.1.tar.gz
Algorithm Hash digest
SHA256 dd74ac3a36c2c58f3835b69b825d67434735fcbcf75f6057093413fc9b44f223
MD5 71e03ef9530a87ea2019b60c2d8b69c3
BLAKE2b-256 eba8a4ae0e9ac71bcd04865f7a777deb2db1d68a693713a36688c397e2e43096

See more details on using hashes here.

File details

Details for the file agent_runtime_sdk-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for agent_runtime_sdk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cb50da2e61fb1fc536cc15f0ccc9203960d60a3d8bc315095e2ff101d7c49000
MD5 7f33b4144311087d365ad96fa2a486b6
BLAKE2b-256 748242eaf7b9b56b6684c6111afbd1562d5f20d84ae62eafd551ef3fa943eb80

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