Reverse-Engineering Web Apps into Agent Tools with Frigade
Reverse-Engineering Web Apps into Agent Tools with Frigade
Frigade has introduced a browser-based agent that automatically converts a web application's internal API calls into tools for AI agents. This approach allows AI assistants to integrate deeply with products like Jira, Spotify, and Hacker News without requiring manual API integration or access to the application's source code.
Automated API-to-Tool Conversion
Frigade's system works by running a browser agent inside an authenticated web application. The agent observes the application's own API calls and reverse-engineers them into "recipes." These recipes serve as a self-updating Model Context Protocol (MCP) server, ensuring that the AI agent remains functional even as the host application's API changes.
Each tool recipe consists of the following components:
- API Endpoint and Method: The specific URL and HTTP method used for the action.
- Authentication: The method used to secure the endpoint, including instructions on how to retrieve refresh tokens or cookies.
- Authentication: The response schema of the API call.
- Input Schema: The required data structure for POST or PUT requests.
- Human-Readable Description: A clear explanation of what the tool does, allowing the LLM to select the correct tool for a given task.
Solving the Limitations of Traditional Agent Integration
This method addresses three primary challenges associated with traditional AI agent integration:
- API Complexity: Modern software often utilizes a complex web of confusing APIs and services that are not designed for out-of-the-box AI agent use.
- Security and Authentication: Applications use varied, often proprietary standards for authentication (such as mixtures of JWTs and cookies), making standardized integration difficult.
- Brittleness of "Computer-Use" Agents: Traditional browser agents that simulate human clicks (computer-use) are often slow, token-intensive, and prone to failure when the UI changes.
By targeting the API layer rather than the UI layer, Frigade provides a more stable and efficient way for agents to take actions on a user's behalf—such as inviting a teammate to a workspace—without proxying through a third party.
Technical Implementation and Edge Cases
While the system is designed to be general, the author notes that every application is intrinsically different. A significant technical challenge mentioned is the standardization of GraphQL APIs, which the author describes as the "worst API to work with" when creating standardized recipes.
Workflow for Adding Tools
- Training: The agent trains on the application to build the initial recipes.
- Enablement: The application owner enables the discovered tools via a dashboard.
- Execution: The agent performs actions directly inside the application using the authenticated API endpoints.