Continue an objective
client.objectives.continue(stringobjectiveID, ObjectiveContinueParams { enqueue, message, secrets } body, RequestOptionsoptions?): ObjectiveContinueResponse { data, metadata, contextWindowId, info }
POST/v1/objectives/{objectiveId}/continue
Continue an objective
import Cadenya from '@cadenya/cadenya';
const client = new Cadenya({
apiKey: process.env['CADENYA_API_KEY'], // This is the default and can be omitted
});
const response = await client.objectives.continue('objectiveId');
console.log(response.data);{
"data": {
"assistantMessage": {
"content": "content",
"toolCalls": [
{
"arguments": "arguments",
"functionName": "functionName",
"tool": {
"agent": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"name": "name",
"profileId": "profileId",
"workspaceId": "workspaceId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"cadenyaProvidedTool": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"name": "name",
"profileId": "profileId",
"workspaceId": "workspaceId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"tool": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"name": "name",
"profileId": "profileId",
"workspaceId": "workspaceId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
}
}
}
]
},
"contextWindowCompacted": {
"messagesCompacted": 0,
"newContextWindow": {
"completionTokens": 0,
"objectiveId": "objectiveId",
"previousWindowContinueInstructions": "previousWindowContinueInstructions",
"promptTokens": 0,
"sequence": 0
},
"strategies": [
"string"
],
"summary": "summary"
},
"error": {
"message": "message",
"type": "type"
},
"subObjectiveCreated": {
"metadata": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"profileId": "profileId",
"workspaceId": "workspaceId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
}
},
"toolApprovalRequested": {
"toolCallId": "toolCallId"
},
"toolApproved": {
"toolCallId": "toolCallId"
},
"toolCalled": {
"toolCallId": "toolCallId"
},
"toolDenied": {
"memo": "memo",
"toolCallId": "toolCallId"
},
"toolError": {
"message": "message",
"toolCallId": "toolCallId"
},
"toolResult": {
"content": "content",
"toolCallId": "toolCallId"
},
"type": "type",
"userMessage": {
"content": "content"
}
},
"metadata": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"profileId": "profileId",
"workspaceId": "workspaceId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"contextWindowId": "contextWindowId",
"info": {
"createdBy": {
"metadata": {
"id": "id",
"accountId": "accountId",
"name": "name",
"profileId": "profileId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"spec": {
"type": "PROFILE_TYPE_USER",
"email": "email",
"name": "name"
}
},
"objective": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"profileId": "profileId",
"workspaceId": "workspaceId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
}
}
}Returns Examples
{
"data": {
"assistantMessage": {
"content": "content",
"toolCalls": [
{
"arguments": "arguments",
"functionName": "functionName",
"tool": {
"agent": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"name": "name",
"profileId": "profileId",
"workspaceId": "workspaceId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"cadenyaProvidedTool": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"name": "name",
"profileId": "profileId",
"workspaceId": "workspaceId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"tool": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"name": "name",
"profileId": "profileId",
"workspaceId": "workspaceId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
}
}
}
]
},
"contextWindowCompacted": {
"messagesCompacted": 0,
"newContextWindow": {
"completionTokens": 0,
"objectiveId": "objectiveId",
"previousWindowContinueInstructions": "previousWindowContinueInstructions",
"promptTokens": 0,
"sequence": 0
},
"strategies": [
"string"
],
"summary": "summary"
},
"error": {
"message": "message",
"type": "type"
},
"subObjectiveCreated": {
"metadata": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"profileId": "profileId",
"workspaceId": "workspaceId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
}
},
"toolApprovalRequested": {
"toolCallId": "toolCallId"
},
"toolApproved": {
"toolCallId": "toolCallId"
},
"toolCalled": {
"toolCallId": "toolCallId"
},
"toolDenied": {
"memo": "memo",
"toolCallId": "toolCallId"
},
"toolError": {
"message": "message",
"toolCallId": "toolCallId"
},
"toolResult": {
"content": "content",
"toolCallId": "toolCallId"
},
"type": "type",
"userMessage": {
"content": "content"
}
},
"metadata": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"profileId": "profileId",
"workspaceId": "workspaceId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"contextWindowId": "contextWindowId",
"info": {
"createdBy": {
"metadata": {
"id": "id",
"accountId": "accountId",
"name": "name",
"profileId": "profileId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"spec": {
"type": "PROFILE_TYPE_USER",
"email": "email",
"name": "name"
}
},
"objective": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"profileId": "profileId",
"workspaceId": "workspaceId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
}
}
}