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.0.tar.gz (52.3 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.0-py3-none-any.whl (68.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agent_runtime_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 52.3 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.0.tar.gz
Algorithm Hash digest
SHA256 bc2932ccd15e49d60d29e8b68ee12d0e34a6ca678e806239f6240656a16ee42d
MD5 de88a66d56698fdcd65169469ebf209a
BLAKE2b-256 2e39c3b4b054d1a68a9d3b566572f8453ecd912d10a39793369461fae4f76173

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for agent_runtime_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 917c6e044e7ebd6508cdb7432a5e7a94bd8b566aa2fae102efd5859c097fd921
MD5 db800ccfb389c2c42113b12c6134a8e8
BLAKE2b-256 4d4f9c872494c35b453510675a6171d3d23579887da85a25bd7b6d29bd182547

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