Skip to main content

Deterministic execution engine with traceable, immutable history

Project description

Anusara

Deterministic execution runtime for agent workflows.

CI PyPI Python Versions License Architecture


What is Anusara?

Anusara is a deterministic runtime for executing agent workflows.

It executes graphs of agents using:

  • deterministic scheduling
  • event-sourced execution history
  • replay-driven state reconstruction

Every execution becomes:

  • replayable
  • inspectable
  • debuggable
  • reproducible

Anusara treats workflow execution as a runtime system problem, not a collection of loosely connected function calls.


🚀 Quickstart (2 minutes)

Install

pip install anusara[api]

Run the server

PYTHONPATH=src python -m uvicorn anusara.adapters.http.app:create_app --factory --reload

Register agent

curl -X POST http://127.0.0.1:8000/agents/register \
  -H "Content-Type: application/json" \
  -d '{"name": "hello"}'

Execute

curl -X POST http://127.0.0.1:8000/executions \
  -H "Content-Type: application/json" \
  -d '{"entry_nodes": ["hello"]}'

👉 You just ran your first deterministic workflow.

➡️ Full guide: docs/guides/http-api-quickstart.md


The Mental Model

Agent Graph
     ↓
Deterministic Execution Engine
     ↓
Event Log (source of truth)
     ↓
Replay • Debug • Observability

Execution is not hidden state.

It is a recorded, replayable system.


Why Anusara?

Most agent orchestration systems rely on implicit runtime behavior.

This leads to:

  • nondeterministic execution
  • difficult debugging
  • hidden state transitions
  • unreliable retries
  • poor reproducibility

Anusara solves this by enforcing:

  • deterministic execution
  • event log authority
  • replay-based debugging
  • explicit lifecycle guarantees

Architecture Overview

flowchart LR

Client[Client / API / CLI]
Client --> Runtime

Runtime[Execution Runtime]

Runtime --> Graph[Graph Compiler]
Runtime --> Registry[Agent Registry]
Runtime --> Router[Router]
Runtime --> Mutation[Mutation Engine]

Runtime --> EventLog[(Event Log)]

EventLog --> Replay[Replay Engine]
EventLog --> Debugger[Debugger / Analysis]

Runtime --> Observability[Observability]

Core Responsibilities

Layer Responsibility
Runtime deterministic execution of workflows
Event Log authoritative execution history
Registry agent lifecycle & resolution
Router execution decision logic
Mutation Engine controlled graph evolution
Observability debugging, metrics, visualization

Local Python Example

import asyncio
from anusara import ExecutionEngine, ExecutionRequest, AgentRegistry

engine = ExecutionEngine()

registry = AgentRegistry()
registry.register("hello", HelloAgent())

request = ExecutionRequest(
    request_id="demo",
    entry_nodes=["hello"],
    payload={},
    metadata={},
)

asyncio.run(engine.execute(request, registry))

Key Features

  • deterministic execution
  • event-sourced execution history
  • replayable workflows
  • HTTP + CLI + Python runtime
  • agent lifecycle management
  • built-in observability
  • controlled workflow mutation

Documentation

🚀 Getting Started

  • docs/guides/http-api-quickstart.md
  • docs/guides/running-anusara-locally.md
  • docs/guides/creating-your-first-agent.md

📚 Concepts

  • agents
  • deterministic execution
  • event sourcing
  • replay

🏗 Architecture

  • execution model
  • runtime architecture
  • event log
  • mutation model

📖 Reference

  • HTTP API
  • agent registry
  • execution engine

Project Status

Anusara is under active development.

Current focus:

  • developer experience (HTTP API & usability)
  • onboarding and documentation
  • production readiness

Contributing

Contributions and discussions are welcome.

  • CONTRIBUTING.md
  • CODE_OF_CONDUCT.md
  • SECURITY.md

License

MIT License

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

anusara-1.1.2.tar.gz (80.4 kB view details)

Uploaded Source

Built Distribution

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

anusara-1.1.2-py3-none-any.whl (123.3 kB view details)

Uploaded Python 3

File details

Details for the file anusara-1.1.2.tar.gz.

File metadata

  • Download URL: anusara-1.1.2.tar.gz
  • Upload date:
  • Size: 80.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for anusara-1.1.2.tar.gz
Algorithm Hash digest
SHA256 875f21ae3026d3435769be358721b4f4acf35f7e12bcbf3125bf10f68d8056f1
MD5 b833b4e521600fe974840c7fe9ab8e02
BLAKE2b-256 ccada23fb3e7a143ead13e37286e692210f602b7ca89b3a2aab06135f9b1d41a

See more details on using hashes here.

File details

Details for the file anusara-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: anusara-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 123.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for anusara-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 00fe6101dfbbdad4e5d01ae94229bc8a938549e63a1874b0fb8e0bb9783f91f7
MD5 06a677190023a30125a5f794caf37bc9
BLAKE2b-256 124b45bd624410d88586c67771d3fc019c81ad2b8a9afa574615f53790a2cfcb

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