RunAgents Python SDK — deploy, manage, and build AI agents
Project description
RunAgents Python SDK
Everything you need to build, test, and deploy AI agents on RunAgents — in one package.
The public source for this package lives in sdk/python/ in the
runagents-io/runagents repository so the CLI, SDK, MCP server,
docs, and skills ship together.
Install
pip install runagents # Core SDK + CLI + runtime (zero deps)
pip install runagents[mcp] # + MCP server for AI coding assistants
pip install runagents[dev] # + hot-reload for local dev
Quickstart
runagents init my-agent # Scaffold a project
cd my-agent
runagents dev # Local dev server with mock tools
runagents deploy # Ship to the platform
Python API
Client — manage platform resources
from runagents import Client
client = Client() # reads ~/.runagents/config.json + env vars
agents = client.agents.list()
tools = client.tools.list()
runs = client.runs.list(agent="payment-agent")
result = client.agents.deploy(
name="my-agent",
source_files={"agent.py": open("agent.py").read()},
required_tools=["stripe-api"],
llm_configs=[{"provider": "openai", "model": "gpt-4o-mini", "role": "default"}],
)
Agent — write agent code
from runagents import Agent, tool
agent = Agent() # reads TOOL_URL_*, LLM_GATEWAY_URL, LLM_MODEL from env
# Call a platform tool (platform egress layer handles auth)
result = agent.call_tool("echo-tool", "/echo", {"message": "hello"})
# Chat via LLM gateway
response = agent.chat("What is 2+2?", tools=[...])
# Custom handler (Tier 2)
def handler(request, ctx):
message = request["message"]
result = agent.chat(message)
return result["choices"][0]["message"]["content"]
@tool decorator
from runagents import tool
@tool(name="calculator", description="Evaluate math expressions")
def calculate(expression: str) -> str:
return str(eval(expression))
CLI Commands
| Command | Description |
|---|---|
runagents init [name] |
Scaffold a new agent project |
runagents dev |
Start local dev server with mock tools |
runagents deploy |
Deploy an agent (delegates to Go CLI) |
runagents catalog |
Browse and deploy catalog agents |
runagents policies |
Manage governance policies |
runagents approval-connectors |
Manage approval routing connectors |
runagents identity-providers |
Manage workspace identity providers |
runagents agents list |
List agents |
runagents tools list |
List tools |
runagents runs list |
List runs |
runagents context export |
Export assistant/workspace context |
runagents config |
Manage configuration |
Runtime
The runtime provides the HTTP server for deployed agents — tool calling loop, SSE streaming, health checks, OAuth consent, and JIT approvals. It runs automatically inside the platform; for local development use runagents dev.
Policy enforcement remains active at runtime. Agents need bound policy rules (allow or approval_required) for tool calls.
# Backward compatible — still works
import runagents_runtime
MCP Server
pip install runagents[mcp]
runagents-mcp # starts on stdio
Assistant tools for deployment, catalog inspection, policies, approval connectors, runs, and approvals. See AI Assistant Setup.
Configuration
Reads from ~/.runagents/config.json with env var overrides:
| Variable | Description | Default |
|---|---|---|
RUNAGENTS_ENDPOINT |
Platform API URL | http://localhost:8092 |
RUNAGENTS_API_KEY |
API key or workspace key | — |
RUNAGENTS_NAMESPACE |
Target namespace | default |
Documentation
License
Apache-2.0
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 runagents-1.3.1.tar.gz.
File metadata
- Download URL: runagents-1.3.1.tar.gz
- Upload date:
- Size: 53.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a61160568972e0739608c19740c6be86e23a19d967e6dcdd44f1f6edb0ecb933
|
|
| MD5 |
f88a3ab47d53f8d9cb2deec340dce578
|
|
| BLAKE2b-256 |
5a3b739b00de69f191ce908dc65f4bb73930541d30b6834601993369f03c37eb
|
Provenance
The following attestation bundles were made for runagents-1.3.1.tar.gz:
Publisher:
release-cli.yml on runagents-io/runagents
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
runagents-1.3.1.tar.gz -
Subject digest:
a61160568972e0739608c19740c6be86e23a19d967e6dcdd44f1f6edb0ecb933 - Sigstore transparency entry: 1272372813
- Sigstore integration time:
-
Permalink:
runagents-io/runagents@1b7e4fb958e9e09151a3b05427afbab5e365978a -
Branch / Tag:
refs/tags/v1.3.1 - Owner: https://github.com/runagents-io
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-cli.yml@1b7e4fb958e9e09151a3b05427afbab5e365978a -
Trigger Event:
push
-
Statement type:
File details
Details for the file runagents-1.3.1-py3-none-any.whl.
File metadata
- Download URL: runagents-1.3.1-py3-none-any.whl
- Upload date:
- Size: 51.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4e8f52f130a435f4946ae023d70e9d424413bcacd8bfbc5d4b38ea60df6058f
|
|
| MD5 |
434d8e6c57559ff1603e14c65b369d05
|
|
| BLAKE2b-256 |
e02abc875b9fa2d5efb29b3c4fbab4b6c594f7f143d9a70da28f2f1b6892c0db
|
Provenance
The following attestation bundles were made for runagents-1.3.1-py3-none-any.whl:
Publisher:
release-cli.yml on runagents-io/runagents
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
runagents-1.3.1-py3-none-any.whl -
Subject digest:
b4e8f52f130a435f4946ae023d70e9d424413bcacd8bfbc5d4b38ea60df6058f - Sigstore transparency entry: 1272372921
- Sigstore integration time:
-
Permalink:
runagents-io/runagents@1b7e4fb958e9e09151a3b05427afbab5e365978a -
Branch / Tag:
refs/tags/v1.3.1 - Owner: https://github.com/runagents-io
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-cli.yml@1b7e4fb958e9e09151a3b05427afbab5e365978a -
Trigger Event:
push
-
Statement type: