Skip to main content

Overview

OpenAgents uses a Rust DSPy implementation called dsrs as the compiler layer for agent behavior. Instead of hardcoding prompts, Autopilot expresses behavior as typed Signatures and Modules that can be evaluated and optimized over time.

Why DSPy (dsrs) Exists

  • Turns prompts into typed contracts with strict parsing
  • Makes decision logic auditable and replayable
  • Enables optimization loops using real outcome data
  • Separates policy (what to do) from execution (how to do it)

Core Primitives

  • Signatures: typed input/output contracts for model calls
  • Modules: composable workflows built from signatures
  • Tools: structured world interactions with receipts and schemas
  • Adapters: provider-specific formatting and parsing
  • Optimizers: MIPROv2, COPRO, GEPA and Pareto search
  • Metrics: utility and verification-driven scoring

Where It Lives

  • DSPy runtime: crates/dsrs/
  • Adjutant pipelines: crates/adjutant/src/dspy/
  • Signature registry: crates/dsrs/src/signature_registry.rs

How It Appears in Autopilot

  • Plan Mode signatures drive structured planning.
  • Guidance Modules use DSPy decisions between turns.
  • Signature-driven UI renders each step in the Effuse canvas.

Learn More