Catalog PyPI
Back to packageRELEASE DETAILS

0.1.0

PyPI

agentork

Orchestration framework for multi-agent workflows via external commands

agentorchestrationworkflow
Published24 May 2026
Direct dependencies11
Transitive dependenciesNot calculated

README

Version 0.1.0 documentation

AgentOrk

Orchestrate multi-agent workflows declaratively.

English · 简体中文

CI Python 3.10+ MIT PyPI

Quick Start · How It Works · Features · Usage · Docs


AgentOrk is an orchestration framework for multi-agent workflows. Wire external commands (Python scripts, Claude Code CLI, Cursor CLI, shell tools, remote wrappers) into declarative workflows. The framework handles graph execution, I/O routing, parallelism limits, and run persistence.


Quick Start

pip install agentork                    # or: pip install -e ".[dev]" from a clone
agentork validate -c tests/patterns/workflows/starter/01-sequential.yaml
agentork run -c tests/patterns/workflows/starter/01-sequential.yaml \
  --inputs '{"workspace": "/tmp/agentork-demo"}'

Open the monitor (optional) — same workflow as above:

agentork run -c tests/patterns/workflows/starter/01-sequential.yaml \
  --inputs '{"workspace": "/tmp/agentork-demo"}' \
  --dashboard
# or after any run: agentork dashboard  →  http://127.0.0.1:7979/monitor/

Requires Python 3.10+. Run artifacts (framework state) live under .agentork/runs/{run_id}/. Your agents write business output wherever workspace points in --inputs.

From source (contributors):

git clone https://github.com/agentork/agentork.git
cd agentork
pip install -e ".[dev]"
pytest -v

How It Works

  workflow.yaml          agents: external commands (scripts, CLIs)
        │                         │
        ▼                         ▼
  ┌─────────────┐    subprocess    ┌──────────────┐
  │  Workflow   │ ───────────────► │  AgentOrk    │
  │  engine     │ ◄─────────────── │  run state   │
  └─────────────┘   JSON in/out    └──────────────┘
        │
        ▼
  .agentork/runs/{run_id}/   manifest, logs, node I/O
  1. You define nodes (steps) and edges (order) in YAML, plus an agents map (command, cwd, timeout).
  2. AgentOrk executes the workflow graph, resolves inputs from upstream / state / files, and runs each node as a subprocess.
  3. Stdout JSON becomes node output; optional parallelism fans out over a tasks list (orchestrator pattern).
  4. loops / evaluator_optimizer connect generator ↔ verifier until a pass condition or max iterations.

Workflow patterns

PatternWhen to use
sequentialLinear pipeline — A → B → C
parallelFan-out / fan-in — one node to many workers, then merge
evaluator_optimizerDraft + review loop until quality gate passes
compositeMix sequential, parallel, and loops with explicit edges

Collaboration patterns

Metadata on nodes (role) and top-level collaboration.pattern document intent. Complex topologies use explicit graph.edges in composite workflows.

PatternTypical layout
generator_verifierGenerate → verify → retry
orchestrator_subagentOrchestrator emits tasks → parallel subagents
agent_teamsLead + worker pool
message_busPublish / subscribe style steps
shared_stateAgents read/write shared files under workspace

Learn more: Architecture · Pattern starter YAMLs · 3×5 matrix tests


Features

FeatureDetails
YAML workflowsNodes, edges, I/O sources, output targets, parallelism
Multi-agentBring your own scripts or tools as node commands
3 workflow modesSequential, parallel, evaluator-optimizer (+ composite)
5 collaboration modesGenerator-verifier, orchestrator-subagent, teams, bus, shared state
Parallel dispatchparallelism.limit with max or fixed batching
File run statemanifest.json, per-node input.json / output.json, logs
Event streamevents.jsonl for monitor UI and debugging
CLIvalidate, run, serve, dashboard
HTTP APIStart/cancel runs, optional AGENTORK_API_KEY
Monitor UILive run timeline at /monitor
Claude Code pluginSkill to drive agentork from the editor
ExamplesMock agents, combined pipeline, ai-pipeline integration demo

