Skip to content

Muifrend/Ghost-PM

Repository files navigation

Ghost PM Agent (OpenClaw)

Autonomous PM assistant for Telegram → Notion task capture with optional Tavily research enrichment.

Why this is useful

PM work often gets buried in chat. Ghost PM converts unstructured conversation into a reliable task system without manual copy/paste. Unlike a human, which isn't always available, Ghost PM collects inputs from each member 24/7, removing the need for a human PM. Additionally due to it being built on Openclaw, you can integrate this with any platform of your choice.

Key benefits:

  • Less admin overhead: tasks and dates are captured automatically.
  • Better execution: every task requires a due date, so work is time-bound.
  • Cleaner tracking: dedupe prevents duplicate entries.
  • Faster research: researchable tasks are enriched with summary + links.
  • Safer autonomy: asks clarifying questions when required data is missing.

Why a separate workspace-pm matters

Create this agent in its own workspace (for example ~/.openclaw/workspace-pm) so PM logic, memory, and tools stay isolated from your personal assistant (main).

This separation gives you:

  • independent persona + instructions
  • separate files/state for PM automation
  • safer routing (only PM group goes to PM agent)
  • cleaner repo structure for sharing/deploying

What it does

  • Interprets task-like messages from a PM Telegram group
  • Requires a due date (asks follow-up if missing)
  • Parses natural dates (tomorrow, in 3 days, next friday, etc.)
  • Writes clean task titles + raw message to Notion
  • Deduplicates using Dedup Key
  • Enriches research tasks via Tavily
  • Optionally rewrites research into one coherent paragraph via OpenAI

Project layout

  • skills/notion-pm/notion-client.py — Notion CRUD + schema-aware writes
  • skills/notion-pm/pm_handler.py — decision logic, date parsing, pending clarification flow
  • skills/notion-pm/run_ingest.py — wrapper entrypoint for inbound messages
  • skills/notion-pm/research_client.py — Tavily (+ optional OpenAI summarize)

Setup

1) Create a separate PM workspace + agent

mkdir -p ~/.openclaw/workspace-pm
openclaw agents add pm --workspace ~/.openclaw/workspace-pm

Then route only your PM Telegram group to this agent (example in openclaw.json.example).

2) Install Python deps in PM workspace

cd ~/.openclaw/workspace-pm
python3 -m venv .venv
source .venv/bin/activate
pip install notion-client

3) Configure environment

cp .env.example .env

Fill in Notion/Tavily/OpenAI keys in .env.

4) Share Notion DB with your integration

Open your Notion DB → ... → Connections → add your integration.

Notion setup (required)

1) Create your own Notion integration + token

  1. Go to https://www.notion.so/profile/integrations/internal
  2. Create a new Internal integration
  3. Copy the API token (ntn_... / secret_...)
  4. Put it in .env:
    NOTION_API_KEY=your_notion_token

2) Create your own Notion database

Create a database (for example: PM Inbox) and include this schema:

Required properties:

  • Task Name (Title)
  • Message (Rich text)
  • Status (Select: New, In Progress, Done)
  • Received At (Date)
  • Due Date (Date)
  • Dedup Key (Rich text)
  • Priority (Select: High, Medium, Low)

Optional (recommended for research enrichment):

  • Research Summary (Rich text)
  • Research Links (Rich text)

3) Connect the integration to your DB

In the Notion DB page:

  • Click ... (top-right)
  • Open Connections
  • Add your integration

Without this connection, API calls will fail with access errors.

4) Get your database id

Open your database page URL and copy the database UUID, then set:

NOTION_DATABASE_ID=your_database_id

5) Verify

python skills/notion-pm/notion-client.py ping

If this succeeds, your Notion token + DB access are configured correctly.

Notion schema expected

Required properties:

  • Task Name (Title)
  • Message (Rich text)
  • Status (Select: New, In Progress, Done)
  • Received At (Date)
  • Due Date (Date)
  • Dedup Key (Rich text)
  • Priority (Select: High, Medium, Low)

Optional properties for research enrichment:

  • Research Summary (Rich text)
  • Research Links (Rich text preferred)

Quick tests

cd ~/.openclaw/workspace-pm
source .venv/bin/activate

# 1) Notion auth
python skills/notion-pm/notion-client.py ping

# 2) Research client
python skills/notion-pm/research_client.py "best AI tools for PM roadmap planning" --max-results 3

# 3) Ingest task with due date
python skills/notion-pm/run_ingest.py --message "task: ship onboarding copy by tomorrow high" --chat=-100123 --message-id=1 --source=telegram

# 4) Missing due date flow
python skills/notion-pm/run_ingest.py --message "task: research competitor pricing" --chat=-100123 --message-id=2 --source=telegram
python skills/notion-pm/run_ingest.py --message "next friday" --chat=-100123 --message-id=3 --source=telegram

Notes

  • Set RESEARCH_CONFIDENCE_THRESHOLD to control when research runs.
  • If OPENAI_API_KEY is missing, summaries fall back to Tavily output.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages