$ show Integuru-AI/Integuru
Integuru is a Python application that reverse-engineers API requests from browser traffic to generate runnable integration code. It takes a HAR file (HTTP archive) containing browser network requests and cookie data, then uses LLMs to analyze these requests to identify which endpoint performs a user-specified action. The system builds a dependency graph to determine what prerequisite requests are needed to gather dynamic parameters (like IDs, tokens), and finally generates Python code that can reproduce the action by making the necessary HTTP requests in the correct order. The architecture uses LangGraph for workflow orchestration, with specialized LLM-powered agents handling different aspects of the analysis (URL identification, dynamic parameter extraction, dependency resolution).
The LLM identified 3 files worth highlighting for reuse:
Contains isolated utility functions for processing HAR (HTTP Archive) files. Includes functions to parse HAR entries into Request objects, build URL-to-request mappings, extract URL details while filtering noise (tracking domains, media files), and parse cookie files. Demonstrates non-obvious skill in properly handling different content types, filtering out common tracking/infrastructure noise to reduce LLM processing load, and robustly parsing various request/response formats. Could be extracted and used in any project needing to analyze browser network traffic.
Provides sophisticated code generation capabilities from a dependency graph of HTTP requests. Includes functions to visualize DAGs, generate Python functions for each request based on its attributes (handling different response types like JSON, binary files, HTML with appropriate parsing strategies), and aggregate generated functions into a runnable sequence. Shows non-obvious skill in adaptive code generation - dynamically choosing between JSON path extraction, regex parsing for HTML, or file saving for binary responses based on content type. The generated code handles dependencies properly by passing extracted values between functions. Could be extracted as a general DAG-to-executable-code converter.
Defines a self-contained Request class that represents HTTP requests with methods to convert to and from curl command strings. Handles various HTTP methods, headers, query parameters, and request bodies (including JSON and form data). Properly manages content-type headers and body serialization. Demonstrates clean encapsulation of HTTP request details with thoughtful handling of edge cases. Could be extracted and used in any project needing to work with HTTP requests in curl format or needing to serialize/deserialize HTTP requests.