Skip to main content

plane-adk

A Python SDK for building intelligent agents that integrate with Plane.so workspace management platform. This package provides tools to create automated workflows, handle webhooks, and respond to workspace events.

Installation

pip install plane-adk

Usage

Basic Setup

First, set up your environment variables for Plane OAuth:

export PLANE_CLIENT_ID="your_client_id"
export PLANE_CLIENT_SECRET="your_client_secret"
export PLANE_REDIRECT_URI="your_redirect_uri"
export PLANE_BASE_URL="https://api.plane.so"  # Optional, defaults to this

Creating a PlaneAgent

from plane_adk.agent import PlaneAgent, Credentials

# Create credentials
credentials = Credentials(
    client_id="your_client_id",
    client_secret="your_client_secret",
    app_installation_id="your_app_installation_id",
    base_url="https://api.plane.so",  # Optional
    redirect_uri="your_redirect_uri"
)

# Initialize the agent
agent = PlaneAgent(credentials)

Handling Events

The PlaneAgent supports various events that you can listen to:

def assigned_callback(handler, context):
    """Called when an issue is assigned to the bot"""
    handler.progress("I've been assigned to this issue!")

    # Access issue details
    issue_id = context.issue_id
    issue_payload = context.issue_payload

    # Add a comment to the issue
    handler.progress("Starting work on this issue...")

def mentioned_callback(handler, context):
    """Called when the bot is mentioned in an issue comment"""
    handler.progress("Thanks for mentioning me!")

    # You can access the comment data
    comment_data = context.event.data

    # Respond to the mention
    handler.progress("I'm here to help with this issue!")

# Register event handlers
agent.issue.on("assigned", assigned_callback)
agent.issue.on("mentioned", mentioned_callback)

# Process incoming webhooks
agent.process_webhook(webhook_data)

Examples

For more detailed examples, check out the example/ folder which includes:

  • FastAPI Integration: Complete webhook server setup with OAuth handling
  • AI Task Breakdown: Advanced example using AI to automatically break down issues into actionable tasks

Supported Events

  • assigned: Triggered when an issue is assigned to the bot
  • mentioned: Triggered when the bot is mentioned in an issue comment
  • unassigned: Triggered when the bot is unassigned from an issue

Context Object

The context object passed to event handlers contains:

  • issue_id: The ID of the issue
  • workspace_id: The workspace ID
  • workspace_slug: The workspace slug
  • project_id: The project ID (if applicable)
  • issue_payload: Full issue data from Plane API
  • event: The original webhook event data
  • entity_name: Type of entity ("issue" or "comment")
  • entity_id: ID of the entity

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Metadata

Release files for plane-adk 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for plane-adk 0.1.1
File Size Uploaded Provenance Actions
plane_adk-0.1.1.tar.gz 5.7 kB Without provenance Details for plane_adk-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for plane-adk 0.1.1
File Interpreter ABI Platform Actions
plane_adk-0.1.1-py3-none-any.whl Python 3 none any Details for plane_adk-0.1.1-py3-none-any.whl

Total release size: 12.7 kB

Release files / plane_adk-0.1.1.tar.gz

Download URL plane_adk-0.1.1.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1b84f5c05e1b7984155b5b4d278698f6d65544e36ee379f9229e554ff823ec01
BLAKE2b-256 checksum
How to use checksums
da708caecf77a7db28ecdccc2142c4ce74501d1c880e21335698d527968006b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.23

Release files / plane_adk-0.1.1-py3-none-any.whl

Download URL plane_adk-0.1.1-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0d88ed93a5d616fc9369e82ced17869f52f159b5748573877db858ef3b36dd1d
BLAKE2b-256 checksum
How to use checksums
56b5506ecfd7b360c8ceb52406d2bcd54441e3294b01b81db94b7e84f2a02bbc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.23

Security for plane-adk 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page