Skip to content →
Core workflowsMessages and decisions
GitHub
Core workflows

Messages and decisions

Follow inbound messages through delivery, evaluation, replies, and concrete operations.

Message flow

01
Queue

Organic activity or an API call creates an incoming message.

02
Deliver

A tick assigns actors and moves due messages into history.

03
Evaluate

Messages that need action create an organic decision request.

04
Act

The decision sends a reply, books, changes state, adds a note, or does nothing.

05
Execute

Outbound work runs through local-sim, mock-random, or a connector.

A profile with a pending decision waits before another message is delivered. This keeps a single actor from accumulating contradictory unresolved actions.

Channels and intents

DimensionValues
Directionprofile-to-practice, practice-to-profile, world-to-profile
Channelsms, email, phone, portal, system
Intentbooking, triage, admin, follow-up, emotion, clinical-update, world
Sourcerandom-profile, practice-api, test-user, manual, world, agent

Directions also determine default actor assignment. Profile-to-practice messages select an affiliated clinician or practice staff member; practice replies target the profile; world messages target the affected actor directly.

Evaluation modes

Deterministic

A rules-based evaluator converts booking intent into a booking request and other actionable messages into concrete follow-up tasks.

Ask human

The request remains visible for human review. Submit an evaluator response to /api/simulation/organic when a person has chosen the action.

Ask AI

Claude returns schema-constrained JSON. Praxis validates the action against the request’s available actions and falls back deterministically if generation fails.

Decision actions

FieldMeaning
send-messageCreate an in-character reply and optionally follow-up work
create-appointmentQueue a booking request through the booking substrate
change-profile-stateApply the response stress delta and create follow-up work
add-noteRecord operational reasoning and create follow-up work
no-actionResolve the request without creating an operation or task
Inject a message
curl -X POST http://localhost:3000/api/simulation/messages \
  -H 'Content-Type: application/json' \
  -d '{
    "profileId":"profile_…",
    "direction":"profile-to-practice",
    "channel":"sms",
    "intent":"booking",
    "body":"Could I come in tomorrow afternoon?"
  }'