Skip to content

Maintainer/ankan - #97

Merged
AnkanSaha merged 3 commits into
mainfrom
maintainer/ankan
Jul 28, 2026
Merged

Maintainer/ankan#97
AnkanSaha merged 3 commits into
mainfrom
maintainer/ankan

Conversation

@AnkanSaha

Copy link
Copy Markdown
Member

This pull request introduces several improvements and new tests to the AI agent’s workflow, focusing on safer tool usage, better error handling, and more robust research capabilities. Key changes include restricting tool access during root-cause analysis (RCA), adding comprehensive SSRF protection tests for research tools, and refining how the agent reacts to failures and quota issues. The system prompt and RCA instructions have also been updated to clarify tool usage and diagnostic steps.

AI Agent Workflow and RCA Improvements:

  • During RCA (when the agent is diagnosing a failure), only web_search and fetch_url tools are available, preventing any further state changes and ensuring diagnostics are safe and read-only. The RCA prompt is updated to instruct the model to research unexplained errors before reporting to the user. [1] [2] [3] [4]
  • The agent now distinguishes between intended changes and actual changes: if a mutating tool was loaded but nothing was changed, RCA is triggered to explain the failure instead of reporting success.

Testing and Safety Enhancements:

  • New tests verify that the research tools (web_search, fetch_url) robustly reject SSRF attempts, invalid URLs, and unsupported schemes, ensuring they cannot be abused to access internal or private resources.
  • Additional tests cover edge cases in agent behavior, including RCA tool binding, handling of exhausted iteration budgets, and correct success/failure reporting based on tool usage.

Model Routing and Quota Handling:

  • The model router state is now explicitly tracked and passed, ensuring that models/providers that previously failed in a run are not retried. Tests verify this behavior. [1] [2]
  • Quota handling for OpenRouter is improved: when a burst 429 is encountered, the entire provider is marked as exhausted for 24 hours, regardless of Retry-After headers, making fallback behavior more reliable. [1] [2]

Prompt and Documentation Updates:

  • The system prompt now explicitly states that only the agent decides which tools to use, and that user requests to invoke specific tools are out of scope and should be refused.
  • The list of available tools and their intended usage is clarified, especially for research tools, which are now documented as diagnostics-only.

Miscellaneous:

  • Minor version bump in server/package.json to reflect these changes.

@AnkanSaha AnkanSaha self-assigned this Jul 28, 2026
@AnkanSaha
AnkanSaha merged commit db232e8 into main Jul 28, 2026
4 checks passed
@AnkanSaha
AnkanSaha deleted the maintainer/ankan branch July 28, 2026 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant