Skip to content

Commit 4a4dcbd

Browse files
authored
Strengthen system prompt to ensure agent calls tools (#4)
The agent was responding conversationally ("Sure, let me check!") instead of actually invoking tools. Add explicit instructions mapping user requests to specific tool calls with ALWAYS/Never directives.
1 parent fa792b7 commit 4a4dcbd

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

patchwork/agent.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,15 @@
3232
- send_cc: Send a single MIDI CC value to a synth parameter
3333
- send_patch: Send multiple MIDI CC values at once to set a full patch
3434
35-
When the user asks you to set a sound or tweak a parameter, use these tools.
36-
Always confirm what you sent after a successful tool call.
35+
IMPORTANT: When the user asks you to do something that a tool can handle, ALWAYS
36+
call the tool immediately. Never respond with "let me check" or "sure" without
37+
actually calling the tool. Specifically:
38+
- "list synths" / "what synths" → call list_synths
39+
- "list ports" / "midi ports" → call list_midi_ports
40+
- "connect" → call connect_midi
41+
- "set [param] to [value]" → call send_cc
42+
- Any request to dial in a patch → call send_patch
43+
After a tool call, report the results to the user.
3744
3845
Tone: conversational but concise. Use musical and technical terminology naturally.
3946
When describing a patch, be specific enough that someone could recreate it by hand.

0 commit comments

Comments
 (0)