CogniRelay

Agent Onboarding

This is the single concentrated bootstrap and operating manual for agents using CogniRelay. Read this first to operate the shipped system correctly without preloading the full docs corpus; when runtime help is available, use GET /v1/help/onboarding, GET /v1/help/onboarding/bootstrap, GET /v1/help/onboarding/sections/{id}, system.onboarding_index, system.onboarding_bootstrap, and system.onboarding_section as the repo-doc-free bounded onboarding path.

What CogniRelay Is For

CogniRelay is a bounded continuity and orientation system for agents, not a transcript archive, general notes database, or memory dump. Use it to recover orientation after startup, reset, or compaction; retrieve bounded context for current work; track tasks when explicit work-item state matters; preserve durable user or peer preferences separately from thread/task state; and act on explicit trust and degradation signals.

Minimum Startup Path

The minimum shipped bootstrap path is a read first, then bounded retrieval only when the first work step needs more context. Do not turn startup into a discovery tour or write merely because an agent resumed.

  1. Call continuity.read / POST /v1/continuity/read with view="startup" and allow_fallback=true.
  2. Consume the returned startup-oriented continuity result as the first orientation input, including top-level graph_summary when present.
  3. Check schedule_context.due.items in startup output when present. Due reminders are read-only orientation data; they are not executed or auto-acknowledged.
  4. Optionally call context.retrieve / POST /v1/context/retrieve when the first work step needs bounded fresh context beyond startup orientation; it includes bundle.graph_context by default unless continuity_mode="off" suppresses graph derivation and includes scoped schedule_context when the request has a primary subject or continuity selectors.

For primary thread scoping, context.retrieve uses subject_kind + subject_id, not top-level thread_id:

{
  "task": "Continue work related to thread release-v1.4-followup after restart/downtime.",
  "subject_kind": "thread",
  "subject_id": "release-v1.4-followup",
  "continuity_mode": "auto",
  "continuity_resilience_policy": "allow_fallback",
  "continuity_verification_policy": "allow_degraded"
}

If the startup result has warnings, fallback state, stale continuity, trimming, or degraded trust, use the best returned result already received and verify critical assumptions only against the shipped help/reference lookup surfaces named in this manual and the current task inputs already in hand.

Canonical Hooks

Map runtime-specific hook names to these four canonical hooks. startup and pre_prompt are read-oriented; post_prompt and pre_compaction_or_handoff are write-eligible only when write-eligible continuity fields changed.

Hook Operating route Write discipline
startup Read with POST /v1/continuity/read / continuity.read, using view="startup" and allow_fallback=true. Read-only. Do not write to mark resume.
pre_prompt Retrieve with POST /v1/context/retrieve / context.retrieve. Read-only. Do not persist prompt text, retrieved snippets, graph context, or transcript material.
post_prompt Write/update only through POST /v1/continuity/upsert / continuity.upsert. Write only when write-eligible fields changed. Skip otherwise.
pre_compaction_or_handoff Write/update only through POST /v1/continuity/upsert / continuity.upsert. Write only when write-eligible fields changed before context loss. Skip otherwise.

Last-mile Adapter Kit

CogniRelay ships copyable agent assets under agent-assets/README.md, including agent-assets/skills/cognirelay-continuity-authoring/SKILL.md, agent-assets/hooks/cognirelay_retrieval_hook.py, and agent-assets/hooks/cognirelay_continuity_save_hook.py.

Use this safe sequence for generic runtime glue:

  1. Run the retrieval hook at startup/pre-prompt for read-only orientation.
  2. Run save hook facts mode for mechanical context.
  3. Run save hook template mode for a semantic skeleton.
  4. Have the agent author semantic fields explicitly.
  5. Run save hook dry-run for placeholder rejection and deterministic diff.
  6. Run save hook write only after an explicit agent-authored payload exists.
  7. Run save hook readback or doctor for verification.

The hooks do not infer semantic continuity and do not turn graph or schedule orientation into capsule fields.

How To Ask CogniRelay For Help

