SSyncropel Docs

Body kinds

Reference for the built-in `body.kind` values you can subscribe to and query, written during dispatch, inference, work loops, and sharing.

Records under the older `core.agent.*` names

Goal-structured work is recorded under the core.work.* family (loop, turn, tool_call, tool_result, loop_outcome, loop_cancel, plan, criteria, evaluation, turn_judgment, note, compensation, artifact, coercion). Records written under the older core.agent.* names can still be read and queried. New records must use the core.work.* names; the old names are refused.

See the unified body-kinds list below.

body.kind is a string in scope.category.entity[.version] format that says what shape record.body has. Built-in kinds are documented here; user-extension kinds (anything outside the core.* and syncropel.* reserved scopes) follow the same grammar but are defined by you.

For the kind grammar itself (3 vs 4 segments, allowed characters, reserved scopes, version semantics), see the body.kind manifest guide.

The manifest is the full list of kinds; this page covers the common ones

This page documents the kinds most worth knowing by hand. The complete, machine-readable list of every built-in kind is published as sdks/manifest.json (also in the @syncropel/config package). It always matches what the server accepts. For the exact fields of a kind, or a kind not listed here, use the manifest. This page lists only the kinds you are most likely to use directly.

The conversational Faculty family

Conversational replies work the same for every assistant: the kind says which step of the conversation a record is, and the record's actor says which assistant produced it. A new Faculty can hold conversations without any new kinds.

KindStep
core.faculty.call.v1The outbound model call for a conversational turn.
core.faculty.response.v1The reply: content, stop_reason, model_used, usage (all four token dimensions), cost_usd, and a context block (below).
core.faculty.error.v1The turn failed; the error is saved as a record, not just a log line.
core.faculty.cancelled.v1The user cancelled a reply in progress.

What a reply's context says

A reply that came from a work loop (an escalated turn, a thread default that runs a work loop, or the answer returned after a paused run was resumed) carries a context block your client can read instead of parsing text:

FieldMeaning
context.source_threadThe run's own thread. Its turns, tool calls and asks live there.
context.escalation.statusparked (the run is paused; the reply is the question it asked, and awaiting names it), ran, refused or unavailable (with a reason).
context.escalation.loop_cost_usdThis reply's share of the run's cost: everything up to the pause, or only the spend after resuming when resumed is true.
context.escalation.resumedtrue on the reply sent after a paused run was answered and finished.
context.reportThe verb the run closed with (done, blocked, surprised, needs_you, rejected). The REPORT: line itself is never shown to the person.
context.wordlesstrue when the model returned no words and the content is a one-line stand-in.

Cost. A run that pauses and then resumes produces two replies. The first carries the run's cost up to the pause; the second carries only what the resume spent. Together they equal the run's total. Show one reply's cost, or the run's, never both added together. On an escalated reply, usage.cost_usd also includes the single-shot call that decided to escalate; loop_cost_usd is the run alone.

Records under the older core.scribe.* and core.guide.* kinds can still be read and queried, but new records use the Faculty family.

Kinds emitted by dispatch

Every spl task dispatch (or any other dispatch path) emits a sequence of records that lets you reconstruct what happened from the records alone, without reading log files. Subscribe to these kinds to build live dashboards, or query them to answer "what did this dispatch cost?", "why did it fail?" and "how did it end?"

syncropel.dispatch.stream_event.v1

One record for each assistant event from the dispatched agent. Carries the tokens for this event and running totals for the dispatch. If the agent crashes before its final result event, you can still work out the tokens used and the partial cost.

{
  "kind": "syncropel.dispatch.stream_event.v1",
  "topic": "stream_event_seen",
  "event_type": "assistant",
  "tokens_in_delta": 1247,
  "tokens_out_delta": 89,
  "tokens_in_accum": 8431,
  "tokens_out_accum": 1102,
  "cost_usd_delta": 0.02145,
  "turn_id": "turn_abc123"
}

syncropel.dispatch.session.v1

