Skip to content

What is PRX?

PRX is a persistent AI orchestration daemon written in 169K lines of Rust. It is not a wrapper around a single LLM. It is a continuously running process that receives messages from 19 channels, routes them through an intelligent model selector, delegates work to sub-agents, and evolves its own behavior over time.

In the OpenPRX pipeline (Plan -> Think -> Build -> Ship -> Protect), PRX occupies the Think stage. It is the central nervous system: every AI-driven decision flows through PRX.

OpenPR (Plan) Fenfa (Ship)
│ ▲
▼ │
PRX ── sub-agents ── prx-memory ── CI ───┘
WAF + SD (Protect)

OpenPR dispatches tasks. PRX decides which model handles them, manages conversation history, enforces security policy, and delegates subtasks to autonomous sub-agents. Results flow back to OpenPR and downstream stages.

SubsystemPurpose
Channels19 messaging integrations (Signal, WhatsApp, Telegram, Discord, Slack, Matrix, etc.)
Providers14 LLM backends with unified tool-calling abstraction
RouterIntelligent model selection: intent classification, Elo rating, KNN semantic routing, Automix
Sub-agentsThree-tier delegation: synchronous named agents, async fire-and-forget sessions, management commands
Self-evolutionAutonomous improvement of prompts, memory, and strategies with safety gates
Security5-layer policy pipeline, approval workflows, sandbox enforcement (Docker, Firejail, Bubblewrap, Landlock, WASM)
PluginsWASM-based plugin system with wasmtime sandboxing
MCP ClientConnects to external MCP servers to consume tools
Remote NodesDistributed execution via prx-node with H2 transport and device pairing
  1. A message arrives on any channel (Telegram, Signal, CLI, webhook, etc.)
  2. PRX maintains per-sender conversation history (last 50 messages) with automatic compaction
  3. The Router classifies intent, scores candidate models, and selects the best provider
  4. The selected LLM generates a response, potentially invoking tools
  5. If the task requires delegation, sub-agents are spawned (sync or async)
  6. The self-evolution system records outcomes for periodic analysis and improvement
  7. Security policy is enforced at every layer: command execution, file access, cost limits
Terminal window
# Clone and build
git clone https://github.com/openprx/prx && cd prx
cargo build --release
# Configure at least one provider and one channel
cp config.example.toml config.toml
# Edit config.toml: set your API keys and channel credentials
# Run the daemon
./target/release/prx --config config.toml
# Or use the CLI channel for immediate interaction
./target/release/prx --cli

PRX reads its configuration from a TOML file. At minimum, you need one provider (e.g., Anthropic with an API key) and one channel (e.g., CLI for local testing). See the subsystem pages for detailed configuration.