Skip to main content
RunAgent lets you deploy Python-based AI agents and access them from any language with full streaming support.

Key Benefits

  • Deploy agents in seconds - Serverless infrastructure with automatic scaling
  • Access from Python, JS, Go, Rust and coming more - Native-feeling SDKs for every language
  • Built-in streaming - Real-time token streaming for responsive applications

Quick Actions

Hero Light

The Problem Every AI Developer Faces

Suppose you’ve built an incredible AI agent in Python. It uses LangGraph for complex reasoning, leverages powerful tools, and produces amazing results. Your team loves it!

Then reality hits:

Your whole team is excited to use it! But the frontend team needs to access it in JavaScript, your mobile app team wants it in Kotlin, your Unity team wants it in C#, your systems team requires it in Rust.

The traditional approach?

Build separate implementations, REST APIs, WebSocket handlers…
Sound exhausting? That’s because it is!

What RunAgent Actually Does

RunAgent fundamentally changes how AI agent deployment works. Your Python function signatures automatically become API contracts (REST or Streaming) for every supported language.
Once runagent.config.json of your project points to your Python function, they are automatically converted to corresponding API endpoints, and all language SDKs automatically adapt. No API versioning, no breaking changes.
The fastest way to experience the magic is with RunAgent CLI:
1

Install the RunAgent CLI

This installs the powerful RunAgent CLI, which is used to deploy and manage your agents.
pip install runagent
2

Initialize Your Agent

Let’s start with a minimal Agent example.
runagent init my_agent
cd my_agent
This creates a new directory with the basic structure you need to get started.
3

Define Your Agent Function

In your agent codebase (for example, main.py), define a function that will serve as your agent’s entrypoint:
main.py
def mock_response(message, role="user"):
  """Test the mock agent with non-streaming responses"""
  # Your agent logic here
  # Process the message and generate a response
  return response.content
This mock_response function is one of the invocation functions for our agent. It takes a message and role as parameters and returns the agent’s response.
4

Configure the Agent Entrypoint

Open the runagent.config.json file and add your function as an entrypoint:
"entrypoints": [
  {
    "file": "main.py",
    "module": "mock_response",
    "tag": "minimal"
  }
]
The file specifies where your function lives, module is the function name, and tag is a label you’ll use to call this specific entrypoint.
5

Run the Agent Locally

Start your agent locally to test it:
runagent serve .
You will see output similar to:
Agent Details:
- Agent ID: f7066c98-0eb2-488c-bb37-a869a93d51ce
- Host: 127.0.0.1
- Port: 8451
- Framework: default
- Status: ready

Server running at: http://127.0.0.1:8451
API Documentation: http://127.0.0.1:8451/docs

Available endpoints:
- POST /api/v1/agents/.../execute/minimal - Run your agent

INFO: Uvicorn running on http://127.0.0.1:8451 (Press CTRL+C to quit)
That’s it! Your agent is now running and accessible through standard REST API as well as all RunAgent SDKs.
6

Use the Agent in Your Application

Using the RunAgent SDKs, you can access your agent from any supported language. You only need the agent ID and the entrypoint tag. Your mock_response function now becomes accessible in multiple languages:
from runagent import RunAgentClient

# Create a client pointing to your agent
ra = RunAgentClient(
    agent_id="f7066c98-0eb2-488c-bb37-a869a93d51ce",
    entrypoint_tag="minimal",
    local=True
)

# Call your agent
agent_result = ra.run(
    role="user",
    message="Analyze the benefits of remote work for software teams"
)

print(agent_result)
Notice how the same agent logic is accessible from all languages with idiomatic syntax for each.
That’s the core workflow. You’re now ready to deploy your AI agents and integrate them into your applications.

From Local Testing to Production in Seconds

Once you’ve tested your agent locally and confirmed everything works, deploying to production is just one command away. RunAgent Cloud is the fastest AI agent deployment platform, designed to take your local agent from development to production instantly. No complex infrastructure setup, no deployment headaches.

Deploy to Production

runagent deploy .
That’s it. Your agent is now live and accessible globally with:
  • Automatic scaling - Handle one request or one million
  • Global edge network - Low latency worldwide
  • Zero infrastructure management - Focus on your agent, not servers
  • Production-ready security - Enterprise-grade isolation and security
Your deployed agent gets a production URL and agent ID. Simply update your SDK clients to use the production endpoint:
# Switch from local to production
ra = RunAgentClient(
    agent_id="your-production-agent-id",
    entrypoint_tag="minimal",
    local=False  # Now pointing to RunAgent Cloud
)
The same code you tested locally now runs in a fully managed production environment.

Learn More About Deployment

Explore advanced deployment options, environment variables, and monitoring capabilities.

Agent Framework Support

RunAgent works with any Python-based AI agent framework:

Custom Framework

Use any Python-based framework by defining simple entrypoint functions.

Multi-Language SDK Support

RunAgent provides native-like access to your deployed agents across multiple languages:

All Language SDKs

We’re actively developing SDKs for additional languages including C++, C#, Java, and PHP. Want to contribute or request a specific language? Join our Discord community.

Real-Time Streaming Across Languages

In addition to standard REST API responses, you can also stream your agent responses seamlessly through our SDKs. When your entrypoint streams a response, RunAgent makes it feel native in every language SDK:
1

Define a Streaming Function

Create a function in your agent codebase that returns an Iterator (in this case in main.py):
main.py
def mock_response_stream(message, role="user") -> Iterator[str]:
  """Test the mock agent with streaming responses"""
  # Your streaming agent logic here
  # Yield chunks of the response as they're generated
  for chunk in generate_response_chunks(message):
      yield chunk
This mock_response_stream function will return an Iterator that yields response chunks as they’re generated.
2

Configure the Streaming Entrypoint

Add this function to your runagent.config.json file as another entrypoint:
"entrypoints": [
  {
    "file": "main.py",
    "module": "mock_response_stream",
    "tag": "minimal_stream"
  }
]
The tag for a streaming entrypoint must end with a _stream suffix. This is how RunAgent identifies it as a streaming endpoint.
3

Run the Agent Locally

Spin up the agent just like before. Now you have an additional streaming entrypoint available.
runagent serve .
4

Use Streaming in Your Application

Using the RunAgent SDKs, you can stream responses from your agent. The streaming experience feels natural in each language:
from runagent import RunAgentClient

# Create a client with the streaming tag
ra = RunAgentClient(
    agent_id="f7066c98-0eb2-488c-bb37-a869a93d51ce",
    entrypoint_tag="minimal_stream",
    local=True
)

# Stream the response chunk by chunk
for chunk in ra.run(
    role="user",
    message="Analyze the benefits of remote work for software teams"
):
    print(chunk, end='', flush=True)
What’s happening behind the scenes: WebSocket connections, real-time data flow, and native iteration patterns are all handled automatically by RunAgent’s infrastructure.

Next Steps