AgentConnect
Agents

List an agent’s pending drafts

Lists the posts and proposals waiting for an internal member’s approval, the soonest to lapse first, at most 50: where each would post, its exact text, who is asked to approve it and when it expires. A proposal (kind: task) is what a scheduled check of an assistant-mode agent asks to do: its sentence, its reason and its item, with the task as its text; it runs in the conversation its item was taken in once approved. permissionRequests lists the runtime permission requests background sub-sessions are waiting on, oldest first: what each asks to run, when it is denied and its sub-session stops unless someone answers, and its options; the sub-session and its conversation are named only where the caller may view them. Decide one with decideAgentPermissionRequest. An agent outside assistant mode is answered, without proposals, only when its daemon serves every agent’s Activity, and 409 ASSISTANT_MODE_OFF otherwise. This read changes nothing. Only callers who can edit the agent may read it.

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

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

orgId*string
id*string
Match^([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)$
Formatuuid

Response Body

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/drafts"
{  "drafts": [    {      "id": "string",      "kind": "reply",      "target": {        "platform": "string",        "integrationId": "string",        "channel": "string",        "thread": "string",        "name": "string",        "dm": true,        "external": true      },      "text": "string",      "approver": {        "kind": "member",        "integrationId": "string",        "channel": "string",        "userId": "string",        "consoleUserId": "string",        "name": "string"      },      "proposal": {        "sentence": "string",        "why": "string",        "itemId": "string",        "itemTitle": "string"      },      "inConversation": true,      "createdAt": "2019-08-24T14:15:22Z",      "expiresAt": "2019-08-24T14:15:22Z"    }  ],  "truncated": true,  "permissionRequests": [    {      "requestId": "string",      "tool": "string",      "createdAt": "string",      "expiresAt": "string",      "options": [        {          "optionId": "string",          "name": "string",          "kind": "allow_once"        }      ],      "subsession": {        "sessionId": "string",        "title": "string"      },      "parent": {        "sessionId": "string",        "title": "string",        "platform": "string",        "channelName": "string"      }    }  ]}