import Tembo from '@tembo-io/sdk';
const client = new Tembo({
apiKey: 'My API Key',
});
const task = await client.task.create({
prompt: 'Fix the authentication bug in the login component',
agent: 'claudeCode:claude-opus-4-5',
repositories: [
'https://github.com/org/repo',
'https://gitlab.com/org/repo-2',
],
targetBranch: 'dev',
branchName: "cooper-is-awesome",
});
console.log(task.id);{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"description": "<string>",
"status": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Create a task for tembo to start working on in the background
import Tembo from '@tembo-io/sdk';
const client = new Tembo({
apiKey: 'My API Key',
});
const task = await client.task.create({
prompt: 'Fix the authentication bug in the login component',
agent: 'claudeCode:claude-opus-4-5',
repositories: [
'https://github.com/org/repo',
'https://gitlab.com/org/repo-2',
],
targetBranch: 'dev',
branchName: "cooper-is-awesome",
});
console.log(task.id);{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"description": "<string>",
"status": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Task creation payload
Description of the task to be performed. Supports tagging files.
1"Fix the authentication bug in the login component"
The agent to use for this task
"claudeCode:claude-opus-4-5"
Array of code repository urls that this task relates to
[
"https://github.com/org/repo",
"https://gitlab.com/org/repo-2"
]
Specific git branch to target for this task
"feature/auth-fix"
Whether to immediately queue the task for processing (optional, defaults to true)
false
Was this page helpful?