Skip to main content

Welcome to Runa

What's Runa?

Runa is an opiniated Python framework for building agentic AI applications: instead of a wide menu of configuration options, it gives you a small set of primitives, each with exactly one sanctioned shape.

Understanding those primitives is key to understanding Runa. They divide your application into three layers: the Agent layer, the Context layer, and the Infrastructure layer, with testing, evaluation, and tracing built in rather than bolted on.

Agent layer

The Agent layer is where your application decides what to do. An Agent is an LLM equipped with instructions and tools, always defined as a subclass, never instantiated directly:

class SupportAgent(Agent):
    name = "support_agent"
    model = "claude-sonnet-5"
    instruction = ""
    tools = [...]

Tools let an agent take action in the world, always a plain function wrapped in @tool. Guardrails validate what goes in and what comes out, tripping in list order so the first failure stops the rest. Human Approval pauses a run before a sensitive tool call executes, until a person signs off. Subagents let one agent delegate or hand off work to another.

Context layer

The Context layer is what an agent remembers between and within runs. Sessions hold the conversation for a single run. Memory carries facts forward across runs. Knowledge gives an agent access to your domain's documents, retrieved rather than pasted into the prompt.

Infrastructure layer

The Infrastructure layer is responsible for connecting an agent to the outside world and to the model that powers it. MCP Servers expose external tools and resources over the Model Context Protocol. Models are configured per agent, not globally, so different agents can run on different providers. Hooks let you observe or intercept a run at well-defined points without subclassing.

Built in, not bolted on

Every run is traced automatically as a span tree (Tracing), so you can see exactly what an agent did and why. Evaluation (Eval) grades correctness with plain assertions or judged, dataset-driven scoring. Deployment is the same story: runa serve puts your agents behind an HTTP API, and one environment variable moves sessions, traces and eval history to a shared database when one replica is no longer enough.

Getting Started

  1. Install uv, then Runa:

    uv venv --python 3.14  # Runa needs 3.14 or newer
    source .venv/bin/activate
    uv add runa-ai
    
  2. Scaffold a new application:

    runa new myapp
    

    where myapp is the application name.

  3. Change directory to myapp, generate an agent, and talk to it:

    cd myapp
    runa generate agent AssistantAgent --model claude-sonnet-5
    runa chat assistant_agent
    

    Run any subcommand with --help for options.

  4. Fill in the API key for whichever model you use in .env, and you're running.

  5. Put it in front of users:

    uv add "runa-ai[serve]"
    export RUNA_API_KEY=$(openssl rand -hex 32)
    runa serve
    

    Every agent under app/agents/ is now an endpoint: POST /agents/<name>/runs. See Deployment.

  6. Follow the guides to keep building your application. You may find the following resources handy:

Read the Zen of Runa

python -c "from runa import this"

Contributing

We encourage you to contribute to Runa! Check out CONTRIBUTING.md for guidelines about how to proceed.

Trying to report a possible security vulnerability in Runa? Please check out SECURITY.md for guidelines about how to proceed.

Everyone interacting in Runa's codebase, issue tracker, and discussions is expected to follow the code of conduct.

License

Runa is released under the MIT License.

Metadata

Release files for runa-ai 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for runa-ai 0.6.0
File Size Uploaded
runa_ai-0.6.0.tar.gz 172.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for runa-ai 0.6.0
File Interpreter ABI Platform
runa_ai-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 404.1 kB

Release files / runa_ai-0.6.0.tar.gz

Download URL runa_ai-0.6.0.tar.gz
Size 172.8 kB
Tags Source
SHA-256 checksum
How to use checksums
6796a23a62d96e4c5273c15e5e54dd6840a1ad7ab65403acf757c9c24525a99a
BLAKE2b-256 checksum
How to use checksums
5d476bb7c2c0e4211f9d9352c4064e2d48183c17ba93bb0426ea6a749bcd41b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.

Transparency log

Release files / runa_ai-0.6.0-py3-none-any.whl

Download URL runa_ai-0.6.0-py3-none-any.whl
Size 231.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1122f34420a0eae53011ef668722da6339f813095724fd63e84bab5aff749fa5
BLAKE2b-256 checksum
How to use checksums
43d6ffb44a4a2bbccfbdbcb50e851fc9a71e8708c7af7a0d61d37936f9c8fafc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 7, 2026.

Transparency log

Release history Release notifications | RSS feed

0.8.0

2 release files

0.7.0

2 release files

This release

0.6.0 This release

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page