Saves the agent's own session ID, taken from its first event. Written once per dispatch. It links Syncropel records to the agent's own session log (for Claude Code, ~/.claude/projects/<slug>/<session_id>.jsonl), which holds its tool uses, tool results and full message history. spl task diagnose uses this record.

{
  "kind": "syncropel.dispatch.session.v1",
  "topic": "agent_session_captured",
  "session_id": "abc-123-...",
  "project_cwd": "/home/dev/my-project",
  "project_slug": "-home-dev-my-project",
  "model": "claude-opus-4",
  "turn_id": "turn_abc123"
}

syncropel.dispatch.subprocess_exit.v1

Written when the agent process ends, however it ended. Records the plain facts: process ID, exit code, signal, duration, and the last event seen.

{
  "kind": "syncropel.dispatch.subprocess_exit.v1",
  "topic": "subprocess_exited",
  "pid": 12345,
  "exit_code": 0,
  "signal": null,
  "duration_ms": 18400,
  "last_stream_event_type": "result",
  "last_stream_event_clock": 47,
  "turn_id": "turn_abc123"
}

syncropel.dispatch.complete.v1

The terminal completion record. Carries the usual completion fields plus three values describing how the dispatch ended. Use these to tell "succeeded" from "the agent crashed" from "hit the time limit" in one query.

{
  "kind": "syncropel.dispatch.complete.v1",
  "topic": "dispatch_complete",
  "success": true,
  "cost_usd": 0.34,
  "cost_source": "result_event",
  "completion_codepath": "result_event",
  "failure_reason": null,
  "duration_ms": 18400,
  "turn_id": "turn_abc123"
}

cost_source (where the final cost_usd figure came from)

ValueMeaning
result_eventCame from the final result event (most reliable).
accumulated_from_eventsAdded up from per-event usage (used when no result arrived).
unknownNo figure available. The stream ended before any cost signal.

completion_codepath (which exit branch fired)

ValueMeaning
result_eventThe agent sent its final result event. This is the normal case.
line_timeoutper_line_timeout was reached: the agent went silent for too long.
budget_deadlineThe overall time limit (budget_deadline) was reached.
stream_eof_fallbackOutput closed without a result event: the agent exited or its output broke.

failure_reason (null on success)

ValueMeaning
nullSuccess.
result_missingOutput closed before a result event arrived.
subprocess_exited_nonzeroThe agent exited with an error after closing its output.
line_timeoutper_line_timeout fired.
budget_exceededThe overall time limit was reached.
read_errorAn error reading the agent's output mid-dispatch.
result_reported_errorresult event arrived but reported is_error: true.

See the dispatch observability guide for example queries against these records, including spl task diagnose <id> and spl logs --trace-id.

Kinds emitted by inference

When an inference query cannot produce an answer, a KNOW record is saved on the query thread. Every failure produces one infer.error.v1 record with a stable body.code.

infer.error.v1

{
  "kind": "infer.error.v1",
  "code": "quorum_not_met",
  "message": "Required min_quorum=3 valid responses; received 2.",
  "details": {
    "min_quorum": 3,
    "valid_responses": 2,
    "total_dispatched": 5
  },
  "partial_responses": ["rec_abc...", "rec_def..."]
}

details carries code-specific context (projected cost, elapsed seconds, missing field, etc.). partial_responses carries the IDs of DO records collected before a post-dispatch failure, so you can inspect what the responders did manage to produce.

code taxonomy (10 values)

Each code matches a step of the query. Every failure produces exactly one of these.

