Minimal scaffold for a manager-orchestrated, multi-agent research system where each role can run as its own Codex session.
- Manager-driven DAG:
plan -> retrieve -> extract -> verify -> write - Role isolation via per-role
AGENT.md - Strict JSON handoffs between stages
- Simple schema checks before accepting agent output
configs/agents/*/AGENT.md: role instructions for Codex sessionsschemas/*.json: JSON contracts each role must returnsrc/research_system/manager.py: orchestration DAGsrc/research_system/demo.py: local demo with mock workerssrc/research_system/codex_sessions.py: adapter for real Codex role sessions
python -m src.research_system.demoThe demo runs the full workflow with mock outputs and prints the final report JSON.
Replace mock workers in src/research_system/demo.py with CodexRoleSession instances.
Each role points to its own configs/agents/<role>/AGENT.md, and the manager contract checks remain the same.
This mode runs every role using Codex CLI (codex exec) and writes file-based handoffs under runs/<job_id>/.
Windows PowerShell:
.\run_research.ps1 -Goal "Compare multi-agent research architectures for production reliability"If Codex CLI is not on PATH in your Python environment:
.\run_research.ps1 -Goal "..." -CodexBin "C:\full\path\to\codex.cmd"Direct Python command:
python -m src.research_system.run_codex_cli --goal "Compare multi-agent research architectures for production reliability"Or pass explicit binary:
python -m src.research_system.run_codex_cli --goal "..." --codex-bin "C:\full\path\to\codex.cmd"Artifacts:
runs/<job_id>/in/<role>.json: input payload given to each roleruns/<job_id>/out/<role>.json: role output JSONruns/<job_id>/logs/<role>.log: Codex CLI stdout/stderr logsruns/<job_id>/final_report.json: final validated report
This mode is designed for long-running workloads.
- Start one worker per role:
.\run_workers.ps1- Submit a job:
python -m src.research_system.runtime.submit_job --goal "Compare multi-agent research architectures for production reliability" --db runs/runtime.sqlite3- Check status:
python -m src.research_system.runtime.status --job-id <job_id> --db runs/runtime.sqlite3When complete, final_report_path points to runs/<job_id>/final_report.json.
Run full queue orchestration without Codex calls:
python -m src.research_system.runtime.mock_run --goal "test runtime pipeline"Or run mock workers in separate terminals/windows:
.\run_workers.ps1 -Mock