An AI agent that generates integration code by reverse-engineering platforms' internal APIs.
You use create_har.py
to generate a file containing all browser network requests, a file with the cookies, and write a prompt describing the action triggered in the browser. The agent outputs runnable Python code that hits the platform's internal endpoints to perform the desired action.
Let's assume we want to download utility bills:
https://www.example.com/utility-bills?accountId=123&userId=456
accountId=123 userId=456
GET https://www.example.com/get_account_id
GET https://www.example.com/get_user_id
OPENAI_API_KEY
environment variable. (We recommend your open ai account to have models that are at least as capable as OpenAI o1-mini. Models on par with OpenAI o1-preview are ideal.)poetry install
poetry shell
poetry run python create_har.py
Log into your platform and perform the desired action (such as downloading a utility bill).
Run Integuru:
poetry run python -m integuru --prompt "download utility bills" --model gpt-4o
You can also run it via Jupyter Notebook main.ipynb
Recommended to use gpt-4o as the model for graph generation as it supports function calling. Integuru will automatically switch to o1-preview for code generation if available in the user's OpenAI account. ⚠️ Note: o1-preview does not support function calls.
After setting up the project, you can use Integuru to analyze and reverse-engineer API requests for external platforms. Simply provide the appropriate .har file and a prompt describing the action that you want to trigger.
poetry run python -m integuru --help
Usage: python -m integuru [OPTIONS]
Options:
--model TEXT The LLM model to use (default is gpt-4o)
--prompt TEXT The prompt for the model [required]
--har-path TEXT The HAR file path (default is
./network_requests.har)
--cookie-path TEXT The cookie file path (default is
./cookies.json)
--max_steps INTEGER The max_steps (default is 20)
--input_variables <TEXT TEXT>...
Input variables in the format key value
--generate-code Whether to generate the full integration
code
--help Show this message and exit.
Contributions to improve Integuru are welcome. Please feel free to submit issues or pull requests on the project's repository.
Integuru is built by Integuru.ai. Besides our work on the agent, we take custom requests for new integrations or additional features for existing supported platforms. We also offer hosting and authentication services. If you have requests or want to work with us, reach out at richard@taiki.online.
We open-source unofficial APIs that we've built already. You can find them here.