Skip to content

Commit 5ac10d6

Browse files
committed
feat(subagents): add persistent subagents
1 parent 7784f8c commit 5ac10d6

3 files changed

Lines changed: 43 additions & 3 deletions

File tree

apps/sim/lib/copilot/generated/tool-catalog-v1.ts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3252,6 +3252,12 @@ export const Respond: ToolCatalogEntry = {
32523252
'The result — facts, status, VFS paths to persisted data, whatever the caller needs to act on.',
32533253
type: 'string',
32543254
},
3255+
paths: {
3256+
description:
3257+
'Affected VFS file paths. Required when the File Agent reports a successful file mutation.',
3258+
items: { type: 'string' },
3259+
type: 'array',
3260+
},
32553261
success: { description: 'Whether the task completed successfully', type: 'boolean' },
32563262
type: { description: 'Optional logical result type override', type: 'string' },
32573263
},
@@ -4296,10 +4302,23 @@ export const Workflow: ToolCatalogEntry = {
42964302
properties: {
42974303
prompt: {
42984304
description:
4299-
"Optional brief instruction (one short sentence) to scope the task. The agent inherits the full conversation history — do NOT restate or rewrite conversation content, only add scoping the history doesn't convey.",
4305+
'Optional brief instruction (one short sentence) to add scoping that the conversation does not convey. Usually omit it: a new session inherits the current conversation, and a resumed session receives the parent messages it has not yet seen. Do NOT restate or rewrite conversation content.',
4306+
type: 'string',
4307+
},
4308+
sessionId: {
4309+
description:
4310+
'Reusable session ID returned by an earlier workflow call in this chat. Supply it only on a later user message that continues the same task; the agent resumes from its saved transcript and receives unseen parent conversation messages. Omit it for a new or independent task.',
4311+
type: 'string',
4312+
},
4313+
title: {
4314+
description:
4315+
"Required private orchestration label (3–8 words) for this session's stable objective. It is stored in the request-local, chat-scoped Subagent Registry supplied only to the main orchestrator and is not shown to or used as an instruction for the workflow agent. When resuming with sessionId, copy the registry title unchanged.",
4316+
maxLength: 120,
4317+
minLength: 1,
43004318
type: 'string',
43014319
},
43024320
},
4321+
required: ['title'],
43034322
type: 'object',
43044323
},
43054324
subagentId: 'workflow',

apps/sim/lib/copilot/generated/tool-schemas-v1.ts

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2942,6 +2942,14 @@ export const TOOL_RUNTIME_SCHEMAS: Record<string, ToolRuntimeSchemaEntry> = {
29422942
'The result — facts, status, VFS paths to persisted data, whatever the caller needs to act on.',
29432943
type: 'string',
29442944
},
2945+
paths: {
2946+
description:
2947+
'Affected VFS file paths. Required when the File Agent reports a successful file mutation.',
2948+
items: {
2949+
type: 'string',
2950+
},
2951+
type: 'array',
2952+
},
29452953
success: {
29462954
description: 'Whether the task completed successfully',
29472955
type: 'boolean',
@@ -3991,10 +3999,23 @@ export const TOOL_RUNTIME_SCHEMAS: Record<string, ToolRuntimeSchemaEntry> = {
39913999
properties: {
39924000
prompt: {
39934001
description:
3994-
"Optional brief instruction (one short sentence) to scope the task. The agent inherits the full conversation history — do NOT restate or rewrite conversation content, only add scoping the history doesn't convey.",
4002+
'Optional brief instruction (one short sentence) to add scoping that the conversation does not convey. Usually omit it: a new session inherits the current conversation, and a resumed session receives the parent messages it has not yet seen. Do NOT restate or rewrite conversation content.',
4003+
type: 'string',
4004+
},
4005+
sessionId: {
4006+
description:
4007+
'Reusable session ID returned by an earlier workflow call in this chat. Supply it only on a later user message that continues the same task; the agent resumes from its saved transcript and receives unseen parent conversation messages. Omit it for a new or independent task.',
4008+
type: 'string',
4009+
},
4010+
title: {
4011+
description:
4012+
"Required private orchestration label (3–8 words) for this session's stable objective. It is stored in the request-local, chat-scoped Subagent Registry supplied only to the main orchestrator and is not shown to or used as an instruction for the workflow agent. When resuming with sessionId, copy the registry title unchanged.",
4013+
maxLength: 120,
4014+
minLength: 1,
39954015
type: 'string',
39964016
},
39974017
},
4018+
required: ['title'],
39984019
type: 'object',
39994020
},
40004021
resultSchema: undefined,

scripts/sync-tool-catalog.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ function renderRuntimeSchemaModule(catalog: { tools: Record<string, unknown>[] }
9191
'parameters' in tool ? JSON.stringify(tool.parameters ?? null, null, 2) : 'undefined'
9292
const resultSchema =
9393
'resultSchema' in tool ? JSON.stringify(tool.resultSchema ?? null, null, 2) : 'undefined'
94-
lines.push(` [${id}]: {`)
94+
lines.push(` ${id}: {`)
9595
lines.push(
9696
` parameters: ${parameters === 'null' ? 'undefined' : parameters.replace(/\n/g, '\n ')},`
9797
)

0 commit comments

Comments
 (0)