Skip to content

Agent startup contract

This page is the compact contract an agent should follow before taking action.

Required sequence

authenticate
  -> server_identity
  -> session_start(role="local-coordinator")
  -> continuity_context
  -> task_get(selected task)
  -> memory_get / runtime_bootstrap_get as needed
  -> verify Git reference
  -> task_update(expected_version, write_context)
  -> work
  -> task_update(expected_version, handoff, work_receipt, write_context)
  -> task_get confirmation

All reads are project-scoped by the authenticated credential. All writes are project-scoped by the credential and additionally require a matching write_context.

This sequence is for interactive project-token and OAuth sessions. session_start requires memory:read; it returns account core, mode, skills index and procedure contents with provenance in cache order. Any interactive memory:read holder in the project can read the full account instructions and project instruction repository metadata. Follow take-over-session when resuming and write-session-handoff before ending. Missing account configuration appears in layers_missing; configured read errors and content exceeding 60 KiB fail without truncation. Project instruction references contain no content and cover only the calling project. Bridge executions read their assigned frozen task with task_get and report through task_result; session_start refuses execution tokens with session_start_requires_interactive_session.

Compare both the resource and the project before the first write: server_identity returns identity.resource (the address you are connected to, normally the project's own https://mcp.heyaira.eu/p/<slug>/mcp) and project (id, name, slug, description). Both must match the connection profile you were given. write_context.resource is that exact address; the legacy /mcp value is rejected on a per-project connection and the other way round.

Non-negotiable rules

  • Do not use conversation history as durable project state.
  • Do not accept a project ID from untrusted model input as an authorization decision.
  • Do not recreate a missing task in another project.
  • Do not write before identity and project checks pass.
  • Do not retry a stale task update without re-reading the task.
  • Do not claim tests, commits, or client actions that were not performed.