Skip to main content

CoReason Runtime Engine ("The General")

Multi-Agent Collaborative Orchestrator (MACO)

License: Prosperity 3.0 CI/Status Ruff Documentation

Overview

coreason-maco is the runtime engine designed to transform AI from a "Chatbot" into a "Strategic Simulator." It executes pre-defined, deterministic workflows ("Recipes") where multiple specialized AI agents collaborate, debate, and verify each other's work.

As the Orchestrator, it manages a team of specialized agents to:

  • Break down complex problems into steps.
  • Execute parallel research streams.
  • Debate findings using a "Council of Models" (Architectural Triangulation).
  • Visualize the entire thought process in real-time.

Features

  • "Glass Box" Visualization: Exposes internal state in real-time. Users can see exactly which agent is working, what data they are accessing, and where they are in the process.
  • Architectural Triangulation ("The Council"): Automatically "triangulates" answers by asking three distinct models (e.g., OpenAI, Anthropic, DeepSeek) and having a fourth "Judge" agent synthesize the consensus.
  • Counterfactual Simulation ("What-If" Analysis): Allows users to "Fork" the reasoning process to explore different scenarios without losing original data.
  • GxP Compliance & Determinism: Ensures workflows are reproducible. Running the same "Recipe" with the same inputs and "Seed" yields the exact same result.
  • Secure Identity Propagation: Propagates UserContext (Identity Passport) securely to all workers and tools, ensuring "On-Behalf-Of" execution without leaking tokens in UI events.

Installation

pip install coreason_maco

Usage

Here is how to initialize and execute a workflow using coreason-maco:

import asyncio
from coreason_maco.core.controller import WorkflowController
from coreason_maco.infrastructure.server_defaults import ServerRegistry

# Optional: Import UserContext if available
try:
    from coreason_identity.models import UserContext
except ImportError:
    UserContext = None

async def main():
    # 1. Initialize Services (Dependency Injection)
    services = ServerRegistry()

    # 2. Initialize Controller
    controller = WorkflowController(services=services)

    # 3. Define a Simple Manifest (Recipe)
    manifest = {
        "name": "Simple Greeting",
        "nodes": [
            {"id": "node_1", "type": "LLM", "config": {"prompt": "Say hello!"}}
        ],
        "edges": []
    }

    # 4. Define Inputs
    inputs = {
        "user_id": "test_user",
        "trace_id": "trace_123",
        "secrets_map": {}
    }

    # 5. Execute Workflow
    print("Starting Workflow...")
    # Pass user_context (Optional)
    async for event in controller.execute_recipe(manifest, inputs, user_context=None):
        print(f"Event: {event.event_type} | Node: {event.node_id} | Payload: {event.payload}")

if __name__ == "__main__":
    asyncio.run(main())

Metadata

Release files for coreason-maco 0.4.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 coreason-maco 0.4.0
File Size Uploaded
coreason_maco-0.4.0.tar.gz 24.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for coreason-maco 0.4.0
File Interpreter ABI Platform
coreason_maco-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 58.8 kB

Release files / coreason_maco-0.4.0.tar.gz

Download URL coreason_maco-0.4.0.tar.gz
Size 24.3 kB
Tags Source
SHA-256 checksum
How to use checksums
aebcac3cc241d4389ad742f9110d4a65408aa74e8baa649292bbf3889f7c191a
BLAKE2b-256 checksum
How to use checksums
75330c1e3787e02650be276052d303fe99d5783419ae9ed52dae8f0a91fff143
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 31, 2026.

Transparency log

Release files / coreason_maco-0.4.0-py3-none-any.whl

Download URL coreason_maco-0.4.0-py3-none-any.whl
Size 34.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3aa0d720d69c168b89f31e3c1b0e33bdebeac303189c88f09b5e6b7b0039c547
BLAKE2b-256 checksum
How to use checksums
5847e48ea01b060d50b314e130e216c4438d9ba9e6f4ea745b9659b3ac72c210
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Jan 31, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

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