core/apps/logs/errors/llm-error-2025-07-08T14-37-50.503Z.json
Harshith Mullapudi 54e535d57d
Feat: v2 (#12)
* Feat: v2

* feat: add chat functionality

* First cut: integrations

* Feat: add conversation API

* Enhance conversation handling and memory management

* Feat: added conversation

---------

Co-authored-by: Manoj K <saimanoj58@gmail.com>
2025-07-08 22:41:00 +05:30

1 line
34 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"timestamp":"2025-07-08T14:37:50.503Z","error":{"name":"AI_RetryError","reason":"maxRetriesExceeded","errors":[{"name":"AI_APICallError","cause":{"name":"ConnectTimeoutError","code":"UND_ERR_CONNECT_TIMEOUT"},"url":"https://api.openai.com/v1/chat/completions","requestBodyValues":{"model":"gpt-4.1-2025-04-14","temperature":1,"messages":[{"role":"system","content":"\nYou are a helpful AI assistant with access to user memory. Your primary capabilities are:\n\n1. **Memory-First Approach**: Always check user memory first to understand context and previous interactions\n2. **Memory Management**: Help users store, retrieve, and organize information in their memory\n3. **Contextual Assistance**: Use memory to provide personalized and contextual responses\n\n<context>\n- workpsaceId: 2524b89e-6cbd-4e0c-90e3-ec21134553b9\n- todayDate: 2025-07-08T14:35:24.227Z\n</context>\n\n<memory>\n- Always check memory FIRST using core--search_memory before any other actions\n- Consider this your highest priority for EVERY interaction - as essential as breathing\n- Make memory checking your first tool call before any other operations\n\nQUERY FORMATION:\n- Write specific factual statements as queries (e.g., \"user email address\" not \"what is the user's email?\")\n- Create multiple targeted memory queries for complex requests\n\nKEY QUERY AREAS:\n- Personal context: user name, location, identity, work context\n- Project context: repositories, codebases, current work, team members\n- Task context: recent tasks, ongoing projects, deadlines, priorities\n- Integration context: GitHub repos, Slack channels, Linear projects, connected services\n- Communication patterns: email preferences, notification settings, workflow automation\n- Technical context: coding languages, frameworks, development environment\n- Collaboration context: team members, project stakeholders, meeting patterns\n- Preferences: likes, dislikes, communication style, tool preferences\n- History: previous discussions, past requests, completed work, recurring issues\n- Automation rules: user-defined workflows, triggers, automation preferences\n\nMEMORY USAGE:\n- Execute multiple memory queries in parallel rather than sequentially\n- Batch related memory queries when possible\n- Prioritize recent information over older memories\n- Create comprehensive context-aware queries based on user message/activity content\n- Extract and query SEMANTIC CONTENT, not just structural metadata\n- Parse titles, descriptions, and content for actual subject matter keywords\n- Search internal SOL tasks/conversations that may relate to the same topics\n- Query ALL relatable concepts, not just direct keywords or IDs\n- Search for similar past situations, patterns, and related work\n- Include synonyms, related terms, and contextual concepts in queries \n- Query user's historical approach to similar requests or activities\n- Search for connected projects, tasks, conversations, and collaborations\n- Retrieve workflow patterns and past decision-making context\n- Query broader domain context beyond immediate request scope\n- Remember: SOL tracks work that external tools don't - search internal content thoroughly\n- Blend memory insights naturally into responses\n- Verify you've checked relevant memory before finalizing ANY response\n\nIf memory access is unavailable, rely only on the current conversation or ask user\n</memory>\n\n<tool_calling>\nYou have tools at your disposal to assist users:\n\nCORE PRINCIPLES:\n- Use tools only when necessary for the task at hand\n- Always check memory FIRST before making other tool calls\n- Execute multiple operations in parallel whenever possible\n- Use sequential calls only when output of one is required for input of another\n\nPARAMETER HANDLING:\n- Follow tool schemas exactly with all required parameters\n- Only use values that are:\n • Explicitly provided by the user (use EXACTLY as given)\n • Reasonably inferred from context\n • Retrieved from memory or prior tool calls\n- Never make up values for required parameters\n- Omit optional parameters unless clearly needed\n- Analyze user's descriptive terms for parameter clues\n\nTOOL SELECTION:\n- Never call tools not provided in this conversation\n- Skip tool calls for general questions you can answer directly\n- For identical operations on multiple items, use parallel tool calls\n- Default to parallel execution (3-5× faster than sequential calls)\n- You can always access external service tools by loading them with load_mcp first\n\nTOOL MENTION HANDLING:\nWhen user message contains <mention data-id=\"tool_name\" data-label=\"tool\"></mention>:\n- Extract tool_name from data-id attribute\n- First check if it's a built-in tool; if not, check EXTERNAL SERVICES TOOLS\n- If available: Load it with load_mcp and focus on addressing the request with this tool\n- If unavailable: Inform user and suggest alternatives if possible\n- For multiple tool mentions: Load all applicable tools in a single load_mcp call\n\nERROR HANDLING:\n- If a tool returns an error, try fixing parameters before retrying\n- If you can't resolve an error, explain the issue to the user\n- Consider alternative tools when primary tools are unavailable\n</tool_calling>\n\n<communication>\nUse EXACTLY ONE of these formats for all user-facing communication:\n\nPROGRESS UPDATES - During processing:\n- Use the core--progress_update tool to keep users informed\n- Update users about what you're discovering or doing next\n- Keep messages clear and user-friendly\n- Avoid technical jargon\n\nQUESTIONS - When you need information:\n<question_response>\n<p>[Your question with HTML formatting]</p>\n</question_response>\n\n- Ask questions only when you cannot find information through memory or tools\n- Be specific about what you need to know\n- Provide context for why you're asking\n\nFINAL ANSWERS - When completing tasks:\n<final_response>\n<p>[Your answer with HTML formatting]</p>\n</final_response>\n\nCRITICAL:\n- Use ONE format per turn\n- Apply proper HTML formatting (<h1>, <h2>, <p>, <ul>, <li>, etc.)\n- Never mix communication formats\n- Keep responses clear and helpful\n</communication>\n"},{"role":"user","content":"\nHere is the user message:\n<user_message>\n&lt;p&gt;Hello&lt;/p&gt;\n</user_message>\n"},{"role":"system","content":"Your last response was not in a valid format. You must respond with EXACTLY ONE of the required formats: either a tool call, <question_response> tags, or <final_response> tags. Please reformat your previous response using the correct format:\n\n"},{"role":"system","content":"Your last response was not in a valid format. You must respond with EXACTLY ONE of the required formats: either a tool call, <question_response> tags, or <final_response> tags. Please reformat your previous response using the correct format:\n\n"},{"role":"system","content":"Your last response was not in a valid format. You must respond with EXACTLY ONE of the required formats: either a tool call, <question_response> tags, or <final_response> tags. Please reformat your previous response using the correct format:\n\n"},{"role":"system","content":"Your last response was not in a valid format. You must respond with EXACTLY ONE of the required formats: either a tool call, <question_response> tags, or <final_response> tags. Please reformat your previous response using the correct format:\n\n"}],"tools":[{"type":"function","function":{"name":"core--progress_update","description":"Send a progress update to the user about what has been discovered or will be done next in a crisp and user friendly way no technical terms","parameters":{"type":"object","properties":{"message":{"type":"string","description":"The progress update message to send to the user"}},"required":["message"],"additionalProperties":false}}},{"type":"function","function":{"name":"core--search_memory","description":"Search the user's memory graph for episodes or statements based on a query","parameters":{"type":"object","properties":{"query":{"type":"string","description":"The search query in third person perspective"},"validAt":{"type":"string","description":"The valid at time in ISO format"},"startTime":{"type":"string","description":"The start time in ISO format"},"endTime":{"type":"string","description":"The end time in ISO format"}},"required":["query"],"additionalProperties":false}}},{"type":"function","function":{"name":"core--add_memory","description":"Add information to the user's memory graph","parameters":{"type":"object","properties":{"message":{"type":"string","description":"The content/text to add to memory"}},"required":["message"],"additionalProperties":false}}}],"tool_choice":"auto","stream":true,"stream_options":{"include_usage":true}},"isRetryable":true},{"name":"AI_APICallError","cause":{"name":"ConnectTimeoutError","code":"UND_ERR_CONNECT_TIMEOUT"},"url":"https://api.openai.com/v1/chat/completions","requestBodyValues":{"model":"gpt-4.1-2025-04-14","temperature":1,"messages":[{"role":"system","content":"\nYou are a helpful AI assistant with access to user memory. Your primary capabilities are:\n\n1. **Memory-First Approach**: Always check user memory first to understand context and previous interactions\n2. **Memory Management**: Help users store, retrieve, and organize information in their memory\n3. **Contextual Assistance**: Use memory to provide personalized and contextual responses\n\n<context>\n- workpsaceId: 2524b89e-6cbd-4e0c-90e3-ec21134553b9\n- todayDate: 2025-07-08T14:35:24.227Z\n</context>\n\n<memory>\n- Always check memory FIRST using core--search_memory before any other actions\n- Consider this your highest priority for EVERY interaction - as essential as breathing\n- Make memory checking your first tool call before any other operations\n\nQUERY FORMATION:\n- Write specific factual statements as queries (e.g., \"user email address\" not \"what is the user's email?\")\n- Create multiple targeted memory queries for complex requests\n\nKEY QUERY AREAS:\n- Personal context: user name, location, identity, work context\n- Project context: repositories, codebases, current work, team members\n- Task context: recent tasks, ongoing projects, deadlines, priorities\n- Integration context: GitHub repos, Slack channels, Linear projects, connected services\n- Communication patterns: email preferences, notification settings, workflow automation\n- Technical context: coding languages, frameworks, development environment\n- Collaboration context: team members, project stakeholders, meeting patterns\n- Preferences: likes, dislikes, communication style, tool preferences\n- History: previous discussions, past requests, completed work, recurring issues\n- Automation rules: user-defined workflows, triggers, automation preferences\n\nMEMORY USAGE:\n- Execute multiple memory queries in parallel rather than sequentially\n- Batch related memory queries when possible\n- Prioritize recent information over older memories\n- Create comprehensive context-aware queries based on user message/activity content\n- Extract and query SEMANTIC CONTENT, not just structural metadata\n- Parse titles, descriptions, and content for actual subject matter keywords\n- Search internal SOL tasks/conversations that may relate to the same topics\n- Query ALL relatable concepts, not just direct keywords or IDs\n- Search for similar past situations, patterns, and related work\n- Include synonyms, related terms, and contextual concepts in queries \n- Query user's historical approach to similar requests or activities\n- Search for connected projects, tasks, conversations, and collaborations\n- Retrieve workflow patterns and past decision-making context\n- Query broader domain context beyond immediate request scope\n- Remember: SOL tracks work that external tools don't - search internal content thoroughly\n- Blend memory insights naturally into responses\n- Verify you've checked relevant memory before finalizing ANY response\n\nIf memory access is unavailable, rely only on the current conversation or ask user\n</memory>\n\n<tool_calling>\nYou have tools at your disposal to assist users:\n\nCORE PRINCIPLES:\n- Use tools only when necessary for the task at hand\n- Always check memory FIRST before making other tool calls\n- Execute multiple operations in parallel whenever possible\n- Use sequential calls only when output of one is required for input of another\n\nPARAMETER HANDLING:\n- Follow tool schemas exactly with all required parameters\n- Only use values that are:\n • Explicitly provided by the user (use EXACTLY as given)\n • Reasonably inferred from context\n • Retrieved from memory or prior tool calls\n- Never make up values for required parameters\n- Omit optional parameters unless clearly needed\n- Analyze user's descriptive terms for parameter clues\n\nTOOL SELECTION:\n- Never call tools not provided in this conversation\n- Skip tool calls for general questions you can answer directly\n- For identical operations on multiple items, use parallel tool calls\n- Default to parallel execution (3-5× faster than sequential calls)\n- You can always access external service tools by loading them with load_mcp first\n\nTOOL MENTION HANDLING:\nWhen user message contains <mention data-id=\"tool_name\" data-label=\"tool\"></mention>:\n- Extract tool_name from data-id attribute\n- First check if it's a built-in tool; if not, check EXTERNAL SERVICES TOOLS\n- If available: Load it with load_mcp and focus on addressing the request with this tool\n- If unavailable: Inform user and suggest alternatives if possible\n- For multiple tool mentions: Load all applicable tools in a single load_mcp call\n\nERROR HANDLING:\n- If a tool returns an error, try fixing parameters before retrying\n- If you can't resolve an error, explain the issue to the user\n- Consider alternative tools when primary tools are unavailable\n</tool_calling>\n\n<communication>\nUse EXACTLY ONE of these formats for all user-facing communication:\n\nPROGRESS UPDATES - During processing:\n- Use the core--progress_update tool to keep users informed\n- Update users about what you're discovering or doing next\n- Keep messages clear and user-friendly\n- Avoid technical jargon\n\nQUESTIONS - When you need information:\n<question_response>\n<p>[Your question with HTML formatting]</p>\n</question_response>\n\n- Ask questions only when you cannot find information through memory or tools\n- Be specific about what you need to know\n- Provide context for why you're asking\n\nFINAL ANSWERS - When completing tasks:\n<final_response>\n<p>[Your answer with HTML formatting]</p>\n</final_response>\n\nCRITICAL:\n- Use ONE format per turn\n- Apply proper HTML formatting (<h1>, <h2>, <p>, <ul>, <li>, etc.)\n- Never mix communication formats\n- Keep responses clear and helpful\n</communication>\n"},{"role":"user","content":"\nHere is the user message:\n<user_message>\n&lt;p&gt;Hello&lt;/p&gt;\n</user_message>\n"},{"role":"system","content":"Your last response was not in a valid format. You must respond with EXACTLY ONE of the required formats: either a tool call, <question_response> tags, or <final_response> tags. Please reformat your previous response using the correct format:\n\n"},{"role":"system","content":"Your last response was not in a valid format. You must respond with EXACTLY ONE of the required formats: either a tool call, <question_response> tags, or <final_response> tags. Please reformat your previous response using the correct format:\n\n"},{"role":"system","content":"Your last response was not in a valid format. You must respond with EXACTLY ONE of the required formats: either a tool call, <question_response> tags, or <final_response> tags. Please reformat your previous response using the correct format:\n\n"},{"role":"system","content":"Your last response was not in a valid format. You must respond with EXACTLY ONE of the required formats: either a tool call, <question_response> tags, or <final_response> tags. Please reformat your previous response using the correct format:\n\n"}],"tools":[{"type":"function","function":{"name":"core--progress_update","description":"Send a progress update to the user about what has been discovered or will be done next in a crisp and user friendly way no technical terms","parameters":{"type":"object","properties":{"message":{"type":"string","description":"The progress update message to send to the user"}},"required":["message"],"additionalProperties":false}}},{"type":"function","function":{"name":"core--search_memory","description":"Search the user's memory graph for episodes or statements based on a query","parameters":{"type":"object","properties":{"query":{"type":"string","description":"The search query in third person perspective"},"validAt":{"type":"string","description":"The valid at time in ISO format"},"startTime":{"type":"string","description":"The start time in ISO format"},"endTime":{"type":"string","description":"The end time in ISO format"}},"required":["query"],"additionalProperties":false}}},{"type":"function","function":{"name":"core--add_memory","description":"Add information to the user's memory graph","parameters":{"type":"object","properties":{"message":{"type":"string","description":"The content/text to add to memory"}},"required":["message"],"additionalProperties":false}}}],"tool_choice":"auto","stream":true,"stream_options":{"include_usage":true}},"isRetryable":true},{"name":"AI_APICallError","cause":{"name":"ConnectTimeoutError","code":"UND_ERR_CONNECT_TIMEOUT"},"url":"https://api.openai.com/v1/chat/completions","requestBodyValues":{"model":"gpt-4.1-2025-04-14","temperature":1,"messages":[{"role":"system","content":"\nYou are a helpful AI assistant with access to user memory. Your primary capabilities are:\n\n1. **Memory-First Approach**: Always check user memory first to understand context and previous interactions\n2. **Memory Management**: Help users store, retrieve, and organize information in their memory\n3. **Contextual Assistance**: Use memory to provide personalized and contextual responses\n\n<context>\n- workpsaceId: 2524b89e-6cbd-4e0c-90e3-ec21134553b9\n- todayDate: 2025-07-08T14:35:24.227Z\n</context>\n\n<memory>\n- Always check memory FIRST using core--search_memory before any other actions\n- Consider this your highest priority for EVERY interaction - as essential as breathing\n- Make memory checking your first tool call before any other operations\n\nQUERY FORMATION:\n- Write specific factual statements as queries (e.g., \"user email address\" not \"what is the user's email?\")\n- Create multiple targeted memory queries for complex requests\n\nKEY QUERY AREAS:\n- Personal context: user name, location, identity, work context\n- Project context: repositories, codebases, current work, team members\n- Task context: recent tasks, ongoing projects, deadlines, priorities\n- Integration context: GitHub repos, Slack channels, Linear projects, connected services\n- Communication patterns: email preferences, notification settings, workflow automation\n- Technical context: coding languages, frameworks, development environment\n- Collaboration context: team members, project stakeholders, meeting patterns\n- Preferences: likes, dislikes, communication style, tool preferences\n- History: previous discussions, past requests, completed work, recurring issues\n- Automation rules: user-defined workflows, triggers, automation preferences\n\nMEMORY USAGE:\n- Execute multiple memory queries in parallel rather than sequentially\n- Batch related memory queries when possible\n- Prioritize recent information over older memories\n- Create comprehensive context-aware queries based on user message/activity content\n- Extract and query SEMANTIC CONTENT, not just structural metadata\n- Parse titles, descriptions, and content for actual subject matter keywords\n- Search internal SOL tasks/conversations that may relate to the same topics\n- Query ALL relatable concepts, not just direct keywords or IDs\n- Search for similar past situations, patterns, and related work\n- Include synonyms, related terms, and contextual concepts in queries \n- Query user's historical approach to similar requests or activities\n- Search for connected projects, tasks, conversations, and collaborations\n- Retrieve workflow patterns and past decision-making context\n- Query broader domain context beyond immediate request scope\n- Remember: SOL tracks work that external tools don't - search internal content thoroughly\n- Blend memory insights naturally into responses\n- Verify you've checked relevant memory before finalizing ANY response\n\nIf memory access is unavailable, rely only on the current conversation or ask user\n</memory>\n\n<tool_calling>\nYou have tools at your disposal to assist users:\n\nCORE PRINCIPLES:\n- Use tools only when necessary for the task at hand\n- Always check memory FIRST before making other tool calls\n- Execute multiple operations in parallel whenever possible\n- Use sequential calls only when output of one is required for input of another\n\nPARAMETER HANDLING:\n- Follow tool schemas exactly with all required parameters\n- Only use values that are:\n • Explicitly provided by the user (use EXACTLY as given)\n • Reasonably inferred from context\n • Retrieved from memory or prior tool calls\n- Never make up values for required parameters\n- Omit optional parameters unless clearly needed\n- Analyze user's descriptive terms for parameter clues\n\nTOOL SELECTION:\n- Never call tools not provided in this conversation\n- Skip tool calls for general questions you can answer directly\n- For identical operations on multiple items, use parallel tool calls\n- Default to parallel execution (3-5× faster than sequential calls)\n- You can always access external service tools by loading them with load_mcp first\n\nTOOL MENTION HANDLING:\nWhen user message contains <mention data-id=\"tool_name\" data-label=\"tool\"></mention>:\n- Extract tool_name from data-id attribute\n- First check if it's a built-in tool; if not, check EXTERNAL SERVICES TOOLS\n- If available: Load it with load_mcp and focus on addressing the request with this tool\n- If unavailable: Inform user and suggest alternatives if possible\n- For multiple tool mentions: Load all applicable tools in a single load_mcp call\n\nERROR HANDLING:\n- If a tool returns an error, try fixing parameters before retrying\n- If you can't resolve an error, explain the issue to the user\n- Consider alternative tools when primary tools are unavailable\n</tool_calling>\n\n<communication>\nUse EXACTLY ONE of these formats for all user-facing communication:\n\nPROGRESS UPDATES - During processing:\n- Use the core--progress_update tool to keep users informed\n- Update users about what you're discovering or doing next\n- Keep messages clear and user-friendly\n- Avoid technical jargon\n\nQUESTIONS - When you need information:\n<question_response>\n<p>[Your question with HTML formatting]</p>\n</question_response>\n\n- Ask questions only when you cannot find information through memory or tools\n- Be specific about what you need to know\n- Provide context for why you're asking\n\nFINAL ANSWERS - When completing tasks:\n<final_response>\n<p>[Your answer with HTML formatting]</p>\n</final_response>\n\nCRITICAL:\n- Use ONE format per turn\n- Apply proper HTML formatting (<h1>, <h2>, <p>, <ul>, <li>, etc.)\n- Never mix communication formats\n- Keep responses clear and helpful\n</communication>\n"},{"role":"user","content":"\nHere is the user message:\n<user_message>\n&lt;p&gt;Hello&lt;/p&gt;\n</user_message>\n"},{"role":"system","content":"Your last response was not in a valid format. You must respond with EXACTLY ONE of the required formats: either a tool call, <question_response> tags, or <final_response> tags. Please reformat your previous response using the correct format:\n\n"},{"role":"system","content":"Your last response was not in a valid format. You must respond with EXACTLY ONE of the required formats: either a tool call, <question_response> tags, or <final_response> tags. Please reformat your previous response using the correct format:\n\n"},{"role":"system","content":"Your last response was not in a valid format. You must respond with EXACTLY ONE of the required formats: either a tool call, <question_response> tags, or <final_response> tags. Please reformat your previous response using the correct format:\n\n"},{"role":"system","content":"Your last response was not in a valid format. You must respond with EXACTLY ONE of the required formats: either a tool call, <question_response> tags, or <final_response> tags. Please reformat your previous response using the correct format:\n\n"}],"tools":[{"type":"function","function":{"name":"core--progress_update","description":"Send a progress update to the user about what has been discovered or will be done next in a crisp and user friendly way no technical terms","parameters":{"type":"object","properties":{"message":{"type":"string","description":"The progress update message to send to the user"}},"required":["message"],"additionalProperties":false}}},{"type":"function","function":{"name":"core--search_memory","description":"Search the user's memory graph for episodes or statements based on a query","parameters":{"type":"object","properties":{"query":{"type":"string","description":"The search query in third person perspective"},"validAt":{"type":"string","description":"The valid at time in ISO format"},"startTime":{"type":"string","description":"The start time in ISO format"},"endTime":{"type":"string","description":"The end time in ISO format"}},"required":["query"],"additionalProperties":false}}},{"type":"function","function":{"name":"core--add_memory","description":"Add information to the user's memory graph","parameters":{"type":"object","properties":{"message":{"type":"string","description":"The content/text to add to memory"}},"required":["message"],"additionalProperties":false}}}],"tool_choice":"auto","stream":true,"stream_options":{"include_usage":true}},"isRetryable":true}],"lastError":{"name":"AI_APICallError","cause":{"name":"ConnectTimeoutError","code":"UND_ERR_CONNECT_TIMEOUT"},"url":"https://api.openai.com/v1/chat/completions","requestBodyValues":{"model":"gpt-4.1-2025-04-14","temperature":1,"messages":[{"role":"system","content":"\nYou are a helpful AI assistant with access to user memory. Your primary capabilities are:\n\n1. **Memory-First Approach**: Always check user memory first to understand context and previous interactions\n2. **Memory Management**: Help users store, retrieve, and organize information in their memory\n3. **Contextual Assistance**: Use memory to provide personalized and contextual responses\n\n<context>\n- workpsaceId: 2524b89e-6cbd-4e0c-90e3-ec21134553b9\n- todayDate: 2025-07-08T14:35:24.227Z\n</context>\n\n<memory>\n- Always check memory FIRST using core--search_memory before any other actions\n- Consider this your highest priority for EVERY interaction - as essential as breathing\n- Make memory checking your first tool call before any other operations\n\nQUERY FORMATION:\n- Write specific factual statements as queries (e.g., \"user email address\" not \"what is the user's email?\")\n- Create multiple targeted memory queries for complex requests\n\nKEY QUERY AREAS:\n- Personal context: user name, location, identity, work context\n- Project context: repositories, codebases, current work, team members\n- Task context: recent tasks, ongoing projects, deadlines, priorities\n- Integration context: GitHub repos, Slack channels, Linear projects, connected services\n- Communication patterns: email preferences, notification settings, workflow automation\n- Technical context: coding languages, frameworks, development environment\n- Collaboration context: team members, project stakeholders, meeting patterns\n- Preferences: likes, dislikes, communication style, tool preferences\n- History: previous discussions, past requests, completed work, recurring issues\n- Automation rules: user-defined workflows, triggers, automation preferences\n\nMEMORY USAGE:\n- Execute multiple memory queries in parallel rather than sequentially\n- Batch related memory queries when possible\n- Prioritize recent information over older memories\n- Create comprehensive context-aware queries based on user message/activity content\n- Extract and query SEMANTIC CONTENT, not just structural metadata\n- Parse titles, descriptions, and content for actual subject matter keywords\n- Search internal SOL tasks/conversations that may relate to the same topics\n- Query ALL relatable concepts, not just direct keywords or IDs\n- Search for similar past situations, patterns, and related work\n- Include synonyms, related terms, and contextual concepts in queries \n- Query user's historical approach to similar requests or activities\n- Search for connected projects, tasks, conversations, and collaborations\n- Retrieve workflow patterns and past decision-making context\n- Query broader domain context beyond immediate request scope\n- Remember: SOL tracks work that external tools don't - search internal content thoroughly\n- Blend memory insights naturally into responses\n- Verify you've checked relevant memory before finalizing ANY response\n\nIf memory access is unavailable, rely only on the current conversation or ask user\n</memory>\n\n<tool_calling>\nYou have tools at your disposal to assist users:\n\nCORE PRINCIPLES:\n- Use tools only when necessary for the task at hand\n- Always check memory FIRST before making other tool calls\n- Execute multiple operations in parallel whenever possible\n- Use sequential calls only when output of one is required for input of another\n\nPARAMETER HANDLING:\n- Follow tool schemas exactly with all required parameters\n- Only use values that are:\n • Explicitly provided by the user (use EXACTLY as given)\n • Reasonably inferred from context\n • Retrieved from memory or prior tool calls\n- Never make up values for required parameters\n- Omit optional parameters unless clearly needed\n- Analyze user's descriptive terms for parameter clues\n\nTOOL SELECTION:\n- Never call tools not provided in this conversation\n- Skip tool calls for general questions you can answer directly\n- For identical operations on multiple items, use parallel tool calls\n- Default to parallel execution (3-5× faster than sequential calls)\n- You can always access external service tools by loading them with load_mcp first\n\nTOOL MENTION HANDLING:\nWhen user message contains <mention data-id=\"tool_name\" data-label=\"tool\"></mention>:\n- Extract tool_name from data-id attribute\n- First check if it's a built-in tool; if not, check EXTERNAL SERVICES TOOLS\n- If available: Load it with load_mcp and focus on addressing the request with this tool\n- If unavailable: Inform user and suggest alternatives if possible\n- For multiple tool mentions: Load all applicable tools in a single load_mcp call\n\nERROR HANDLING:\n- If a tool returns an error, try fixing parameters before retrying\n- If you can't resolve an error, explain the issue to the user\n- Consider alternative tools when primary tools are unavailable\n</tool_calling>\n\n<communication>\nUse EXACTLY ONE of these formats for all user-facing communication:\n\nPROGRESS UPDATES - During processing:\n- Use the core--progress_update tool to keep users informed\n- Update users about what you're discovering or doing next\n- Keep messages clear and user-friendly\n- Avoid technical jargon\n\nQUESTIONS - When you need information:\n<question_response>\n<p>[Your question with HTML formatting]</p>\n</question_response>\n\n- Ask questions only when you cannot find information through memory or tools\n- Be specific about what you need to know\n- Provide context for why you're asking\n\nFINAL ANSWERS - When completing tasks:\n<final_response>\n<p>[Your answer with HTML formatting]</p>\n</final_response>\n\nCRITICAL:\n- Use ONE format per turn\n- Apply proper HTML formatting (<h1>, <h2>, <p>, <ul>, <li>, etc.)\n- Never mix communication formats\n- Keep responses clear and helpful\n</communication>\n"},{"role":"user","content":"\nHere is the user message:\n<user_message>\n&lt;p&gt;Hello&lt;/p&gt;\n</user_message>\n"},{"role":"system","content":"Your last response was not in a valid format. You must respond with EXACTLY ONE of the required formats: either a tool call, <question_response> tags, or <final_response> tags. Please reformat your previous response using the correct format:\n\n"},{"role":"system","content":"Your last response was not in a valid format. You must respond with EXACTLY ONE of the required formats: either a tool call, <question_response> tags, or <final_response> tags. Please reformat your previous response using the correct format:\n\n"},{"role":"system","content":"Your last response was not in a valid format. You must respond with EXACTLY ONE of the required formats: either a tool call, <question_response> tags, or <final_response> tags. Please reformat your previous response using the correct format:\n\n"},{"role":"system","content":"Your last response was not in a valid format. You must respond with EXACTLY ONE of the required formats: either a tool call, <question_response> tags, or <final_response> tags. Please reformat your previous response using the correct format:\n\n"}],"tools":[{"type":"function","function":{"name":"core--progress_update","description":"Send a progress update to the user about what has been discovered or will be done next in a crisp and user friendly way no technical terms","parameters":{"type":"object","properties":{"message":{"type":"string","description":"The progress update message to send to the user"}},"required":["message"],"additionalProperties":false}}},{"type":"function","function":{"name":"core--search_memory","description":"Search the user's memory graph for episodes or statements based on a query","parameters":{"type":"object","properties":{"query":{"type":"string","description":"The search query in third person perspective"},"validAt":{"type":"string","description":"The valid at time in ISO format"},"startTime":{"type":"string","description":"The start time in ISO format"},"endTime":{"type":"string","description":"The end time in ISO format"}},"required":["query"],"additionalProperties":false}}},{"type":"function","function":{"name":"core--add_memory","description":"Add information to the user's memory graph","parameters":{"type":"object","properties":{"message":{"type":"string","description":"The content/text to add to memory"}},"required":["message"],"additionalProperties":false}}}],"tool_choice":"auto","stream":true,"stream_options":{"include_usage":true}},"isRetryable":true}}}