Use built-in help/reference lookup for exact route, tool, topic, hook, and error guidance instead of guessing. Use HTTP help surfaces as the runtime lookup path, MCP help/reference methods as the JSON-RPC lookup path, and GET /v1/capabilities only when instance support is uncertain.

Bootstrap-Critical Limits and Routing Rules

Use this closed routing list for ordinary operation. Prefer HTTP identifiers at onboarding level unless your runtime uses MCP; the MCP identifiers below are transport-equivalent alternates except where a route is explicitly described as a specialized follow-on.

Common goal Exact HTTP identifier Exact MCP identifier Preferred onboarding-level route Status of the other route
startup/orientation recovery POST /v1/continuity/read continuity.read POST /v1/continuity/read with view="startup" and allow_fallback=true continuity.read is the transport-equivalent alternate for runtimes using MCP
bounded retrieval POST /v1/context/retrieve context.retrieve POST /v1/context/retrieve context.retrieve is the transport-equivalent alternate for runtimes using MCP
continuity write/update POST /v1/continuity/upsert continuity.upsert POST /v1/continuity/upsert continuity.upsert is the transport-equivalent alternate for runtimes using MCP; shipped narrow update variants POST /v1/continuity/patch / continuity.patch and POST /v1/continuity/lifecycle / continuity.lifecycle are specialized follow-ons, not the preferred onboarding-level route
reminder inspection GET /v1/schedule/items schedule.list GET /v1/schedule/items?due=true for explicit due inspection Due reminders also arrive through startup/context schedule_context; no SSE, recurrence, UI schedule page, callback, or background scheduler exists
task lookup GET /v1/tasks/query tasks.query GET /v1/tasks/query tasks.query is the transport-equivalent alternate for runtimes using MCP
help lookup GET /v1/help system.help GET /v1/help system.help is the transport-equivalent alternate for runtimes using MCP; exact sub-lookups stay GET /v1/help/tools/{name}, GET /v1/help/topics/{id}, GET /v1/help/hooks, GET /v1/help/errors/{code} and system.tool_usage, system.topic_help, system.hook_guide, system.error_guide

Compact due-reminder inspection examples:

GET /v1/schedule/items?due=true&thread_id=release-v1.4-followup
GET /v1/schedule/items?due=true&subject_kind=thread&subject_id=release-v1.4-followup

Task creation and task updates are described at onboarding level only through the continuity write/update path: POST /v1/continuity/upsert on HTTP and continuity.upsert on MCP. Any specialized task-write behavior belongs in deeper reference/help lookup, not in bootstrap routing.

For exact limits beyond the compact bootstrap-critical names below, query GET /v1/help/limits/{field_path} or system.validation_limit with one of the field paths from the runtime limits index.

Field-selection rules:

Current shipped bootstrap-critical limits/caps agents routinely author against:

Operational Workflow Rules

These rules define what to persist and how to select the right continuity anchor. Keep every write bounded, explicit, and useful for future orientation.

Retrieval Mental Model

Continuity is bounded, not lossless. Retrieval may combine thread/task continuity with bounded search or context results, and selectors shape which continuity state is returned.

Trust and Degradation Rules

Warnings and degraded retrieval are operational signals, not noise. Degrade safely: use the best available returned continuity/context, reduce certainty, and avoid treating missing or degraded context as known.

Minimal Examples

These examples are transport-neutral by default and name the preferred onboarding-level route only where the route matters operationally.

Thread-Only Workflow

A user asks for several short follow-ups about one incident investigation. The work is one bounded stream and does not need explicit status tracking.

Thread + Task Workflow

A broader feature thread has one concrete deliverable that needs progress and blocking state.

A task depends repeatedly on a small set of repo docs.

Resume After Reset

An agent restarts after context loss and must resume the next work step without guessing.

Anti-Patterns

These are operational errors. Apply the correction directly instead of broadening the continuity record.

References / Where To Look Next

Use these references for exact lookup after this manual determines the right operating path. Do not preload them all for normal startup.