Skip to content

Commit 5de4b76

Browse files
abhipatel12warrenzhu25
authored andcommitted
fix(core): refine CliHelpAgent description for better delegation (google-gemini#23310)
1 parent c6aa787 commit 5de4b76

2 files changed

Lines changed: 26 additions & 1 deletion

File tree

evals/cli_help_delegation.eval.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { describe, expect } from 'vitest';
2+
import { evalTest } from './test-helper.js';
3+
4+
describe('CliHelpAgent Delegation', () => {
5+
evalTest('USUALLY_PASSES', {
6+
name: 'should delegate to cli_help agent for subagent creation questions',
7+
params: {
8+
settings: {
9+
experimental: {
10+
enableAgents: true,
11+
},
12+
},
13+
},
14+
prompt: 'Help me create a subagent in this project',
15+
timeout: 60000,
16+
assert: async (rig, _result) => {
17+
const toolLogs = rig.readToolLogs();
18+
const toolCallIndex = toolLogs.findIndex(
19+
(log) => log.toolRequest.name === 'cli_help',
20+
);
21+
expect(toolCallIndex).toBeGreaterThan(-1);
22+
expect(toolCallIndex).toBeLessThan(5); // Called within first 5 turns
23+
},
24+
});
25+
});

packages/core/src/agents/cli-help-agent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const CliHelpAgent = (
3030
kind: 'local',
3131
displayName: 'CLI Help Agent',
3232
description:
33-
'Specialized in answering questions about how users use you, (Gemini CLI): features, documentation, and current runtime configuration.',
33+
'Specialized agent for answering questions about the Gemini CLI application. Invoke this agent for questions regarding CLI features, configuration schemas (e.g., policies), or instructions on how to create custom subagents. It queries internal documentation to provide accurate usage guidance.',
3434
inputConfig: {
3535
inputSchema: {
3636
type: 'object',

0 commit comments

Comments
 (0)