Contents
Tasks
Slack thread of a task. A task created from Slack (by mentioning @Nucleo or with Create task in
Nucleo on a message), or linked to a thread, carries that thread in slack_threads of
GET /tasks/{task}: channel, author of the first message, link to the thread and a two-to-three-line
summary written by Atomo. The messages of the thread are never stored in Nucleo, only the summary.
Tasks created in Nucleo have an empty list.
Coding agent. A task can be sent to a coding agent (POST /tasks/{task}/agent), which writes the code and
opens a pull request in the project's repository. A developer merges it, unless the request explicitly asks
the agent to publish (auto_merge: true): then the agent merges it by itself, and publishing is up to the
repository's own deploy. The person assigned to the task stays responsible.
Sending is always an explicit action. The latest run is in agent_run of GET /tasks/{task} (null if
the task was never sent). If the task came from a Slack thread, the agent's progress is posted in that
thread.
A run has no time limit: it fails only when the agent stops giving signs of life (with GitHub, no workflow
queued or running for its issue for 30 minutes), or after 3 days as a safety limit. message says which.
While a run is queued or working, a new comment on the task written by a person, or a reply in the
Slack thread the run came from, reaches the agent: comments that arrive together are forwarded once, when
the agent's current step ends, and the agent keeps working on the same pull request. Messages of Nucleo
itself never reach the agent.
| Status | Meaning |
|---|---|
queued | Sent, waiting for the agent. |
working | The agent is working on it. |
pr_open | The pull request is in pr_url and waits for a developer to merge it. |
merged | Done: the agent merged the pull request in pr_url. |
needs_review | The agent stopped and needs a person, for example the task has no description. message says why. |
failed | The agent could not finish. message says why. |
Base URL, authentication and conventions of this API are on the Operations API page.
/tasks/{task}/slack-threads/{thread}/summaryRewrite the summary of a task's Slack thread
Nucleo reads the Slack thread linked to the task and Atomo writes a new summary of two or three lines.
The thread is read, not stored. Nucleo also rewrites it on its own whenever @Nucleo is mentioned in
that thread. Permission tasks.manage; at most 10 calls a minute per person.
If Slack does not answer (for example Nucleo was removed from a private channel) or the AI is not
available, the answer is 422 and the previous summary stays.
Path parameters
taskintegerrequiredthreadintegerrequiredThe
idof the thread in the task'sslack_threads, not the Slack timestamp.
Headers
X-Nucleo-CompanystringThe company's public id (or numeric id). Needed when the token does not name a company and the person belongs to more than one.
Responses
200The thread with its new summary.application/json
dataTaskSlackThreadThe Slack thread a task comes from, as listed in
slack_threadsofGET /tasks/{task}.Child attributes
idintegerchannel_idstringSlack channel id.
channel_namestring | nullChannel name
author_namestring | nullAuthor of the thread's first message.
thread_tsstringSlack timestamp of the thread.
permalinkstring (uri) | nullOpens the thread in Slack.
summarystring | nullTwo or three lines written by Atomo.
summary_atstring (date-time) | nullWhen the summary was last written.
401Missing, expired or refused token.application/json
messagestringrequired
403The person lacks the permission, or cannot enter the company.application/json
messagestringrequired
404Not found in this company.application/json
messagestringrequired
422Slack or the AI did not answer; nothing changed.application/json
messagestringrequired
curl -X POST 'https://api-brain.nucleoplatform.com/api/v1/tasks/{task}/slack-threads/{thread}/summary' \
-H "Authorization: Bearer $NUCLEO_ACCESS_TOKEN" \
-H 'Accept: application/json'const res = await fetch("https://api-brain.nucleoplatform.com/api/v1/tasks/{task}/slack-threads/{thread}/summary", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.NUCLEO_ACCESS_TOKEN}`,
Accept: "application/json",
},
});
const data = await res.json();
console.log(res.status, data);<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
$response = $client->request('POST', 'https://api-brain.nucleoplatform.com/api/v1/tasks/{task}/slack-threads/{thread}/summary', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('NUCLEO_ACCESS_TOKEN'),
'Accept' => 'application/json',
],
'http_errors' => false,
]);
echo $response->getStatusCode(), PHP_EOL;
echo $response->getBody();{
"data": {
"id": 12,
"channel_id": "C0123ABCD",
"channel_name": "web_acme",
"author_name": "Marco Rossi",
"thread_ts": "1732183200.001900",
"permalink": "https://acme.slack.com/archives/C0123ABCD/p1732183200001900",
"summary": "The PayPal checkout fails on mobile. Giulia takes it and will fix it by Friday.",
"summary_at": "2026-11-21T17:40:00+00:00"
}
}{
"message": "Unauthenticated."
}{
"message": "string"
}{
"message": "string"
}{
"message": "string"
}/tasks/{task}/agentSend a task to the coding agent
Starts a run of the coding agent on the task. The answer comes right away with the run queued; follow it
in agent_run of GET /tasks/{task}. Permission tasks.manage; at most 10 calls a minute per person.
A task that is done, or that the agent is already working on (queued or working), answers 422.
Path parameters
taskintegerrequired
Headers
X-Nucleo-CompanystringThe company's public id (or numeric id). Needed when the token does not name a company and the person belongs to more than one.
Request bodyapplication/json
agentstringThe coding agent. Only
claude_code(Claude Code) for now.One ofclaude_codedefault claude_codeauto_mergebooleanfalse: the agent stops at the pull request (pr_open) and a developer merges it.true: explicit request to publish, the agent merges it by itself (merged).default false
Responses
201The run, queued.application/json
dataTaskAgentRunA run of the coding agent on a task, as in
agent_runofGET /tasks/{task}.Child attributes
idintegeragentstringOne ofclaude_codeagent_namestringDisplay name of the agent.
driverstringHow the agent runs.
fakeis a dry run: the states and the pull request link are simulated and nothing is written on GitHub.statusstringOne ofqueuedworkingpr_openmergedneeds_reviewfailedrepositorystring | nullThe project's repository when the task was sent.
issue_urlstring (uri) | nullThe issue opened for the agent
pr_urlstring (uri) | nullThe pull request opened by the agent, with
pr_openormerged.auto_mergebooleanWhether the agent merges its pull request by itself.
messagestring | nullWhat the agent says about the run, for example why it needs a review.
requested_byinteger | nullThe person who sent the task.
last_activity_atstring (date-time) | nullLast sign of life of the agent (a workflow queued or running, comments forwarded to it). After 30 minutes without one, the run fails.
created_atstring (date-time)updated_atstring (date-time)finished_atstring (date-time) | nullWhen the run stopped:
pr_open,merged,needs_revieworfailed.
401Missing, expired or refused token.application/json
messagestringrequired
403The person lacks the permission, or cannot enter the company.application/json
messagestringrequired
404Not found in this company.application/json
messagestringrequired
422The task is done, the agent is already working on it, or the agent is not available.application/json
messagestringrequired
curl -X POST 'https://api-brain.nucleoplatform.com/api/v1/tasks/{task}/agent' \
-H "Authorization: Bearer $NUCLEO_ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"agent": "claude_code",
"auto_merge": false
}'const res = await fetch("https://api-brain.nucleoplatform.com/api/v1/tasks/{task}/agent", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.NUCLEO_ACCESS_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"agent": "claude_code",
"auto_merge": false
}),
});
const data = await res.json();
console.log(res.status, data);<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
$response = $client->request('POST', 'https://api-brain.nucleoplatform.com/api/v1/tasks/{task}/agent', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('NUCLEO_ACCESS_TOKEN'),
],
'json' => [
'agent' => 'claude_code',
'auto_merge' => false,
],
'http_errors' => false,
]);
echo $response->getStatusCode(), PHP_EOL;
echo $response->getBody();{
"data": {
"id": 7,
"agent": "claude_code",
"agent_name": "Claude Code",
"driver": "fake",
"status": "queued",
"repository": "acme/shop",
"issue_url": null,
"pr_url": null,
"auto_merge": false,
"message": null,
"requested_by": 3,
"created_at": "2026-11-22T10:00:00+00:00",
"updated_at": "2026-11-22T10:00:00+00:00",
"finished_at": null
}
}{
"message": "Unauthenticated."
}{
"message": "string"
}{
"message": "string"
}{
"message": "string"
}/tasks/{task}/draftDiscard an untouched new task
«Add task» creates a task with a placeholder title and opens it. If the person closes it without writing
anything, this call moves it to the trash, only if it is still an empty draft of the caller: placeholder title,
no description, no subtasks and no comments. Otherwise nothing changes and discarded is false. Permission
tasks.manage. A trashed task can be restored from the trash for 30 days.
Path parameters
taskintegerrequired
Headers
X-Nucleo-CompanystringThe company's public id (or numeric id). Needed when the token does not name a company and the person belongs to more than one.
Responses
200Whether the draft was discarded.application/json
discardedboolean
401Missing, expired or refused token.application/json
messagestringrequired
403The person lacks the permission, or cannot enter the company.application/json
messagestringrequired
curl -X DELETE 'https://api-brain.nucleoplatform.com/api/v1/tasks/{task}/draft' \
-H "Authorization: Bearer $NUCLEO_ACCESS_TOKEN" \
-H 'Accept: application/json'const res = await fetch("https://api-brain.nucleoplatform.com/api/v1/tasks/{task}/draft", {
method: "DELETE",
headers: {
Authorization: `Bearer ${process.env.NUCLEO_ACCESS_TOKEN}`,
Accept: "application/json",
},
});
const data = await res.json();
console.log(res.status, data);<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
$response = $client->request('DELETE', 'https://api-brain.nucleoplatform.com/api/v1/tasks/{task}/draft', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('NUCLEO_ACCESS_TOKEN'),
'Accept' => 'application/json',
],
'http_errors' => false,
]);
echo $response->getStatusCode(), PHP_EOL;
echo $response->getBody();{
"discarded": true
}{
"message": "Unauthenticated."
}{
"message": "string"
}