AgentConnect
Agents

List an agent’s tasks

Lists the tasks the agent started (its delegated tasks, follow-ups and approved proposals), running first and then the most recent, at most limit (50 by default and at most). With parentSessionId it lists only what that conversation started, newest first, a page at a time: pass a page’s nextCursor back as cursor for the next one; the conversation must be one the caller may view, and the agent’s daemon must support it (409 DAEMON_FEATURE_MISSING otherwise). Anyone who can view the agent sees each one’s state and start; its title, its session and the conversation that started it are included only where the caller may view that conversation, and canStop says whether the caller may stop its current turn. A conversation whose agent has since moved is read from the daemon holding its store, with canStop false. An agent outside assistant mode is answered only when its daemon lists every agent’s tasks, and 409 ASSISTANT_MODE_OFF otherwise. From an agent whose daemon keeps follow-ups, each row names its kind and the page says followUps: true; a follow-up carries its status (waiting, checking, paused after five failed checks, done or stopped) and next check, and, where the caller may view its conversation, what counts as done, its newest checks with what started each (its time, a message, or events on what it watches), the pull request, merge request or issue it watches with that watch's state, and, from a daemon that ends one by it, its id for stopAssistantFollowUp: until its first check runs it has no session, and canStop follows its conversation. A follow-up is listed under its place’s current long session. A task carries threaded when a platform thread is attached and, where the caller may view it, its own summary with summaryUpdatedAt, the background it was opened with, its replies (the messages its people and the task posted after the one that opened it) with lastReplyAt, and the openedForMessageId of the message a coordinator opened it for, from a daemon that keeps them; each call reads them from the daemon again. Nothing is stored by this call.

GET
/v1/orgs/{orgId}/agents/{id}/assistant/subsessions

授权

bearerAuth
授权Bearer <token>

位置: header

路径参数

orgId*string
id*string
匹配^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
格式uuid

查询参数

parentSessionId?string
长度1 <= length <= 512
cursor?string
长度1 <= length <= 1024
limit?integer
范围1 <= value <= 50
默认50

响应主体

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/orgs/string/agents/497f6eca-6276-4993-bfeb-53cbbbba6f08/assistant/subsessions"
{  "subsessions": [    {      "sessionId": "string",      "title": "string",      "state": "open",      "startedAt": "string",      "visible": true,      "canStop": true,      "parent": {        "sessionId": "string",        "title": "string",        "platform": "string",        "channelName": "string"      },      "place": {        "platform": "string",        "channelName": "string"      },      "kind": "delegated",      "followUp": {        "id": "string",        "status": "waiting",        "nextCheck": "string",        "doneWhen": "string",        "recentChecks": [          {            "at": "2019-08-24T14:15:22Z",            "observation": "string",            "reported": true,            "startedBy": "time",            "events": [              "merged"            ]          }        ],        "gettingToKnow": true,        "watch": {          "url": "string",          "target": "string",          "state": "pending",          "reason": "string"        }      },      "summary": "string",      "summaryUpdatedAt": "string",      "background": "string",      "threaded": true,      "replies": 0,      "lastReplyAt": "string",      "openedForMessageId": "string"    }  ],  "truncated": true,  "nextCursor": "string",  "followUps": true}