Commit Graph

105 Commits

Author SHA1 Message Date
Jaakko Husso
ab3048f48d
feat(core): Link delegated Agents executions and store cache tokens in columns (no-changelog)
Replace the `usageDetails` JSON column with top-level columns on
`agent_execution`:

- `cacheReadTokens` and `cacheWriteTokens` store the prompt-cache tokens
  of the `finish` usage. Both are subsets of `promptTokens`.
- `parentExecutionId` and `rootExecutionId` link a delegated run to the
  execution that delegated it and to the top of its tree. Both reference
  `agent_execution.id` with ON DELETE SET NULL and have an index.

The sub-agent runner sets the links from the parent execution id in the
parent persistence metadata. Background jobs pass it on dispatch. A
resumed child keeps the links of its first execution.

Remove the sub-agent usage roll-up. Each delegated run already records
its own execution, so the system usage route now returns each turn with
its descendants (found through `rootExecutionId`) and their sum.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 02:48:36 +03:00
Jaakko Husso
5f4179b3cc
feat(core): Store prompt-cache and sub-agent usage on Agents executions (no-changelog)
Add a nullable `usageDetails` JSON column to `agent_execution`. The
execution recorder now keeps the prompt-cache read and write tokens of the
`finish` usage, and the usage of direct sub-agents from their
`subagent-completed` chunks. The token columns and the thread counters do
not change: they still count the turn's own model calls only.

System agents get a `GET /agents/system/:agentId/chat/:threadId/usage`
route that returns the usage of each turn in a usable thread. Project
agents already return the new column with the thread detail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 02:48:36 +03:00
Jaakko Husso
0d0601e10b
feat(core): Tie the agent scope to its project with a CHECK constraint (no-changelog)
Add the `CHK_agents_scope_project` CHECK constraint to the
`AddInstanceScopeToAgents` migration. An agent has `scope = 'instance'`
exactly when its `projectId` is null. The down migration drops the
constraint after it deletes the instance agents. The migration is not
released yet, so the constraint goes into the same migration.

Regenerate the schema docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 02:48:26 +03:00
Jaakko Husso
92286bdd6a
feat(core): Add instance-scoped agents to the Agents schema (no-changelog)
Add the agents.scope column ('project' or 'instance') and make
agents.projectId nullable. An instance agent is code-defined and belongs
to no project. AgentRepository.ensureInstanceAgent seeds its row.

Type Agent.projectId as string | null. Project-scoped repository queries
filter on scope = 'project' and return ProjectAgent, which has a
non-null projectId. The project-agent APIs refuse an instance agent with
a ForbiddenError (getAgentOrThrow, validateAgentWriteLock, delete).