Usage

CLI reference

CommandDescription
agentork validate -c workflow.yamlValidate YAML against schema
agentork run -c workflow.yamlExecute workflow
agentork run -c workflow.yaml --inputs '{"workspace":"/tmp/ws"}'Pass initial state / workspace
agentork run -c workflow.yaml --dashboardRun and open monitor
agentork serve --port 8080HTTP API + embedded monitor
agentork dashboardMonitor-only server (default port 7979)

Use in your project

After pip install agentork, keep the workflow in your repo (not inside the AgentOrk package). A typical layout:

/path/to/my-project/
├── agentork.yaml
├── scripts/
│   └── my_agent.py
└── .agentork/runs/          # created on first run (add to .gitignore)

agentork.yaml at the project root:

name: my-project
workflow:
  pattern: sequential
collaboration:
  pattern: orchestrator_subagent

graph:
  nodes:
    - {id: extract, agent: extract}
    - {id: validate, agent: validate}
    - {id: store, agent: store}

agents:
  extract:
    command: ["python3", "scripts/extract.py"]
    cwd: "."
    timeout_sec: 300
  validate:
    command: ["python3", "scripts/validate.py"]
    cwd: "."
    timeout_sec: 300
  store:
    command: ["python3", "scripts/store.py"]
    cwd: "."
    timeout_sec: 300

Each step uses its own agents entry (sequential pipelines usually map one node → one command). Scripts should read AGENTORK_INPUT_FILE and print JSON to stdout (see examples/scripts/mock_agent.py).

Run from the project root (cwd: "." is relative to where you invoke agentork):

cd /path/to/my-project

agentork validate -c agentork.yaml

agentork run -c agentork.yaml \
  --inputs '{"workspace": "/path/to/my-project"}'

Framework state is written under ./.agentork/runs/{run_id}/ in that directory; your agents write business output under workspace. For another project, use a different directory and its own agentork.yaml.

YAML configuration

Minimal files need name, workflow.pattern, collaboration.pattern, graph, and agents. Optional: version, state, graph.edges, input / output, parallelism, loops, evaluator_optimizer.

Top-level

FieldMeaning
nameWorkflow name (required)
workflow.patternHow edges are built: sequential, parallel, evaluator_optimizer, composite
collaboration.patternCollaboration semantics label (e.g. orchestrator_subagent, generator_verifier)

graph — execution graph

FieldMeaning
graphBlock defining steps and (optionally) edges
nodesList of steps to run
nodes[].idUnique node ID — used for edges, logs, AGENTORK_NODE_ID (may differ from agent)
nodes[].agentKey into agents: — which command config to run
nodes[].roleOptional role label (orchestrator, subagent, generator, …)
graph.edgesOptional from / to (node id or list). Omitted in sequential → auto chain A → B → C

agents — how each step runs

FieldMeaning
agentsMap of agent id → subprocess settings
agents.<id>Must match nodes[].agent (e.g. worker)
commandargv list, e.g. ["python3", "scripts/my_agent.py"]
cwdWorking directory for the subprocess; "." = directory where you run agentork
timeout_secMax seconds per invocation (default 300); -1 = no timeout

The subprocess reads JSON from AGENTORK_INPUT_FILE and should print JSON on stdout. workspace / source_dir from --inputs are injected into node input when configured.

Example (matches 01-sequential.yaml):

graph:
  nodes:
    - {id: extract, agent: extract}     # node id → agents.extract
    - {id: validate, agent: validate}
    - {id: store, agent: store}

agents:
  extract:
    command: ["python3", "scripts/extract.py"]
    cwd: "."
  validate:
    command: ["python3", "scripts/validate.py"]
    cwd: "."
  store:
    command: ["python3", "scripts/store.py"]
    cwd: "."

