improved subagent instructions

This commit is contained in:
2026-08-04 12:03:31 -04:00
parent be08db8e2c
commit 7fbb42c26a

View File

@@ -9,6 +9,8 @@ import {dirname, join} from 'path';
import {spawn} from 'node:child_process';
import {Memory, MemoryCache, MemoryManager, MemoryOptions} from './memory.ts';
const MAX_AGENT_DEPTH = 5;
export type AnthropicConfig = {proto: 'anthropic', token: string};
export type OpenAiConfig = {proto: 'openai', host?: string, token: string};
@@ -104,8 +106,6 @@ export type Skill = {
content: string;
}
const MAX_AGENT_DEPTH = 5;
class LLM {
private memoryManager!: MemoryManager;
@@ -143,7 +143,7 @@ class LLM {
const start = Date.now();
const request = this.ask(`${args.instructions}${args.context ? `\n\n<context>${args.context}</context>` : ''}`, {
system: `You are a specialized subagent. ${a.delegate ? 'Your output streams directly to the user for the remainder of this turn.' : 'You are wrapped in a tool call that will be analysis by an LLM'}
system: `You are a specialized subagent. ${a.delegate ? 'Your output streams directly to the user for the remainder of this turn. You are mid conversation - dispense with greetings.' : 'You are wrapped in a tool call that will be analysis by an LLM - dispense with conversation'}
As a subagent, focus on executing your task completely using available tools and returning only the final result - no commentary, questions, or dialogue.
${a.system}`,