Jules Agent Setup for ravenbot
ravenbot integrates with the Jules Agent API to allow you to delegate complex coding and repository tasks directly from your chat interface. This guide explains how to set up and use this feature.
1. Prerequisites
To use the Jules Agent, you must have: 1. Access to the Jules Agent. 2. A Google Cloud Project with the necessary APIs enabled (if applicable, though typically managed via the Jules interface).
2. Connect Your Repository
Before ravenbot can delegate tasks for a specific repository, that repository must be connected to Jules.
- Visit https://jules.google.
- Connect the GitHub repository you wish to manage.
- Ensure Jules has the necessary permissions to read code and create Pull Requests.
3. Get Your API Key
You need a valid API key to authenticate requests to the Jules API.
- Obtain your API Key from the Jules platform or your Google Cloud Console (associated with the project using Jules).
- Add this key to your
.envfile asJULES_API_KEY.
4. Usage
Once configured, you can use the /jules command in your connected Discord channel or Telegram chat.
Syntax:
Example:
How it Works
- Request: ravenbot sends your task and repository context to the Jules API (
v1alpha). - Session: A new Jules session is created with the title "ravenbot Task: ...".
- Automation: The request is sent with
AutomationMode: "AUTO_CREATE_PR", meaning Jules will attempt to implement the requested change and automatically open a Pull Request on the target repository. - Feedback: ravenbot will reply with the Session Name/ID confirming the task has been initiated.
5. Troubleshooting
- "Jules api error: ... not found": This usually means the repository hasn't been connected to Jules yet. Visit
https://jules.googleto connect it. - "JULES_API_KEY is not set": Check your
.envfile and ensure the key is present and the bot has been restarted. - Repo Format: Ensure you are using the
owner/repoformat (e.g.,google/go-genai, not justgo-genai).