Integuru: AI-powered Code Generation for Platform Integration
Integuru is an AI agent designed to simplify the integration process by reverse-engineering platform's internal APIs. It generates integration code by analyzing browser network requests and understanding the intended actions.
Here's how Integuru works:
1. Capture Network Requests: Use the create_har.py script to record all browser network requests, including cookies, and generate a HAR file.
2. Describe the Action: Write a clear and concise prompt that accurately describes the action you want Integuru to automate, for example, "download utility bills."
3. Generate Code: Integuru takes the HAR file and your prompt as input and outputs runnable Python code that interacts with the platform's internal endpoints to achieve the desired action.
How Integuru Works
Let's break down the process with a concrete example:
Scenario: You want to download your utility bills from a website,
1. Analyze Network Requests: Integuru analyzes the HAR file and identifies the relevant network requests involved in the bill download process. This might include requests to retrieve account ID and user ID, followed by a request to fetch the actual bills.
2. Understand the Action: Based on the prompt "download utility bills" and the network requests, Integuru infers the sequence of steps involved in the process.
3. Generate Python Code: Integuru generates Python code that emulates the browser's behavior. The code might include API calls to fetch account and user information, and then a call to download the utility bills based on the retrieved information.
Here are some key features of Integuru:
1. Automated API Reverse-Engineering: Integuru analyzes network requests and identifies the internal APIs used by a platform, eliminating the need for manual API discovery.
2. Code Generation: Integuru generates Python code for seamless integration with external platforms.
3. Customizable Prompting: The user can clearly describe the desired action in a natural language prompt, allowing for easy customization and flexibility.
4. Model Support: Integuru supports various OpenAI models, including gpt-4o and o1-preview, enabling users to select the most suitable model for their specific needs.
5. Simplified Workflow: The process is streamlined, requiring minimal technical expertise, making integration more accessible to a broader audience.
1. OpenAI API Key: Set up your OpenAI API key and add it to your environment as OPENAIAPIKEY.
2. Install Dependencies: Install Python dependencies using Poetry:
`bash
poetry install
`
3. Start Poetry Shell:
`bash
poetry shell
`
4. Launch Browser:
`bash
poetry run python create_har.py
`
5. Log In and Perform Action: Log into your platform and perform the desired action.
6. Run Integuru:
`bash
poetry run python -m integuru --prompt "download utility bills" --model gpt-4o
`
Usage
Once Integuru is set up, you can use it to reverse-engineer APIs for various platforms. Just provide the HAR file and a clear prompt.
For more information on available options, run:
`bash
poetry run python -m integuru --help
`
Demo
To see Integuru in action, check out the demo repository.
We welcome contributions to improve Integuru! Feel free to submit issues or pull requests on the project's repository.
Info
Integuru is developed by Integuru.ai. We offer custom integration requests, additional features, hosting, and authentication services.
We also open-source unofficial APIs we've built. Explore our collection here: [link to unofficial API collection].
License
Integuru is licensed under the Apache-2.0 license.
Downcodes小编