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.


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

Design Philosophy

Anusara = Deterministic Event-Sourced Execution Runtime

Not just orchestration.
Not just workflows.

A runtime system for reliable execution.


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
Router execution decision logic
Mutation Engine controlled graph evolution
Registry agent discovery and lifecycle
Observability debugging, metrics, visualization

Quick Start

Install:

pip install anusara

Minimal example:

from anusara import ExecutionEngine, GraphDefinition

graph = GraphDefinition(
    nodes=[
        {"id": "A", "agent": agent_a},
        {"id": "B", "agent": agent_b},
    ],
    edges=[("A", "B")]
)

engine = ExecutionEngine()
result = engine.run(graph, input_data)

The runtime handles:

  • scheduling
  • retries
  • event logging
  • replay
  • observability

Execution Graph

Workflows are defined as directed graphs.

graph LR
    A --> B
    A --> C

    subgraph Wave_0
        A
    end

    subgraph Wave_1
        B
        C
    end

Execution proceeds in deterministic waves.


Key Features

  • deterministic execution
  • event-sourced execution history
  • replayable workflows
  • graph-based orchestration
  • built-in observability
  • runtime debugging tools
  • controlled workflow mutation

Documentation

Documentation is available in the docs/ directory.

Concepts

  • deterministic execution
  • event sourcing
  • execution waves
  • replay

Guides

  • building workflows
  • running executions
  • debugging with replay

Architecture

  • execution model
  • routing model
  • state machine
  • replay model
  • mutation model

Roadmap

See: docs/roadmap.md


Project Status

Anusara is under active development.

Current focus:

  • developer experience (API & usability)
  • onboarding workflows
  • improved tooling

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.0.4.tar.gz (79.2 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.0.4-py3-none-any.whl (122.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for anusara-1.0.4.tar.gz
Algorithm Hash digest
SHA256 bf1ab46cb1696391f98748f8ee90511b237ac5914556dddf53dc64fb5cb72ccb
MD5 a90261ed403fbc8b5d810d79996157b2
BLAKE2b-256 f8ad9cac44add3c68241ffb396c1d06ebb4db51a46b53f243445cb88e8955617

See more details on using hashes here.

File details

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

File metadata

  • Download URL: anusara-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 122.2 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.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 96e026644cf2208a18005ff47fcc91f336dc62052974c2e7be62b274a4f9ce19
MD5 f18f3b8e3bc6bbffc92accbb11b12aec
BLAKE2b-256 bbad015658b4f2a0c2d032d850a9ca4c9af7897f02bc714330df1d0a5629aecd

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