Developer Setup

This page is for contributors and technical users. If you only want to run Praetor locally, use the one-line installer in the main README.

Baseline

Praetor uses a repo-local Pixi environment as the official development baseline.

Install the Development Environment

pixi install

Run the App from Source

pixi run app-serve

Open:

On first launch, Praetor guides you through owner account creation, model/API connection, workspace selection, and approval rules.

For a fresh local reinstall, stop Praetor and remove the state directory you started it with. If you did not set PRAETOR_STATE_DIR, the default local state is /tmp/praetor-app-state.

Key Commands

pixi run py
pixi run check
pixi run py-compile
pixi run app-import-check
pixi run web-import-check
pixi run worker-import-check
pixi run bridge-import-check
pixi run runtime-import-check

Smoke Tests

pixi run app-smoke
pixi run app-ui-smoke
pixi run app-auth-smoke
pixi run app-security-smoke
pixi run app-api-smoke
pixi run app-fallback-smoke
pixi run stack-smoke
pixi run web-build
pixi run office-smoke
pixi run planner-smoke
pixi run organization-smoke
pixi run safety-policy-smoke
pixi run telegram-smoke

What they cover:

Release Readiness

Before a release candidate, run:

pixi run release-readiness

This writes docs/RELEASE_READINESS_REPORT.md and runs the release gates for docs, API import/route count, frontend typecheck, frontend build, app vertical smoke, API surface smoke, UI smoke, and packaging smoke.

Before publishing, also do a manual mission detail pass:

CEO Planner

Praetor's product runtime does not use a deterministic CEO. CEO chat requires either an API runtime with a real provider key or a subscription executor. If AI is missing or unavailable, CEO chat fails visibly instead of generating a fake response.

PRAETOR_CEO_PLANNER_PROVIDER=openai
PRAETOR_CEO_PLANNER_MODEL=gpt-4.1-mini
OPENAI_API_KEY=...

The planner emits explicit action types for mission creation, approvals, memory, briefings, staffing, agent creation, delegation, escalation, closeout, and standing orders. LLM output is parsed as JSON, validated, and sanitized before side effects. The internal offline planner exists only for smoke tests and schema checks.

AI Organization Lifecycle

Praetor models AI-to-AI work as a company operating system:

Run praetor-execd

Start the bridge with the repo environment:

export PRAETOR_EXECD_CONFIG=/absolute/path/to/config.yaml
export PRAETOR_EXECUTOR_BRIDGE_TOKEN="$(python -c 'import secrets; print(secrets.token_urlsafe(32))')"
pixi run bridge-serve

Bridge checks:

pixi run bridge-smoke
pixi run bridge-e2e
pixi run claude-e2e

Important Directories