JavaScript
import Client from 'agentlin_client';
const client = new Client({
apiKey: process.env['AGENTLIN_API_KEY'], // This is the default and can be omitted
});
const task = await client.tasks.delete('task_677efb5139a88190b512bc3fef8e535d');
console.log(task.id);{
"jsonrpc": "<string>",
"id": "<string>",
"result": {
"object": "task",
"id": "<string>",
"session_id": "<string>",
"user_id": "<string>",
"created_at": 123,
"output": [
{
"type": "reasoning",
"id": "<string>",
"summary": [
{
"text": "<string>",
"id": 123,
"tags": [
"<string>"
],
"annotations": [
{
"type": "file_citation",
"file_id": "<string>",
"index": 123,
"filename": "<string>"
}
],
"logprobs": [
{
"token": "<string>",
"logprob": 123,
"bytes": [
123
],
"top_logprobs": [
{
"token": "<string>",
"logprob": 123,
"bytes": [
123
]
}
]
}
]
}
],
"content": [
{
"text": "<string>",
"id": 123,
"tags": [
"<string>"
],
"annotations": [
{
"type": "file_citation",
"file_id": "<string>",
"index": 123,
"filename": "<string>"
}
],
"logprobs": [
{
"token": "<string>",
"logprob": 123,
"bytes": [
123
],
"top_logprobs": [
{
"token": "<string>",
"logprob": 123,
"bytes": [
123
]
}
]
}
]
}
]
}
],
"usage": {},
"error": {
"code": 123,
"message": "<string>",
"data": {}
},
"input_required": {
"type": "tool_call",
"call_id": "<string>",
"name": "<string>",
"arguments": "<string>",
"id": "<string>"
},
"metadata": {},
"previous_task_id": "<string>",
"rollouts": [
{}
]
},
"error": {
"code": 123,
"message": "<string>",
"data": {}
}
}Tasks
Delete an agent task
Deletes a model task with the given ID.
DELETE
/
tasks
/
{task_id}
JavaScript
import Client from 'agentlin_client';
const client = new Client({
apiKey: process.env['AGENTLIN_API_KEY'], // This is the default and can be omitted
});
const task = await client.tasks.delete('task_677efb5139a88190b512bc3fef8e535d');
console.log(task.id);{
"jsonrpc": "<string>",
"id": "<string>",
"result": {
"object": "task",
"id": "<string>",
"session_id": "<string>",
"user_id": "<string>",
"created_at": 123,
"output": [
{
"type": "reasoning",
"id": "<string>",
"summary": [
{
"text": "<string>",
"id": 123,
"tags": [
"<string>"
],
"annotations": [
{
"type": "file_citation",
"file_id": "<string>",
"index": 123,
"filename": "<string>"
}
],
"logprobs": [
{
"token": "<string>",
"logprob": 123,
"bytes": [
123
],
"top_logprobs": [
{
"token": "<string>",
"logprob": 123,
"bytes": [
123
]
}
]
}
]
}
],
"content": [
{
"text": "<string>",
"id": 123,
"tags": [
"<string>"
],
"annotations": [
{
"type": "file_citation",
"file_id": "<string>",
"index": 123,
"filename": "<string>"
}
],
"logprobs": [
{
"token": "<string>",
"logprob": 123,
"bytes": [
123
],
"top_logprobs": [
{
"token": "<string>",
"logprob": 123,
"bytes": [
123
]
}
]
}
]
}
]
}
],
"usage": {},
"error": {
"code": 123,
"message": "<string>",
"data": {}
},
"input_required": {
"type": "tool_call",
"call_id": "<string>",
"name": "<string>",
"arguments": "<string>",
"id": "<string>"
},
"metadata": {},
"previous_task_id": "<string>",
"rollouts": [
{}
]
},
"error": {
"code": 123,
"message": "<string>",
"data": {}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the task to delete.
Example:
"task_677efb5139a88190b512bc3fef8e535d"
Was this page helpful?
⌘I