The SQLite down migration applies the ON DELETE actions by hand, because
foreign keys are off while the table is recreated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 02:48:25 +03:00
Arvin A
d7e9b00234
feat(core): Index activity entries by resource (no-changelog) (#38040) 2026-10-08 13:50:52 +00:00
Rodrigo Santos da Silva
86877c557a
feat(editor): Preview agent output and review agent checks in the Evals tab (no-changelog) (#39886)
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2026-10-08 11:28:45 +00:00
Predrag Ristic
168a0ac860
feat(core): Persist self-healing results and handoffs (#40115) 2026-10-08 08:11:11 +00:00
Nour Alhadi Mahmoud
2863939580
feat(core): Allow GitLab promotion providers in the database (no-changelog) (#40412) 2026-10-07 14:00:36 +00:00
Predrag Ristic
eaf8c25d1c
feat(core): Add workflow suggestion review actions (#39858) 2026-10-07 12:36:55 +00:00
mfsiega
bb76c3c99b
feat(core): Add the migration workflow owner table (no-changelog) (#40223)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-07 11:36:58 +00:00
Toni Devine
b0d1a30f50
feat(core): Add the WhatsApp agent channel (#38750)
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-06 16:02:03 +00:00
Andreas Fitzek
2d09135c6e
feat(core): Persist trusted source metadata and discover it asynchronously (no-changelog) (#40048)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-06 09:14:52 +00:00
Anne Aguirre
a2fd4189f1
feat(core): Persist agent budget spend in the database (#40138)
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2026-10-05 15:11:29 +00:00
James Martin
073239e6d5
chore(core): Implements JWKS service to provide key pair for signing tokens (no-changelog) (#39718)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-05 12:22:32 +00:00
Eugene
b9695a7f6e
feat(core): Add Agent plan storage foundation (no-changelog) (#39482) 2026-10-05 09:01:48 +00:00
Robin Braumann
ea9021ed86
feat(core): Add durable pause checkpoints for background sub-agents (no-changelog) (#40118) 2026-10-02 13:10:50 +00:00
Danny Martini
b22b6f4909
feat(core): Add steering pair check to agent message queue (no-changelog) (#39893)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 10:48:39 +00:00
Predrag Ristic
0352a19654
feat(core): Store isolated workflow suggestions for review (#39505) 2026-10-02 10:20:01 +00:00
Robin Braumann
33505d7faa
feat(editor): Allow reordering queued messages in Agent Preview (#40101) 2026-10-01 15:44:14 +00:00
Robin Braumann
3a445ae2bf
feat(core): Add session approvals for Agent tools (no-changelog) (#39560) 2026-10-01 09:14:23 +00:00
Lorent Lempereur
45edf565df
feat(core): Allow a sending status on instance monitoring reports (no-changelog) (#39923) 2026-09-30 13:54:16 +00:00
yehorkardash
99182c29be
feat(core): Change IAI permissions logic (#39303) 2026-09-30 09:32:20 +00:00
Robin Braumann
04abd59fc6
feat(core): Add durable background approval state (no-changelog) (#39558)
Co-authored-by: Danny Martini <danny@n8n.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 14:51:18 +00:00
Robin Braumann
b09fd0dc69
feat(core): Add agent input boundaries and steering storage (no-changelog) (#39529) 2026-09-29 12:41:34 +00:00
Andreas Fitzek
0f63032916
feat(core): Add inbound-auth-core module with trusted source entities and migration (#39642) 2026-09-29 10:47:24 +00:00
Robin Braumann
84efbac6f1
refactor(core): Reference accepted messages from agent queue (#39778) 2026-09-29 08:39:25 +00:00
mfsiega
310635e7d5
feat(core): Add migration finding tables (no-changelog) (#39760)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-28 19:13:06 +00:00
Robin Braumann
af36326844
refactor(core): Separate agent messages from execution state (#39742) 2026-09-28 16:00:39 +00:00
Dmitrii
20807d2d3d
fix(core): Enforce one instance report per day with a unique index (#39536)
Co-authored-by: konstantintieber <konstantin.tieber@n8n.io>
2026-09-28 13:51:25 +00:00
Jaakko Husso
356eb8f093
feat(core): Add storage for AI Assistant thread tabs (no-changelog) (#39657)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-28 12:06:00 +00:00
Elias Meire
4c2f220971
fix(editor): Keep quick-connect OAuth credentials out of lists until the user authorizes (#39297) 2026-09-28 07:15:53 +00:00
Robin Braumann
6c592bdb33
feat(core): Add the durable agent message queue foundation (#39435) 2026-09-24 12:27:30 +00:00
Bernhard Wittmann
f9982ef182
feat(core): Add the Microsoft Teams agent channel (no-changelog) (#38686)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-24 07:06:58 +00:00
mfsiega
8c720987cb
fix(core): Persist workflow publication retry state (no-changelog) (#39266) 2026-09-23 13:13:46 +00:00
Lorent Lempereur
60bfb02db9
feat(core): Add a concurrency limit option to durable scheduled jobs (no-changelog) (#39166) 2026-09-23 09:04:27 +00:00
Matsu
196ed7f450
refactor(core): Enforce persistence boundaries in code (no-changelog) (#39170) 2026-09-22 13:14:00 +03:00
Robin Braumann
5ba266db25
feat(core): Scope agent preview sessions to their owner (#39100) 2026-09-22 09:22:44 +00:00
Robin Braumann
40ed55b37f
fix(core): Shorten checkpoint migration index name (no-changelog) (#39184) 2026-09-21 13:51:14 +00:00
Robin Braumann
82b40c3218
refactor(core): Centralize agent conversation state checks (no-changelog) (#39038) 2026-09-21 10:55:17 +00:00
Arvin A
33def0e800
feat(core): Add a description field to credentials (no-changelog) (#38839) 2026-09-17 13:16:34 +00:00
Roman Makowiak
fe1012d75f
feat(core): Add the foundations for assistant-written preferences (no-changelog) (#38829)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-17 11:53:09 +00:00
Rúben Castro
d61003c395
feat(API): Add node type policy document and attachment endpoints (no-changelog) (#38229)
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-15 10:44:03 +00:00
Tuukka Kantola
c979296d6c
feat(editor): Add paginated AI Assistant chat history (#38467)
Co-authored-by: r00gm <raul00gm@gmail.com>
2026-09-14 14:01:07 +00:00
Robin Braumann
072f4960f0
feat(core): Share integration threads across participants (#38461)
Some checks are pending
CI: Master (Build, Test, Lint) / Build for Github Cache (push) Waiting to run
CI: Master (Build, Test, Lint) / Unit tests (24.18.1) (push) Waiting to run
CI: Master (Build, Test, Lint) / Unit tests (26.5.1) (push) Waiting to run
CI: Master (Build, Test, Lint) / Lint (push) Waiting to run
CI: Master (Build, Test, Lint) / Performance (push) Waiting to run
CI: Master (Build, Test, Lint) / Verify single-instance deps (npm-install) (push) Waiting to run
CI: Master (Build, Test, Lint) / Notify Slack on failure (push) Blocked by required conditions
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-12 05:14:33 +00:00
Robin Braumann
5de6a4071a
feat(core): Add agent-directed episodic memory capture (#38134)
Co-authored-by: Michael Drury <michael.drury@n8n.io>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-11 05:03:28 +00:00
Svetoslav Dekov
cf8df4fa6c
feat(core): Add ai_preference table for AI preferences (#38131)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-10 05:22:31 +00:00
Kai
179dbb35b6
feat(core): Move promotions services and API to the new model (#37965) 2026-09-09 11:19:56 +00:00
Kai
e77b7bb12f
feat(core): Add promotion schema entities and DTOs (#37939) 2026-09-09 07:17:09 +00:00
Eugene
588543cba8
feat(core): Store parent identity on background jobs (#37752)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-08 12:47:30 +00:00
Robin Braumann
19eba4305b
feat(core): Index agent workflow tool dependencies and invalidate dependent runtimes (#37857)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-07 17:14:03 +00:00