CodeStepMeaning
invalid_query1Query body failed validation: missing required field, shape mismatch, unknown combine function.
no_candidates2The filters left no candidates. There were responders, but none matched.
no_relevant_candidates3Candidates existed but every candidate scored below the relevance threshold (top_k empty).
cost_budget_exceeded4 (pre-dispatch)Projected total cost exceeded side_effects.max_cost_usd (or the namespace default).
responder_unavailable4–5One or more selected responders returned dispatch errors before any response could be collected.
latency_timeout5The side_effects.max_latency_secs deadline elapsed before min_quorum valid responses arrived.
quorum_not_met6Valid (non-error) responses were fewer than fold.min_quorum after filtering error-shaped DOs.
fold_failed7Combining the answers failed (missing evaluator, failed expression, and so on).
answer_shape_mismatch8The combined answer did not satisfy answer_shape.kind / required_fields / schema_ref.
obligation_conflict8Two obligations conflicted and the query's strategy could not merge them.

Codes are written in snake_case, as shown. Match on body.code to route or filter.

Kinds emitted by the work loop

Every run of a work loop (spl work-loop, POST /v1/work/loop, or a chat assistant handing one a goal with @agent <goal>) emits a sequence of records that lets you reconstruct what the loop saw, what it tried, what tools it called, and how it ended, all from the records. Subscribe to these on the loop's thread (or query them) to build live progress views and later reviews.

Loop lifecycle

  • core.work.loop.v1: the loop record itself. Carries the goal, plan level, limits (max_turns, wall_clock_secs, token_budget), and any per-loop task_budget.
  • core.work.turn.v1: one turn of the loop. Sequenced by body.turn_index; carries the prompt, model call summary, and per-turn cost.
  • core.work.tool_call.v1 + core.work.tool_result.v1: every tool invocation and its result. Each tool call is checked against permissions. The result carries success or a failure code. A failure is always returned to the agent as a result so that its next turn can correct itself.
  • core.work.loop_outcome.v1: the terminal record. body.outcome is one of completed, failed, cancelled, blocked, max_turns, budget_exhausted, guardrail_halt, or awaiting_actor (paused). Some outcomes carry extra details: budget_exhausted includes budget_kind; guardrail_halt includes tool, args_hash, and count.

Halts and signals

  • core.work.coercion.v1: paired with a blocked outcome. Names the structured reason (tool_unavailable / ambiguous_goal / precondition_failed / decision_required / input_invalid / internal_error), a narrative field, and where relevant a missing_tools array or decision_request_ref. This is how the loop says plainly "I can't do this" instead of producing junk.

  • core.work.guardrail.v1: written when the same failure repeats. verdict: "block" appears mid-loop when the agent's next identical attempt is refused with a made-up failure result (the loop continues and the agent can change approach). verdict: "halt" appears when the loop ends with a guardrail_halt outcome. Body carries tool, args_hash, count, and threshold.

  • core.work.compensation.v1: written when a loop does something unexpected, such as the model wrapping up too early as it nears its context limit. It names what happened and its context. You can review unusual runs per actor with GET /v1/work/compensation/review.

  • core.work.observation.v1: a nudge to a running actor. When something other than the model notices a problem and puts it in front of the model on its next turn, that nudge is saved as a record. It names the rule that fired, holds the exact text the actor was shown, and names the loop_thread it steered. You can always see afterwards why a run changed course. rule is required and must not be empty.

  • core.work.decision_request.v1: pause for human approval. When a loop needs a decision, it raises one of these and pauses with an awaiting_actor outcome until you respond.

  • core.work.loop_cancel.v1: cancel. A DO of this kind on the loop thread stops the running loop, which exits with a cancelled outcome.

Chat-actor delegation

When a chat assistant receives a message that opens with @agent <goal>, it hands the goal to a real loop running under the user's identity (not the chat assistant's), and reports back when the loop ends.

  • core.work.delegation.v1: the assistant's record that it handed a goal to a work loop. body.parent_loop_id references the loop it started.
  • core.actor.usage.v1: daily per-actor aggregate (loop count, input/output tokens, cost). Used by the cost-preview endpoint to show "you've used $X.YZ of your $Z.WW daily cap."

For the complete work-loop family (including artifact, note, coercion, and the older chat call/response/error kinds) see the body-kinds manifest.

Other built-in kinds

