Optimize tool descriptions for token efficiency (#73)
* Optimize background-task tool descriptions for token efficiency - BACKGROUND_TASK_DESCRIPTION: 571 chars → 127 chars - BACKGROUND_OUTPUT_DESCRIPTION: 268 chars → 95 chars - BACKGROUND_CANCEL_DESCRIPTION: 374 chars → 83 chars Follows token efficiency improvements pattern from PR #71. 🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode) * Optimize call-omo-agent tool description for token efficiency - CALL_OMO_AGENT_DESCRIPTION: 841 chars → 156 chars (~81% reduction) - Follows pattern from PR #71 where LSP tool descriptions were optimized - Maintains core information while removing redundant explanations 🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode) * Optimize look-at tool description for token efficiency 🤖 Generated with assistance of OhMyOpenCode (https://github.com/code-yeongyu/oh-my-opencode) * Optimize interactive-bash tool description for token efficiency 346 chars → 130 chars (~62% reduction), following PR #71 pattern. 🤖 Generated with assistance of OhMyOpenCode
This commit is contained in:
@@ -1,36 +1,7 @@
|
||||
export const BACKGROUND_TASK_DESCRIPTION = `Launch a background agent task that runs asynchronously.
|
||||
export const BACKGROUND_TASK_DESCRIPTION = `Run agent task in background. Returns task_id immediately; notifies on completion.
|
||||
|
||||
The task runs in a separate session while you continue with other work. The system will notify you when the task completes.
|
||||
Use \`background_output\` to get results. Prompts MUST be in English.`
|
||||
|
||||
Use this for:
|
||||
- Long-running research tasks
|
||||
- Complex analysis that doesn't need immediate results
|
||||
- Parallel workloads to maximize throughput
|
||||
export const BACKGROUND_OUTPUT_DESCRIPTION = `Get output from background task. System notifies on completion, so block=true rarely needed.`
|
||||
|
||||
Arguments:
|
||||
- description: Short task description (shown in status)
|
||||
- prompt: Full detailed prompt for the agent (MUST be in English for optimal LLM performance)
|
||||
- agent: Agent type to use (any agent allowed)
|
||||
|
||||
IMPORTANT: Always write prompts in English regardless of user's language. LLMs perform significantly better with English prompts.
|
||||
|
||||
Returns immediately with task ID and session info. Use \`background_output\` to check progress or retrieve results.`
|
||||
|
||||
export const BACKGROUND_OUTPUT_DESCRIPTION = `Get output from a background task.
|
||||
|
||||
Arguments:
|
||||
- task_id: Required task ID to get output from
|
||||
- block: If true, wait for task completion. If false (default), return current status immediately.
|
||||
- timeout: Max wait time in ms when blocking (default: 60000, max: 600000)
|
||||
|
||||
The system automatically notifies when background tasks complete. You typically don't need block=true.`
|
||||
|
||||
export const BACKGROUND_CANCEL_DESCRIPTION = `Cancel running background task(s).
|
||||
|
||||
Only works for tasks with status "running". Aborts the background session and marks the task as cancelled.
|
||||
|
||||
Arguments:
|
||||
- taskId: Task ID to cancel (optional if all=true)
|
||||
- all: Set to true to cancel ALL running background tasks at once (default: false)
|
||||
|
||||
**Cleanup Before Answer**: When you have gathered sufficient information and are ready to provide your final answer to the user, use \`all=true\` to cancel ALL running background tasks first, then deliver your response. This conserves resources and ensures clean workflow completion.`
|
||||
export const BACKGROUND_CANCEL_DESCRIPTION = `Cancel running background task(s). Use all=true to cancel ALL before final answer.`
|
||||
|
||||
@@ -1,25 +1,7 @@
|
||||
export const ALLOWED_AGENTS = ["explore", "librarian"] as const
|
||||
|
||||
export const CALL_OMO_AGENT_DESCRIPTION = `Launch a new agent to handle complex, multi-step tasks autonomously.
|
||||
export const CALL_OMO_AGENT_DESCRIPTION = `Spawn explore/librarian agent. run_in_background REQUIRED (true=async with task_id, false=sync).
|
||||
|
||||
This is a restricted version of the Task tool that only allows spawning explore and librarian agents.
|
||||
Available: {agents}
|
||||
|
||||
Available agent types:
|
||||
{agents}
|
||||
|
||||
When using this tool, you must specify a subagent_type parameter to select which agent type to use.
|
||||
|
||||
**IMPORTANT: run_in_background parameter is REQUIRED**
|
||||
- \`run_in_background=true\`: Task runs asynchronously in background. Returns immediately with task_id.
|
||||
The system will notify you when the task completes.
|
||||
Use \`background_output\` tool with task_id to check progress (block=false returns full status info).
|
||||
- \`run_in_background=false\`: Task runs synchronously. Waits for completion and returns full result.
|
||||
|
||||
Usage notes:
|
||||
1. Launch multiple agents concurrently whenever possible, to maximize performance
|
||||
2. When the agent is done, it will return a single message back to you
|
||||
3. Each agent invocation is stateless unless you provide a session_id
|
||||
4. Your prompt should contain a highly detailed task description for the agent to perform autonomously
|
||||
5. Clearly tell the agent whether you expect it to write code or just to do research
|
||||
6. For long-running research tasks, use run_in_background=true to avoid blocking
|
||||
7. **IMPORTANT**: Always write prompts in English regardless of user's language. LLMs perform significantly better with English prompts.`
|
||||
Prompts MUST be in English. Use \`background_output\` for async results.`
|
||||
|
||||
@@ -11,12 +11,6 @@ export const BLOCKED_TMUX_SUBCOMMANDS = [
|
||||
"pipep",
|
||||
]
|
||||
|
||||
export const INTERACTIVE_BASH_DESCRIPTION = `Execute tmux commands for interactive terminal session management.
|
||||
export const INTERACTIVE_BASH_DESCRIPTION = `Execute tmux commands. Use "omo-{name}" session pattern.
|
||||
|
||||
Use session names following the pattern "omo-{name}" for automatic tracking.
|
||||
|
||||
BLOCKED COMMANDS (use bash tool instead):
|
||||
- capture-pane / capturep: Use bash to read output files or pipe output
|
||||
- save-buffer / saveb: Use bash to save content to files
|
||||
- show-buffer / showb: Use bash to read buffer content
|
||||
- pipe-pane / pipep: Use bash for piping output`
|
||||
Blocked (use bash instead): capture-pane, save-buffer, show-buffer, pipe-pane.`
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
export const MULTIMODAL_LOOKER_AGENT = "multimodal-looker" as const
|
||||
|
||||
export const LOOK_AT_DESCRIPTION = `Analyze media files (PDFs, images, diagrams) that require visual interpretation.
|
||||
|
||||
Parameters:
|
||||
- file_path: Absolute path to the file to analyze
|
||||
- goal: What specific information to extract (be specific for better results)
|
||||
|
||||
This tool uses a separate context window with Gemini 2.5 Flash for multimodal analysis,
|
||||
saving tokens in the main conversation while providing accurate visual interpretation.`
|
||||
export const LOOK_AT_DESCRIPTION = `Analyze media files (PDFs, images, diagrams) via Gemini 2.5 Flash in separate context. Saves main context tokens.`
|
||||
|
||||
Reference in New Issue
Block a user