diff --git a/nanobot/agent/context.py b/nanobot/agent/context.py index f460f2b..21ad01f 100644 --- a/nanobot/agent/context.py +++ b/nanobot/agent/context.py @@ -71,7 +71,7 @@ Skills with available="false" need dependencies installed first - you can try in return "\n\n---\n\n".join(parts) def _get_identity(self) -> str: - """Get the core identity section.""" + """Get the core identity section with runtime context.""" from datetime import datetime import time as _time now = datetime.now().strftime("%Y-%m-%d %H:%M (%A)") @@ -79,10 +79,8 @@ Skills with available="false" need dependencies installed first - you can try in workspace_path = str(self.workspace.expanduser().resolve()) system = platform.system() runtime = f"{'macOS' if system == 'Darwin' else system} {platform.machine()}, Python {platform.python_version()}" - - return f"""# nanobot 🐈 -You are nanobot, a helpful AI assistant. You have access to tools that allow you to: + return f"""You have access to tools that allow you to: - Read, write, and edit files - Execute shell commands - Search the web and fetch web pages diff --git a/nanobot/providers/anthropic_oauth.py b/nanobot/providers/anthropic_oauth.py index 3415b3a..a840faa 100644 --- a/nanobot/providers/anthropic_oauth.py +++ b/nanobot/providers/anthropic_oauth.py @@ -11,7 +11,7 @@ import httpx from loguru import logger from nanobot.providers.base import LLMProvider, LLMResponse, ToolCallRequest -from nanobot.providers.oauth_utils import get_auth_headers, get_claude_code_system_prefix +from nanobot.providers.oauth_utils import get_auth_headers class AnthropicOAuthProvider(LLMProvider): @@ -78,7 +78,7 @@ class AnthropicOAuthProvider(LLMProvider): Returns (system_prompt, anthropic_messages) """ - system_parts = [get_claude_code_system_prefix()] + system_parts = [] converted: list[dict[str, Any]] = [] for msg in messages: diff --git a/nanobot/providers/oauth_utils.py b/nanobot/providers/oauth_utils.py index f2e32e2..30e2221 100644 --- a/nanobot/providers/oauth_utils.py +++ b/nanobot/providers/oauth_utils.py @@ -36,11 +36,3 @@ def get_auth_headers(token: str, is_oauth: bool = False) -> dict[str, str]: headers["x-api-key"] = token return headers - - -def get_claude_code_system_prefix() -> str: - """Get the required system prompt prefix for OAuth tokens. - - Anthropic requires this identity declaration for OAuth auth. - """ - return "You are Claude Code, Anthropic's official CLI for Claude."