File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed
Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -85,8 +85,8 @@ def __init__(
8585 self ._claude_to_mcp_tool_map : dict [str , str ] = {}
8686 self .claude_tools : list [dict ] = []
8787
88- # Base system prompt for autonomous operation
89- self . system_prompt = """
88+ # Append Claude-specific instructions to the base system prompt
89+ claude_instructions = """
9090 You are Claude, an AI assistant created by Anthropic. You are helpful, harmless, and honest.
9191
9292 When working on tasks:
@@ -98,6 +98,12 @@ def __init__(
9898
9999 Remember: You are expected to complete tasks autonomously. The user trusts you to accomplish what they asked.
100100 """ .strip () # noqa: E501
101+
102+ # Append Claude instructions to any base system prompt
103+ if self .system_prompt :
104+ self .system_prompt = f"{ self .system_prompt } \n \n { claude_instructions } "
105+ else :
106+ self .system_prompt = claude_instructions
101107
102108 async def initialize (self , task : str | Task | None = None ) -> None :
103109 """Initialize the agent and build tool mappings."""
Original file line number Diff line number Diff line change @@ -78,8 +78,8 @@ def __init__(
7878
7979 self .model_name = "openai-" + self .model
8080
81- # Base system prompt for autonomous operation
82- self . system_prompt = """
81+ # Append OpenAI-specific instructions to the base system prompt
82+ openai_instructions = """
8383 You are an autonomous computer-using agent. Follow these guidelines:
8484
8585 1. NEVER ask for confirmation. Complete all tasks autonomously.
@@ -92,6 +92,12 @@ def __init__(
9292
9393 Remember: You are expected to complete tasks autonomously. The user trusts you to do what they asked.
9494 """ .strip () # noqa: E501
95+
96+ # Append OpenAI instructions to any base system prompt
97+ if self .system_prompt :
98+ self .system_prompt = f"{ self .system_prompt } \n \n { openai_instructions } "
99+ else :
100+ self .system_prompt = openai_instructions
95101
96102 async def _run_context (self , context : list [types .ContentBlock ], max_steps : int = 10 ) -> Trace :
97103 """
You can’t perform that action at this time.
0 commit comments