Skip to content →
OperationsAI and Claude
GitHub
Operations

AI and Claude

Configure structured Claude decisions and understand the deterministic fallback path.

What AI does

AI is used in two bounded places: generating organic inbound messages and selecting actions for pending organic decisions. Both paths request structured JSON and validate it before applying anything to the world.

The evaluator prompt includes the scenario, practice, actor role, care context, temperament, latest message, recent appointments, available actions, and the recipient actor being role-played.

Requirements

  1. Install and authenticate the Claude CLI

    The default command is claude. Praxis invokes it as a local subprocess rather than calling a hosted SDK directly.

  2. Enable AI in the world

    Set aiEnabled to true. Use evaluatorMode: "ask-ai" when organic decisions should resolve automatically.

  3. Run a tick

    The adapter gives each generation a schema, budget, timeout, no tools, no session persistence, and a non-interactive permission mode.

Configuration

Environment
PRAXIS_CLAUDE_COMMAND=claude
PRAXIS_CLAUDE_MODEL=haiku
PRAXIS_CLAUDE_MAX_BUDGET_USD=0.05
PRAXIS_CLAUDE_TIMEOUT_MS=30000

The tick adapter currently caps its own message and decision calls at $0.04 and 30 seconds. The environment budget is the default for callers that do not provide an explicit budget.

Fallback behavior

If Claude is disabled, unavailable, times out, exceeds its budget, returns invalid JSON, or chooses an unavailable action, Praxis keeps the world valid.

  • Unavailable actions become no-action.
  • Generation errors use the deterministic evaluator and preserve the error in the decision note.
  • Booking intent becomes a booking request.
  • Other actionable messages create specific follow-up work with priority based on intent and risk.