How sapientinc/praxist works
Purpose and entry points
Praxist is a Python 3.11+ autonomous R&D orchestrator for already-runnable, measurable task projects. It manages parallel agents, task-defined evaluation, evidence, scheduling, and multi-generation synthesis; the task project remains authoritative for domain code and validity.
Primary CLI dispatch is praxist/__main__.py, with run invocation in praxist/run.py and operational commands in praxist/cli/start.py, praxist/cli/resume.py, and praxist/cli/monitor.py. Codex/Claude-facing skills provide the common takeover/onboarding interface under skills/.
Project and configuration boundary
A task project supplies task.yaml, prompts, roles, evaluator definitions, assets, and audit rules. Core task loading and compatibility are in praxist/core/task_project.py and praxist/task_spec.py; run settings, credential handling, and persisted state are separated in praxist/core/run_config.py, praxist/core/credentials.py, and praxist/core/storage.py.
Templates establish this contract, e.g. templates/tasks/template/task.yaml, templates/tasks/template/evaluations/pareto_tiered/evaluation.yaml, and templates/tasks/template/roles/chair/role.yaml. This isolates Praxist’s generic orchestration from scientific assumptions and executable evaluation owned by a task.
Plugin registry and runtime integrations
The registry resolves extensible implementations for agent runtimes, model providers, tools, roles, budgets, panel topologies, evaluations, and workflow stages: praxist/core/registry.py, praxist/core/runtimes.py, and praxist/core/tool_servers.py.
Built-in runtime adapters target Claude SDK and Codex SDK at praxist/plugins/agent_runtimes/claude_sdk/adapter.py and praxist/plugins/agent_runtimes/codex_sdk/adapter.py. Model-provider adapters include Anthropic, OpenAI-compatible APIs, OpenRouter, and DeepSeek aliases under praxist/plugins/model_providers/. Tool plugins expose MCP/stdio-backed capabilities such as browser, Brave Search, arXiv, literature lookup, and local system tools.
Research-loop orchestration
The central workflow stage is praxist/plugins/workflow_stages/research_loop/stage.py, with lifecycle wiring in praxist/plugins/workflow_stages/research_loop/lifecycle.py and run coordination in backend/orchestrator_runtime.py. It creates generations, prepares prompts and runtime environments, dispatches peer work, waits for events, handles stop/resume, and produces run summaries/reports.
The principal control flow is: task contract + resolved plugins/config → run lifecycle → peer/panel generation work → candidate experiments → normalized findings/evidence → selection and next-generation agenda → final report or resumable state.
Agents, panels, and generation planning
Peers operate through agent abstractions and generation loops in backend/agent.py, backend/generation_loop.py, and backend/pi_agent.py. Multi-PI panel execution, agenda validation, cross-review, and chair arbitration are isolated in backend/multi_pi/panel_runner.py, backend/multi_pi/agenda_validator_v2.py, and backend/multi_pi/chair_arbiter.py.
Optional exploration controls include QD/DIG cohort allocation, validation, selection, and write gates in backend/dig/cohort_allocator.py, backend/dig/selection.py, and backend/dig/write_gate.py. These form a decision boundary before generated plans become durable research actions.
Evaluation, evidence, and durable memory
Task evaluators execute candidates; their results become structured findings and retention lanes. Relevant boundaries are backend/experiment_exec.py, backend/findings_collection.py, and backend/frontier.py. Baseline provenance/caching and effective configuration are maintained in backend/baseline_cache.py and backend/effective_config.py.
Research memory converts validated outputs into cards, evidence packs, and specialized ledgers rather than relying on prompt history: backend/research_memory/card_builder.py, backend/research_memory/evidence_pack_builder.py, and backend/research_memory/ledgers/claim_ledger.py. This evidence feeds synthesis and supports replay/provenance.
Resources, infrastructure, and telemetry
A central scheduler admits and monitors experiments based on resource pressure: backend/resource_scheduler.py, backend/experiment_scheduler.py, and backend/gpu_governor.py. RunPod and S3 integration are available through praxist/infrastructure/runpod.py and praxist/infrastructure/s3_utils.py; S3 sync is a research-loop hook.
Optional product-usage telemetry is a separate client/collector service, not task data collection: praxist/product_usage/client.py, praxist/product_usage/collector.py, and services/product_usage/deploy/compose.yml. It uses PostgreSQL migrations and a containerized deployment surface.
Main entry points: stage.py Research-loop stage · run.py Run invocation · registry.py Plugin registry · task_project.py Task loading
Components 19
Task Project
Domain contract and executable evaluation remain task-owned.
- Task contract · Supplies prompts, roles, evaluators, assets, and audit rules.
templates/tasks/template/task.yaml
Praxist Core
- CLI dispatch
praxist/__main__.py - Run invocation
praxist/run.py - Task loading
praxist/core/task_project.py - Run settings & state · Separates settings, credentials, and persisted resumable state.
praxist/core/run_config.py - Plugin registry · Resolves runtimes, providers, tools, roles, budgets, panels, evaluations, and stages.
praxist/core/registry.py - Agent runtime adapters
praxist/plugins/agent_runtimes/claude_sdk/adapter.py
Research Workflow
- Research-loop stage · Owns lifecycle wiring, stop/resume, summaries, and reports.
praxist/plugins/workflow_stages/research_loop/stage.py - Run coordinator
- Peer generation loop · Prepares environments and dispatches parallel peer work.
- Multi-PI panel · Validates agendas, cross-reviews work, and lets a chair arbitrate.
- DIG decision gate · Optional allocation, validation, selection, and write controls.
Evaluation & Memory
- Candidate experiments · Executes task-defined candidates.
- Normalized findings · Structures evaluator results into retention lanes.
- Research frontier
- Research memory · Maintains durable claims and provenance rather than prompt history.
Infrastructure
- Experiment scheduler · Schedules experiments under resource pressure and GPU governance.
- RunPod & S3 · Provides remote execution support and research-loop S3 sync.
praxist/infrastructure/runpod.py - Product usage telemetry · Optional product-usage collection, separate from task data.
praxist/product_usage/client.py
Connections 25
- CLI dispatch → Run invocation: invokes
- Run invocation → Task loading: loads task
- Task contract → Task loading: defines contract
- Run invocation → Run settings & state: reads and persists
- Run invocation → Plugin registry: resolves extensions
- Task loading → Research-loop stage: task definition
- Run settings & state → Research-loop stage: settings and resume state
- Plugin registry → Agent runtime adapters: selects runtime
- Plugin registry → Research-loop stage: selects stage
- Research-loop stage → Run coordinator: coordinates run
- Run coordinator → Peer generation loop: creates generations
- Agent runtime adapters → Peer generation loop: executes peers
- Peer generation loop → Multi-PI panel: submits plans and reviews
- Multi-PI panel → DIG decision gate: optional exploration control
- Multi-PI panel → Experiment scheduler: approved work
- DIG decision gate → Experiment scheduler: durable action approval
- Experiment scheduler → Candidate experiments: admits and monitors
- Task contract → Candidate experiments: task evaluator
- Candidate experiments → Normalized findings: evaluation results
- Normalized findings → Research frontier: retained candidates
- Normalized findings → Research memory: validated evidence
- Research memory → Peer generation loop: evidence for synthesis
- Research frontier → Peer generation loop: next-generation agenda
- Research-loop stage → RunPod & S3: S3 sync hook
- Product usage telemetry → Research-loop stage: optional usage events