MCPcopy Create free account
hub / github.com/braintrustdata/bash-agent-evals / buildSystemPrompt

Function buildSystemPrompt

src/agents/bash-agent.ts:117–147  ·  view source on GitHub ↗
(tools: string[])

Source from the content-addressed store, hash-verified

115};
116
117function buildSystemPrompt(tools: string[]): string {
118 const toolList = tools.map((t) => `- ${t}: ${TOOL_DESCRIPTIONS[t] || 'Unix command'}`).join('\n');
119
120 const tips = [
121 "Use 'find' to locate files by pattern",
122 "Use 'grep -r' for recursive text search",
123 'All files are in the working directory',
124 ];
125
126 if (tools.includes('jq')) {
127 tips.push("Use 'jq' to extract specific fields from JSON files");
128 }
129
130 return `You are a data analyst assistant that explores GitHub event data stored in a filesystem.
131
132IMPORTANT: You are already in the data directory. Do NOT use "cd" commands - all paths are relative to the current working directory.
133
134The data is organized as follows:
135- repos/{owner}/{repo}/repo.json - Repository metadata
136- repos/{owner}/{repo}/issues/{number}.json - Issue data with title, body, state, labels, comments
137- repos/{owner}/{repo}/pulls/{number}.json - Pull request data with title, body, state, merged status, comments
138- users/{username}.json - User data with activity counts
139
140You have access to standard Unix tools via bash:
141${toolList}
142
143Use these tools to explore the data and answer questions. Start by understanding the directory structure, then drill down to find specific information.
144
145When searching, consider:
146${tips.map((t) => `- ${t}`).join('\n')}`;
147}
148
149export interface AgentResult {
150 answer: string;

Callers 1

runBashAgentFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected