Mark agent read
Marks an agent read by the caller, through an event of its transcript, and returns it. It's marked read only if the caller read through its last event, so that what came since stays unread. An agent the caller doesn't follow stays as it is. Service accounts follow no agents, and are refused.
Marks an agent read by the caller, through an event of its transcript, and returns it.
It's marked read only if the caller read through its last event, so that what came since stays unread. An agent the caller doesn't follow stays as it is. Service accounts follow no agents, and are refused.
bearerAuthorizationBearer <token>An access token, or an API key.
project*stringThe project's ID.
^prj_[0-7][0-9a-hjkmnp-tv-z]{25}$agent*stringThe agent's ID.
^ags_[0-7][0-9a-hjkmnp-tv-z]{25}$application/json- body
sequence*integerThe sequence of the last event of the transcript that the caller read, such as the agent's lastSequence as they saw it. The agent is marked read only if nothing came after it, so that what it wrote since stays unread.
int640 <= valueOK
application/json- response
activityTime*stringWhen the agent was last active, as people see it, which lists order agents by: when it was created, someone wrote to it or answered it, or it stopped, as it finished its turn, asked a question, was interrupted or failed. Unlike updateTime, the steps of a turn leave it.
date-timeawaitingCalls*array<string>The tool calls that the agent waits for answers to, in AWAITING_INPUT.
config*How the agent works. Set when the agent is created, then changed only by configChange events.
createTime*stringWhen the agent was created.
date-timecreator*stringWho created the agent, such as user:usr_….
environment?The agent's environment, which its first command makes; absent while it has none.
jobs*array<>The background jobs that the agent left running and is told the end of, while its environment runs. As each ends, it starts a turn of an IDLE agent, unless someone interrupted its last turn, so an agent that finished its turn with jobs goes on when they end.
lastSequence*integerThe sequence of the transcript's last event.
int64lastStop?Why the agent last stopped; absent until it first does.
name*stringResource name, projects/{project_id}/agents/{agent_id}.
state*stringWhat the agent is doing: IDLE with nothing to do, as lastStop says, until a message starts it again; QUEUED with work it starts on shortly; RUNNING; or AWAITING_INPUT, waiting for answers to the tool calls in awaitingCalls, such as a question it asked.
"IDLE""QUEUED""RUNNING""AWAITING_INPUT"title*stringA title for people, at most 200 characters. Empty until the agent writes one after its first answer, unless someone set it.
unread*booleanWhether the agent stopped since the caller last read it: it finished its turn, failed or reached a limit, and is IDLE. Only for agents the caller follows, as people follow those they created, sent to or marked unread; always false for service accounts. MarkAgentRead marks it read.
updateTime*stringWhen the agent last changed, or had an event.
date-timeusage*What the agent used, all told.
visibility*stringWho sees the agent: PROJECT, everyone who may see the project's agents, by their roles on it; PRIVATE, its owner, those it is shared with through its IAM policy, and those who hold agents.agents.accessPrivate on the project.
"PROJECT""PRIVATE"curl -X POST 'https://api.kosem.ai/v1/projects/string/agents/string/mark-read' \
-H 'Content-Type: application/json' \
-d '{
"sequence": 0
}'{
"activityTime": "2019-08-24T14:15:22Z",
"awaitingCalls": [
"string"
],
"config": {
"environment": {
"diskGib": 0,
"env": {
"property1": "string",
"property2": "string"
},
"idleTimeoutSeconds": 0,
"image": "string",
"memoryMib": 0,
"runnerPool": "string",
"secrets": [
{
"credential": "string",
"env": "string",
"file": "string",
"scope": {
"property1": null,
"property2": null
},
"secret": "string",
"state": "ACTIVE",
"stateReason": "string"
}
],
"stoppedTtlSeconds": 0,
"vcpus": 0
},
"instructions": "string",
"maxModelCalls": 0,
"model": "string",
"reasoningEffort": "",
"tools": [
"string"
]
},
"createTime": "2019-08-24T14:15:22Z",
"creator": "string",
"environment": {
"diskGib": 0,
"environment": "string",
"memoryMib": 0,
"state": "PROVISIONING",
"stateReason": "string",
"updateTime": "2019-08-24T14:15:22Z",
"vcpus": 0
},
"jobs": [
{
"command": "string",
"job": "string",
"startTime": "2019-08-24T14:15:22Z"
}
],
"lastSequence": 0,
"lastStop": {
"message": "string",
"reason": "END_TURN"
},
"name": "string",
"state": "IDLE",
"title": "string",
"unread": true,
"updateTime": "2019-08-24T14:15:22Z",
"usage": {
"webSearches": 0
},
"visibility": "PROJECT"
}