This project implements a command-line interface that helps users navigate and accomplish tasks in the Stytch platform. It leverages Google's Gen AI SDK and a browser automation agent to execute detailed step-by-step instructions. The tool uses ApertureDB to intelligently retrieve relevant documentation from Stytch's PDF guides to inform the automated processes.
- Interactive Assistance: Engage in a conversation-like interface to specify your Stytch platform tasks.
- Smart Documentation Lookup: Uses ApertureDB to automatically find and reference relevant sections from Stytch's documentation PDFs.
- Automated Task Execution: Leverages browser automation to actually perform the tasks in the Stytch platform.
- Google Gemini AI Integration: Utilizes the google-genai SDK to understand tasks and generate precise automation instructions.
- Execution Feedback: Provides real-time feedback on task execution and allows for follow-up questions.
- Python 3.7 or later
- google-genai (
pip install google-genai) - browser-use (
pip install browser-use) - langchain_openai (
pip install langchain_openai) - aperturedb (
pip install aperturedb) - sentence-transformers (
pip install sentence-transformers)
-
Clone the Repository:
git clone <your-repo-url> cd <repository-directory>
-
Install Dependencies:
pip install google-genai browser-use langchain_openai
-
Set the API Key: Ensure you have your Gemini API key and set it as an environment variable:
export GEMINI_API_KEY='your_api_key_here'
Run the assistant:
python cli_browser_agent.pyYou will be prompted to enter your desired Stytch platform task. The assistant will:
- Search through Stytch's documentation using ApertureDB to find relevant guidance
- Generate precise step-by-step instructions
- Execute the task automatically in your browser
- Provide feedback and allow for follow-up questions
Example tasks:
- "Create a new organization in Stytch"
- "Add a new user to my Stytch project"
- "Configure authentication settings"
- Model Configuration: The model used for text generation is set to
"gemini-2.0-flash-001". Modify this incli_browser_agent.pyif needed. - System Instructions: The system prompts given to the model can be adjusted to change how detailed the instructions are.
- Functionality: The script can be extended with additional tools or integrations as needed.
- Missing API Key: Ensure the
GEMINI_API_KEYenvironment variable is correctly set. - File Upload Issues: Verify the provided PDF file path is correct and the file is accessible.
This project is licensed under the MIT License.