See what the agent reads of a chat
/api/v1/chats/{chat_id}/summarySee what the chat's agent reads of the chat when its next turn starts: its newest messages word for word, and a summary of the ones before them.
A turn reads as many of the newest messages as fit its share of the model's input; verbatim_from_message_id is the oldest of them, and is null while it reads the whole chat. After a turn ends, a model folds the messages that no longer fit into the summary, and the turn's run is charged for it.
unsummarized_message_count counts messages a turn would neither read nor find in the summary, until the summary catches up. The agent can still read any message back when it needs the exact words.
Required access
Credentials: delegated token, user session, user API key
User API keys use the owner’s current permissions, subject to any key restrictions. Capability scopes below apply to automation account keys and delegated tokens.
Scope: chats:read
Only the member who started the chat, through their user API key or an integration acting for them: a chat is private to them. Another member's chat answers 404, also to a workspace owner or admin, who may only stop its turn or delete it, signed in to the app, and reads none of it. Automation accounts have no chats.
A user-owned key prefixed gsmc_uk_, bound to one organization. It follows its owner's current membership, role and resource permissions, optionally restricted to read-only access. No X-Org-Id header is needed; a conflicting organization is rejected. Credential creation, personal connection setup and human attestations require a signed-in session. Runs are private to the calling user; sharing an agent grants access to your own personal memory of it, never to the agent's own memory.
In: header
Path Parameters
uuidHeader Parameters
Selects the active organization for a direct user session that has more than one membership. Automation account keys and delegated tokens are each bound to one organization and ignore it.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/chats/497f6eca-6276-4993-bfeb-53cbbbba6f08/summary" \ -H "Authorization: Bearer $GUEST_MACHINES_API_KEY"{ "summary": { "content": "string", "through_message_id": 0, "message_count": 1, "model": "string", "updated_at": "2019-08-24T14:15:22Z" }, "verbatim_from_message_id": 0, "earlier_message_count": 0, "unsummarized_message_count": 0, "total_messages": 0}Send a message POST
Send the chat's agent a message, as the app's Send does. The message waits with the chat's others until a turn takes it in, and the agent answers it in the chat.
List a chat's waiting messages GET
List the messages sent to a chat that it hasn't taken in yet, in the order it will take them in: messages steering the working turn first, then queued and failed ones in queue order.