diff --git a/packages/core/src/core/__snapshots__/prompts.test.ts.snap b/packages/core/src/core/__snapshots__/prompts.test.ts.snap index 4e66e3403c4..099a3ffb3e3 100644 --- a/packages/core/src/core/__snapshots__/prompts.test.ts.snap +++ b/packages/core/src/core/__snapshots__/prompts.test.ts.snap @@ -532,11 +532,7 @@ exports[`Core System Prompt (prompts.ts) > should append userMemory with separat # Available Sub-Agents -Sub-agents are specialized expert agents that you can use to assist you in the completion of all or part of a task. - -Each sub-agent is available as a tool of the same name. You MUST always delegate tasks to the sub-agent with the relevant expertise, if one is available. - -The following tools can be used to start sub-agents: +Sub-agents are specialized expert agents. Each sub-agent is available as a tool of the same name. You MUST delegate tasks to the sub-agent with the most relevant expertise. @@ -1331,11 +1327,7 @@ exports[`Core System Prompt (prompts.ts) > should include correct sandbox instru # Available Sub-Agents -Sub-agents are specialized expert agents that you can use to assist you in the completion of all or part of a task. - -Each sub-agent is available as a tool of the same name. You MUST always delegate tasks to the sub-agent with the relevant expertise, if one is available. - -The following tools can be used to start sub-agents: +Sub-agents are specialized expert agents. Each sub-agent is available as a tool of the same name. You MUST delegate tasks to the sub-agent with the most relevant expertise. @@ -1454,11 +1446,7 @@ exports[`Core System Prompt (prompts.ts) > should include correct sandbox instru # Available Sub-Agents -Sub-agents are specialized expert agents that you can use to assist you in the completion of all or part of a task. - -Each sub-agent is available as a tool of the same name. You MUST always delegate tasks to the sub-agent with the relevant expertise, if one is available. - -The following tools can be used to start sub-agents: +Sub-agents are specialized expert agents. Each sub-agent is available as a tool of the same name. You MUST delegate tasks to the sub-agent with the most relevant expertise. @@ -1577,11 +1565,7 @@ exports[`Core System Prompt (prompts.ts) > should include correct sandbox instru # Available Sub-Agents -Sub-agents are specialized expert agents that you can use to assist you in the completion of all or part of a task. - -Each sub-agent is available as a tool of the same name. You MUST always delegate tasks to the sub-agent with the relevant expertise, if one is available. - -The following tools can be used to start sub-agents: +Sub-agents are specialized expert agents. Each sub-agent is available as a tool of the same name. You MUST delegate tasks to the sub-agent with the most relevant expertise. @@ -1808,15 +1792,11 @@ exports[`Core System Prompt (prompts.ts) > should include sub-agents in XML for # Available Sub-Agents -Sub-agents are specialized expert agents that you can use to assist you in the completion of all or part of a task. - -Each sub-agent is available as a tool of the same name. You MUST always delegate tasks to the sub-agent with the relevant expertise, if one is available. - -The following tools can be used to start sub-agents: +Sub-agents are specialized expert agents. Each sub-agent is available as a tool of the same name. You MUST delegate tasks to the sub-agent with the most relevant expertise. - Test Agent + test-agent A test agent description @@ -2039,11 +2019,7 @@ exports[`Core System Prompt (prompts.ts) > should return the base prompt when us # Available Sub-Agents -Sub-agents are specialized expert agents that you can use to assist you in the completion of all or part of a task. - -Each sub-agent is available as a tool of the same name. You MUST always delegate tasks to the sub-agent with the relevant expertise, if one is available. - -The following tools can be used to start sub-agents: +Sub-agents are specialized expert agents. Each sub-agent is available as a tool of the same name. You MUST delegate tasks to the sub-agent with the most relevant expertise. @@ -2158,11 +2134,7 @@ exports[`Core System Prompt (prompts.ts) > should return the base prompt when us # Available Sub-Agents -Sub-agents are specialized expert agents that you can use to assist you in the completion of all or part of a task. - -Each sub-agent is available as a tool of the same name. You MUST always delegate tasks to the sub-agent with the relevant expertise, if one is available. - -The following tools can be used to start sub-agents: +Sub-agents are specialized expert agents. Each sub-agent is available as a tool of the same name. You MUST delegate tasks to the sub-agent with the most relevant expertise. @@ -2388,11 +2360,7 @@ exports[`Core System Prompt (prompts.ts) > should use chatty system prompt for p # Available Sub-Agents -Sub-agents are specialized expert agents that you can use to assist you in the completion of all or part of a task. - -Each sub-agent is available as a tool of the same name. You MUST always delegate tasks to the sub-agent with the relevant expertise, if one is available. - -The following tools can be used to start sub-agents: +Sub-agents are specialized expert agents. Each sub-agent is available as a tool of the same name. You MUST delegate tasks to the sub-agent with the most relevant expertise. @@ -2507,11 +2475,7 @@ exports[`Core System Prompt (prompts.ts) > should use chatty system prompt for p # Available Sub-Agents -Sub-agents are specialized expert agents that you can use to assist you in the completion of all or part of a task. - -Each sub-agent is available as a tool of the same name. You MUST always delegate tasks to the sub-agent with the relevant expertise, if one is available. - -The following tools can be used to start sub-agents: +Sub-agents are specialized expert agents. Each sub-agent is available as a tool of the same name. You MUST delegate tasks to the sub-agent with the most relevant expertise. diff --git a/packages/core/src/core/prompts.test.ts b/packages/core/src/core/prompts.test.ts index 5307c3235a7..67042dfc0f1 100644 --- a/packages/core/src/core/prompts.test.ts +++ b/packages/core/src/core/prompts.test.ts @@ -178,7 +178,7 @@ describe('Core System Prompt (prompts.ts)', () => { expect(prompt).toContain('# Available Sub-Agents'); expect(prompt).toContain(''); expect(prompt).toContain(''); - expect(prompt).toContain('Test Agent'); + expect(prompt).toContain('test-agent'); expect(prompt).toContain( 'A test agent description', ); diff --git a/packages/core/src/prompts/promptProvider.ts b/packages/core/src/prompts/promptProvider.ts index 1e6ee4206f6..37ca51bcc46 100644 --- a/packages/core/src/prompts/promptProvider.ts +++ b/packages/core/src/prompts/promptProvider.ts @@ -120,7 +120,7 @@ export class PromptProvider { .getAgentRegistry() .getAllDefinitions() .map((d) => ({ - name: d.displayName || d.name, + name: d.name, description: d.description, })), ), diff --git a/packages/core/src/prompts/snippets.ts b/packages/core/src/prompts/snippets.ts index 2a713afbed1..76b7363c869 100644 --- a/packages/core/src/prompts/snippets.ts +++ b/packages/core/src/prompts/snippets.ts @@ -175,11 +175,7 @@ export function renderSubAgents(subAgents?: SubAgentOptions[]): string { return ` # Available Sub-Agents -Sub-agents are specialized expert agents that you can use to assist you in the completion of all or part of a task. - -Each sub-agent is available as a tool of the same name. You MUST always delegate tasks to the sub-agent with the relevant expertise, if one is available. - -The following tools can be used to start sub-agents: +Sub-agents are specialized expert agents. Each sub-agent is available as a tool of the same name. You MUST delegate tasks to the sub-agent with the most relevant expertise. ${subAgentsXml} diff --git a/packages/core/src/prompts/utils.ts b/packages/core/src/prompts/utils.ts index edb95c5080b..768aaf1720a 100644 --- a/packages/core/src/prompts/utils.ts +++ b/packages/core/src/prompts/utils.ts @@ -77,7 +77,7 @@ export function applySubstitutions( .getAgentRegistry() .getAllDefinitions() .map((d) => ({ - name: d.displayName || d.name, + name: d.name, description: d.description, })), );