Full details for these are on their own pages.

  • core.workspace.v1 + core.workspace_view.v1: a workspace (an interactive screen saved as a record) and the view state remembered per thread and actor. See Workspaces.
  • core.instance.shell.v1: an instance's Studio frame (the navigation rail, side panels, and footer around every screen), saved as a record. Resolved at GET /v1/instance/shell and in the GET /v1/instance/bootstrap aggregate. See Instance chrome.
  • core.credential.v1: secrets and external credentials. See Secrets.
  • core.consent.v1: cross-namespace consent grants for federation. See Consent.
  • core.routing_rule.v1 / core.fold_rule.v1 / core.health_rule.v1 / core.aitl_rule.v1 / core.permission_rule.v1 / core.trigger.v1: CEL-based settings records. See CEL expressions and Routing rules.
  • core.subscription.v1: live-update (Server-Sent Events) subscriptions.
  • core.invite.v1: pair-share-invite envelope on th_invites. Fields: invite_id, issuer_did, issuer_key_fp, scope_target (instance / thread:<id> / namespace:<ns>), scopes[], ttl_seconds, max_uses, accept_holder_types[] (guest / federated / *), device_label?, notes?, signature. See Pair, share, invite and the API reference: pair, share, invite.
  • core.invite.event.v1: invite lifecycle events, mirrored on th_audit_invites. Discriminated by event_kind: redeemed (carries holder_type, holder_did?, holder_pubkey?, bearer_token_id?, bearer_sa_id?), revoked (carries revoker_actor, revoker_reason?), exhausted (auto-emitted when uses_remaining reaches 0), refused (carries refusal_reason: expired / revoked / holder_type_mismatch / bad_proof / freshness_violation / key_unknown / consent_denied).
  • core.invite_template.v1: the owner's saved invite shapes on th_invite_templates. Fields: template_id, label, ttl_seconds, max_uses, scopes[], accept_holder_types[], notes?. Surfaces in the spl invite templates picker.
  • core.identity.grant.v1: a grant between principals; membership is one of these. Carries the scopes, expires_at, limits (max_depth / max_fanout / budget), and chain, the ordered list of grants above it, checked when the record is saved (up to 64). Credentials created when a membership is accepted belong to this grant, and every request checks the grant is still valid (401 GRANT_EXPIRED / GRANT_REVOKED). See Principals & grants.
  • core.identity.acceptance.v1: the signed acceptance that completes a membership. It shows the member agreed, rather than the grant being done to them. Written when a membership is accepted, alongside the grant.
  • core.identity.revoke.v1: a signed revocation naming a grant (revoked_grant). One record ends a membership: every credential that belongs to the revoked grant (bearers, agent sub-grants) stops working with it. Also emitted on renewal (reason membership-renewed) to close the superseded grant.
  • core.api_token.activity.v1: when a bearer token was last used. Written on every request authenticated by the token and joined into invite list rows via bearer_token_id. Used by the Last seen column in the invite list.
  • core.runtime.v1: describes a runtime that an extension plugs in. See Extensions.
  • core.artifact.v1: published artifact records.
  • infer.query.v1: inference query records. Documented in detail at infer.query.v1 schema reference.
  • core.trigger.outcome.v1: the result of one trigger-started dispatch, on the dispatch thread. Carries trigger, target, success, cost_usd, error, and (when the dispatch hit its deadline while the loop was still running) disposition: "pending". Trigger limits (simultaneous runs, daily spend, automatic pause) are counted from this record.
  • core.eval.case.v1: one eval case: a request, its established answer, a quartile naming how the case was obtained (mined / held-out / adversarial / unknown / misdirected), an optional citation (the record id of the primary evidence), and the scope / subject / predicate key that lets a newer case replace an older one.
  • core.eval.run.v1: one scoring of one definition (its 64-character hex id as subject) against its suite. Carries structure_score and substance_score separately, both in [0, 1]; a blended score field is refused, because a well-formatted wrong answer must not pass on style.

Where to go next

On this page