Skip to main content

REAL Framework

Reproducible Experimentation for Agentic Logic.

CI Python 3.10+ License: Apache-2.0

简体中文

REAL is an open-source framework for building, observing, evaluating, and safely experimenting with versioned agentic workflows. It is designed for repeatable business tasks where reproducibility and real online outcomes matter more than open-ended multi-agent conversation.

Why REAL?

  • One source of truth: JSON or optional YAML powers the CLI, SDK, Canvas, compiler, and runtime.
  • Reproducible execution: immutable plans carry workflow, node, prompt, model, provider, and tool lineage.
  • Real experimentation: stable business-unit assignment, execution-backed exposure, delayed outcomes, SRM checks, guardrails, promotion, and rollback.
  • Observable by default: run and node traces, latency, token/cost attributes, content redaction, SQLite storage, and optional OpenTelemetry export.
  • Portable integrations: explicit tool/model registries plus HTTP JSON, MCP Streamable HTTP, and OpenAI-compatible adapters.
  • Agent-friendly operations: a structured non-interactive CLI and repository skill for Codex or Claude Code.

Install

From source:

git clone https://github.com/icenfly/real-agentic-workflows.git
cd real-agentic-workflows
python -m venv .venv
source .venv/bin/activate
pip install -e '.[yaml,otel]'

The distribution name is real-agentic-workflows. The primary command is real; agent remains a compatibility alias. The Python import namespace is currently agent_infra.

Build and run a workflow

real init customer-triage --name customer_triage
cd customer-triage

real validate workflow.json
real compile workflow.json
real run workflow.plan.json --input '{"message":"refund requested"}'
real eval workflow.plan.json --dataset dataset.jsonl
real canvas workflow.json

Every successful CLI response is JSON. Errors go to stderr with non-zero exit codes. Mutating control-plane commands support --dry-run where applicable.

A workflow is plain data:

{
  "spec_version": "0.1",
  "name": "hello",
  "version": "1.0.0",
  "input_schema": {
    "type": "object",
    "required": ["message"]
  },
  "output_schema": {"type": "object"},
  "entry": "render",
  "nodes": [
    {
      "id": "render",
      "type": "template",
      "config": {"template": "Received: ${$.input.message}"}
    },
    {
      "id": "result",
      "type": "output",
      "config": {"value": {"message": "${$.nodes.render}"}}
    }
  ],
  "edges": [{"source": "render", "target": "result"}]
}

Use tools and models

Workflow files reference logical names and exact versions. Implementations are registered by the host application, never imported from an untrusted workflow:

from agent_infra import Runtime, WorkflowSpec, compile_workflow

plan = compile_workflow(WorkflowSpec.from_dict(workflow_dict))
runtime = Runtime().register_tool("lookup", lookup, version="2026-08-09")
result = runtime.run(plan, {"ticket_id": "T-42"})

The CLI accepts Python callables or a JSON adapter registry:

real run workflow.plan.json \
  --tool lookup=my_app.tools:lookup@2026-08-09 \
  --provider llm=my_app.models:generate@gateway-v2 \
  --input '{"message":"hello"}'

real run workflow.plan.json \
  --adapters examples/adapters.example.json \
  --input '{"message":"hello"}'

Remote adapters require a host allowlist, reject redirects, cap response bodies, and keep secrets in environment variables.

Run an online experiment

real experiment start examples/triage-experiment.json --dry-run
real experiment start examples/triage-experiment.json

real run --experiment triage_v2 \
  --unit-name organization_id \
  --unit-value acme \
  --input '{"ticket_id":"T-42","message":"cannot sign in"}'

real outcome ASSIGNMENT_ID resolved 1 --idempotency-key ticket-T-42
real experiment status triage_v2
real experiment stop triage_v2
real experiment promote triage_v2 treatment
real rollback ticket_triage

Assignment is not exposure: REAL records exposure only after the assigned immutable plan actually runs and its trace is stored.

Serve workflows over HTTP

real deploy workflow.plan.json --environment prod
export REAL_API_KEY='replace-me'
real serve --host 0.0.0.0 --port 8080 --api-key-env REAL_API_KEY

The data plane exposes health, run, trace, experiment-status, and delayed-outcome endpoints. Public deployments should place it behind TLS, organization authentication, rate limiting, and a secret manager.

CLI map

Lifecycle Commands
Define init, schema, validate, compile, diff, canvas
Execute run, serve, deploy, rollback
Observe trace, audit
Evaluate eval
Experiment experiment start/iterate/status/stop/promote, outcome

Run real COMMAND --help for machine-friendly argument details.

Documentation

Development

python -m pip install -e '.[dev,yaml]'
ruff check src tests
ruff format --check src tests
pytest
python -m build

See CONTRIBUTING.md, SECURITY.md, and the Code of Conduct before contributing.

Project boundaries

REAL intentionally does not bundle a long-term memory platform, vector database, node-level containers, or an automatic-promotion statistical engine. Those capabilities can be integrated as tools or storage backends without expanding the core workflow model. The bundled SQLite store targets a single control-plane process; high-write multi-instance deployments should provide a transactional database backend.

License

Apache License 2.0. See LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

real_agentic_workflows-0.1.0.tar.gz (56.1 kB view details)

Uploaded Source

Built Distribution

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

real_agentic_workflows-0.1.0-py3-none-any.whl (52.4 kB view details)

Uploaded Python 3

File details

Details for the file real_agentic_workflows-0.1.0.tar.gz.

File metadata

  • Download URL: real_agentic_workflows-0.1.0.tar.gz
  • Upload date:
  • Size: 56.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for real_agentic_workflows-0.1.0.tar.gz
Algorithm Hash digest
SHA256 789871b70338b8ec56225ba481c39677c91c4f49f82b2bb88ffa1e0bd9db4d12
MD5 6277565dd79e170a633ba896a1a612a1
BLAKE2b-256 53e22e9163acbf478d3d0c1bf0d7ead2fac738adb49c1768be5477846c54c3d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for real_agentic_workflows-0.1.0.tar.gz:

Publisher: publish.yml on icenfly/real-agentic-workflows

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file real_agentic_workflows-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for real_agentic_workflows-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8a414f67ac6d81a4607b72921243ede96966b73a7a1e2ce3b9b8a3172e1ac929
MD5 324b7d8ff0d688e97dfd4d59a407ec95
BLAKE2b-256 ababd26550435c71d0eebacd87acc7c5b8598f0b3d71ac9f270a4c6ed078a9ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for real_agentic_workflows-0.1.0-py3-none-any.whl:

Publisher: publish.yml on icenfly/real-agentic-workflows

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page