Parallel workflows may use different node ids with separate agents keys even when the command is the same — see 02-parallel.yaml.

Full schema: docs/en/yaml-reference.md.

Workflow templates

Starters: docs sit next to each YAML in tests/patterns/workflows/starter/.

More: examples/ · docs/zh/workflow-templates.md (index)

agentork run -c tests/patterns/workflows/starter/01-sequential.yaml \
  --inputs '{"workspace": "/tmp/agentork-demo"}'

workspace and source_dir from --inputs are injected into nodes automatically when configured.

HTTP API

export AGENTORK_AUTH_DISABLED=1   # dev only; or: export AGENTORK_API_KEY=your-secret
agentork serve --port 8080
MethodPathDescription
POST/api/v1/runsStart a run
GET/api/v1/runs/{run_id}Status
POST/api/v1/runs/{run_id}/completeMark complete
POST/api/v1/runs/{run_id}/cancelCancel

See docs/en/api.md.

Claude Code plugin

/plugin marketplace add <your-org>/AgentOrk

See claude-plugin/ and docs/en/plugin.md.


Project structure

agentork/
├── src/agentork/           # Framework (config, graph, engine, api, monitor)
├── examples/               # Sample workflow YAML + mock scripts
├── tests/                  # Pytest + pattern matrix + starter YAMLs
├── docs/en/ · docs/zh/     # Documentation
├── claude-plugin/          # Claude Code marketplace plugin
├── pyproject.toml
├── README.md · README_zh.md
└── LICENSE

Configuration

Environment variables

VariableDescriptionDefault
AGENTORK_API_KEYAPI auth for agentork serve—
AGENTORK_AUTH_DISABLEDSet 1 to disable API key checkoff
AGENTORK_MONITOR_PORTPort for agentork dashboard7979
AGENTORK_RUNS_ROOTMonitor scans this directory for runs.agentork/runs
AGENTORK_MONITOR_NO_BROWSERSet 1 to skip opening browseroff
AGENTORK_RUN_IDSet by runner — current run id—
AGENTORK_NODE_IDSet by runner — current node id—
AGENTORK_INPUT_FILEJSON input path for agent subprocess—
AGENTORK_TASK_IDParallel sub-task id when applicable—

Agent subprocesses should read AGENTORK_INPUT_FILE and print JSON to stdout (see examples/scripts/mock_agent.py).


Documentation


Contributing

git clone https://github.com/agentork/agentork.git
cd agentork
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest -v
ruff check src tests

See CONTRIBUTING.md and SECURITY.md. Changelog: CHANGELOG.md.


License

MIT — see LICENSE.

pip install agentork · declarative workflows · orchestrate multi-agent runs

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 11

Native requirements
11 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
fastapi
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
fastapi>=0.110runtime
httpx
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
httpx>=0.27runtime
langchain-core
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
langchain-core>=0.3runtime
langgraph
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
langgraph>=0.3runtime
pydantic
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pydantic>=2runtime
pyyaml
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pyyaml>=6runtime
typer
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
typer>=0.12runtime
uvicorn
Environment
{
  "extras": "standard",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
uvicorn[standard]>=0.27runtime
pytest-asyncio
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pytest-asyncio>=0.23; extra == "dev"runtime
pytest
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pytest>=8; extra == "dev"runtime
ruff
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
ruff>=0.4; extra == "dev"runtime

Distribution files

2 collected
agentork-0.1.0-py3-none-any.whl

bdist_wheel · 46.32 KB · Python py3

Source file
agentork-0.1.0.tar.gz

sdist · 52.71 KB · Python source

Source file

Repository

PENDING
agentork/agentork

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:49 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:fa20fabeafb2b9942128e86b5bfb1a920c8d155fc38c304b842c3becfe56d5df

Other collected versions

View all collected versions →