This guide walks you through building and deploying your own agent for Plane using this repository as a starting point.
- Node.js installed
- A Cloudflare account (for Workers deployment)
- Access to a Plane instance
After cloning the repo, update the agent name in:
package.json(name field)wrangler.jsonc(name field)
npm installThis installs all packages and sets up wrangler for Cloudflare Workers.
The agent uses Cloudflare KV to store OAuth credentials. Create a KV namespace:
npx wrangler kv namespace create CREDENTIALS_KVThis command will output a binding ID. Update the kv_namespaces section in wrangler.jsonc with the returned ID:
npm run deployThis deploys the boilerplate code to Cloudflare Workers. Once complete, you'll receive a unique domain where your worker is deployed (e.g., https://my-agent.my-account.workers.dev).
Navigate to your Plane instance's integrations page at /settings/integrations and create a new App.
Since this is an agent, ensure "Enable app mentions" is toggled on. This allows users to invoke your agent by mentioning it in comments.
Fill in the required fields:
- Name: Your agent's name
- Description: What your agent does
- Other fields as needed for your use case
This is the critical step. Using your worker domain, configure:
| Field | URL |
|---|---|
| Setup URL | https://my-agent.my-account.workers.dev/oauth/setup |
| Webhook URL | https://my-agent.my-account.workers.dev/webhook |
| Redirect URI | https://my-agent.my-account.workers.dev/oauth/callback |
Save the app after entering these URLs.
After saving, you'll receive:
- Client ID
- Client Secret
Keep these safe—you'll need them in the next steps.
Open wrangler.jsonc and update the following values:
{
"vars": {
"PLANE_CLIENT_ID": "<your-client-id>",
"PLANE_BASE_URL": "https://api.plane.so",
"PLANE_BASE_APP_URL": "https://app.plane.so",
"SERVER_URL": "https://my-agent.my-account.workers.dev"
}
}For production use cases:
PLANE_BASE_URL:https://api.plane.soPLANE_BASE_APP_URL:https://app.plane.soSERVER_URL: Your worker domain (e.g.,https://my-agent.my-account.workers.dev)
Secrets should not be stored in wrangler.jsonc. Instead, use wrangler to set them directly on Cloudflare:
npx wrangler secret put PLANE_CLIENT_SECRET
npx wrangler secret put OPENAI_API_KEYYou'll be prompted to enter the values securely.
After updating configuration and secrets, deploy again:
npm run deployModify the following files to change your agent's behavior:
src/lib/agent/prompt.ts- System prompt defining agent behavior and available toolssrc/lib/agent/tools.ts- Tool implementations
After making changes, redeploy with:
npm run deployTo install your agent in a Plane workspace, either:
- Navigate to
https://my-agent.my-account.workers.dev/oauth/setupin your browser, or - Click the "Install" button on your app in the
/settings/integrationspage
Once installed, mention your agent in any issue comment to invoke it. The agent will process the mention and respond based on your configured prompt and tools.
{ "kv_namespaces": [ { "binding": "CREDENTIALS_KV", "id": "<your-kv-namespace-id>" } ] }