Metadata-Version: 2.4
Name: agentic-workflow-orchestrator
Version: 1.1.2
Summary: Orchestrate multi-agent workflows with autonomous reasoning, parallelism, rate limiting, and LLM integration
Home-page: https://github.com/kasimanikandan/agentic-workflow-orchestrator
Author: Manikandan Kasi
Author-email: Orchestrator Team <info@orchestrator.dev>
License: Apache License 2.0
Project-URL: Homepage, https://github.com/kasimanikandan/agentic-workflow-orchestrator
Project-URL: Documentation, https://github.com/kasimanikandan/agentic-workflow-orchestrator/blob/main/QUICKSTART.md
Project-URL: Repository, https://github.com/kasimanikandan/agentic-workflow-orchestrator
Project-URL: Issues, https://github.com/kasimanikandan/agentic-workflow-orchestrator/issues
Keywords: orchestration,workflow,multi-agent,agent,concurrency,rate-limiting,llm,mcp,asyncio
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Provides-Extra: llm-anthropic
Requires-Dist: anthropic>=0.7.0; extra == "llm-anthropic"
Provides-Extra: llm-openai
Requires-Dist: openai>=1.0.0; extra == "llm-openai"
Provides-Extra: llm-gemini
Requires-Dist: google-generativeai>=0.3.0; extra == "llm-gemini"
Provides-Extra: llm-xai
Requires-Dist: openai>=1.0.0; extra == "llm-xai"
Provides-Extra: llm-huggingface
Requires-Dist: transformers>=4.30.0; extra == "llm-huggingface"
Requires-Dist: torch>=2.0.0; extra == "llm-huggingface"
Provides-Extra: llm-azure
Requires-Dist: openai>=1.0.0; extra == "llm-azure"
Provides-Extra: llm
Requires-Dist: anthropic>=0.7.0; extra == "llm"
Requires-Dist: openai>=1.0.0; extra == "llm"
Requires-Dist: google-generativeai>=0.3.0; extra == "llm"
Requires-Dist: transformers>=4.30.0; extra == "llm"
Requires-Dist: torch>=2.0.0; extra == "llm"
Provides-Extra: engine
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Requires-Dist: black>=23.0; extra == "dev"
Requires-Dist: isort>=5.12; extra == "dev"
Requires-Dist: mypy>=1.0; extra == "dev"
Dynamic: author
Dynamic: home-page
Dynamic: requires-python

# orchestrator (Python reference SDK)

In-process workflow orchestration engine + authoring API. Zero required dependencies
(stdlib `asyncio`); `pyyaml` is optional (for `.yaml` specs), `anthropic` optional (for the
real LLM adapter).

## Concepts

- **Workflow** — a DAG of tasks loaded from a template (`Workflow.from_file/from_dict/from_json`).
- **Skill** — a registered handler `(ctx, inputs) -> output`, sync or `async`.
- **Tool** — a registered callable a skill invokes via `ctx.call_tool(...)`.
- **Orchestrator** — runs a workflow, enforcing concurrency + rate limits, and returns a `Report`.

## Minimal usage

```python
from orchestrator import Workflow, Orchestrator, Registry, MockLLM

reg = Registry()

@reg.tool("http.get")
def http_get(url):
    return {"url": url, "ok": True}

@reg.skill("market.fetch")
def fetch(ctx, inputs):
    ctx.call_tool("http.get", url=f"/prices/{inputs['ticker']}")
    ctx.record_decision("selected primary feed", rationale="lowest latency")
    return {"ticker": inputs["ticker"], "last": 199.4}

@reg.skill("llm.classify")
def classify(ctx, inputs):
    r = ctx.llm(messages=[{"role": "user", "content": inputs["text"]}], model="claude-opus-4-8")
    return r.text

wf = Workflow.from_file("../spec/examples/market-analysis.json")
report = Orchestrator(reg, llm=MockLLM()).run_sync(wf, inputs={"ticker": "AAPL"})
print(report.to_json())
```

## The `ctx` (SkillContext) API

| Member | Purpose |
|---|---|
| `ctx.inputs` | resolved task inputs |
| `ctx.call_tool(name, **kwargs)` | invoke a registered tool |
| `ctx.llm(messages, tools=, model=, **opts)` | call the configured LLM provider; usage is recorded |
| `ctx.record_decision(summary, rationale=, data=)` | append a critical decision to the trace |
| `ctx.log(msg)`, `ctx.attempt`, `ctx.cancelled` | logging / retry attempt / cooperative cancel flag |

## Report

`report.to_dict()` / `report.to_json()` give: `status`, `duration_ms`, per-task
`{status, duration_ms, attempts, llm, decisions, error}`, `critical_path` (bottleneck chain),
`totals` (llm tokens, tool calls, retries), `errors`, and the resolved `output`.

## Run

```bash
python3 examples/run_market.py
python3 tests/test_engine.py
```

## Using a real LLM

```python
from orchestrator import AnthropicProvider, Orchestrator
orch = Orchestrator(reg, llm=AnthropicProvider(model="claude-opus-4-8"))  # needs ANTHROPIC_API_KEY + `pip install anthropic`
```
Confirm current Claude model IDs/limits from the Claude API reference before pinning them.
