Interns

Start an intern run without waiting for it

Starts a run on one of your interns and answers 202 with the session_id as soon as the intern accepts it. The run keeps going on the intern after the response. Nothing about its progress comes back on this request; the intern reports through its own tools, such as Slack.

Send the same session_id later to continue the conversation, for example to hand the intern a decision on work it started. If that session already has a run going, the prompt is delivered into it and the status is steered. A session_id is accepted only from the caller it was issued to, on the same intern; any other, including sessions started from Slack or the chat endpoint, is refused with 404.

Runs started here self-drive: the intern consents to its own tool approvals, and a question it asks is answered by its own fallback. A run ends when the intern finishes it or after its execution deadline (1 hour by default).

Available to interns programme members. Callers outside the programme receive 404 for every path under /api/v1/interns.

post/interns/{internId}/invoke

Path parameters

internIdstring required

The intern to run.

Example:a11e0000-0000-4000-8000-000000000005

The intern to run.

Request body

inputstring required

The prompt for the run, at most 32000 characters.

session_idstring

The session to run in. Send the session_id from an earlier 202 to continue that conversation, for example to hand the intern a decision on a case it is working. Omit it to start a new session. Only a session_id this endpoint issued to the same caller on the same intern is accepted; any other is refused with 404.

Example request

{
  "input": "New support ticket 48213. Case token: ct_9f2c. Investigate and reply."
}

Response

The intern accepted the prompt. The run continues on the intern.

session_idstring required

The session the run belongs to. Send it back to continue the conversation.

status'started' | 'steered' required

started when a new run began. steered when the session already had a run going and the prompt was delivered into it instead.

Example response

{
  "session_id": "b51a0e21-368b-4780-a220-14655bf28c55",
  "status": "started"
}

Changes

Changed in 1 of the 303 revisions of this API.1