POST /api/agents/coding-integrations is in the generated OpenAPI spec. Batch ingest is not.
The CLI is what calls these.
nasiko connect <agent> registers the coding agent, for LLM routing, session reporting, or both. The older nasiko agents install <agent> still works as a hidden alias for nasiko connect <agent> --no-routing --reporting. Reported turns are delivered by nasiko agents sync, which the reporting hook starts in the background. Don’t send turns from a different user or cluster than the install binding — sync refuses that locally; the server still requires a valid login.
Related: Discover, Session reporting, Setup commands.
Register a coding agent
POST /api/agents/coding-integrations
Creates the agent that represents one coding agent for you, so its sessions and model traffic are attributed to you. Each user has at most one per coding agent. Calling it again returns the same agent, so it’s safe to call on every connect.
Any signed-in user can call it, with a session JWT in Authorization: Bearer <token> (from POST /api/auth/login) or the dashboard cookie.
Request body
201 Created the first time, 200 OK after that.
Errors. Bodies are plain text.
Report coding-agent turns
POST /api/telemetry/coding-agent/events/batch
Delivers completed coding-agent turns to Nasiko. Each turn becomes part of a chat session in your history, with its model calls, tokens, cost, and tool calls in TokenOps and observability. nasiko agents sync sends turns queued by the reporting hook through this route.
Authenticate with your session JWT. Each event must name a coding agent you registered with POST /api/agents/coding-integrations.
Request
A JSON object with anevents array of 1 to 100 events. The whole body can be up to 8 MiB.
IDs and names can’t be empty. IDs are limited to 512 bytes.
Tool call
status is one of pending, running, succeeded, failed, denied, timed_out, cancelled, or unknown. association is exact, turn, or unknown. timestamp_quality is exact, inferred, receipt, or unknown.
If the server doesn’t keep chat history (CODING_AGENT_CHAT_HISTORY=false), it drops the prompt, response, title, and tool-call details on arrival and stores the turn as usage only.
Event and session IDs
The server recomputes both IDs and rejects an event whose IDs don’t match.session.idis<source.agent_id>:<session.source_id>, for exampleclaude:2c9f4e1a-....event_idis a version 5 UUID. Its namespace ise8c6fef8-5fe4-4dc2-9b48-47466355ced7. Its name isv1|<len>:<source.agent_id>|<len>:<session.source_id>|<len>:<turn.id>, where each<len>is the byte length of the value after it.
event_id. That’s what makes replay safe.
Response
200 OK whenever the batch was processed, with one result per event in request order:
Common rejections:
- A field fails validation, or
event_idorsession.iddoesn’t match its computed value. source.agent_nameandsource.agent_iddon’t match a coding agent you registered and haven’t deleted.event_id already exists with a different payload.session already belongs to a different user or agent.the server could not store this turn: …. A value in the turn can’t be stored, for example a number out of range. Only that turn is rejected; the rest of the batch is stored.
nasiko agents sync sets rejected turns aside. nasiko agents sync --retry-rejected queues them again.
Replay and idempotency
Sending the same batch twice is safe. Each event is stored at most once per user, keyed byevent_id, and a resend comes back as duplicate. Events are stored one at a time, so if a request fails partway through, retry the whole batch. Events already stored come back as duplicate.
Limits and errors
These responses reject the whole batch. Nothing in it is stored, so retrying the same batch later is the complete recovery. Bodies are plain text.
Other errors: