HAPM

Agents

Your AI team: status, workload, teams, marketplace

Back to Agents

Agent Setup Guide

Step-by-step instructions for every agent type. Agents communicate with HAPM via webhooks — they receive assignments, do work, and post proposals back for your review.

How the flow works

You assign a task to an agent → HAPM sends a webhook to the agent-bridge → the bridge does the work (web search, code changes, research) → posts proposals back → you review and approve. Nothing executes without your sign-off.

The agent-bridge is a small Express server in apps/agent-bridge. It receives webhooks from HAPM and runs Claude. It must be reachable from HAPM — either run it on a server or expose your local machine with ngrok.

1
Copy the example env file and fill in your keys:
cd apps/agent-bridge
cp .env.example .env
# Fill in:
# ANTHROPIC_API_KEY=sk-ant-...
# HAPM_API_URL=https://your-hapm-instance.com   (or http://localhost:3001 locally)
# PORT=3099
2
Start the bridge:
pnpm dev   # inside apps/agent-bridge
3
Expose it publicly (if running locally):
ngrok http 3099
# → https://abc123.ngrok.io
4
In HAPM → Agents → Blueprints → New blueprint → set the webhook URL to https://your-url/webhook
The bridge supports all agent types from a single process. You don't need separate instances for Claude Code, Research, and OpenClaw.

When assigned a coding task, Claude Code runs non-interactively in your repo with Bash, Read, Write, Edit, Glob, and Grep access. It makes real file changes, then posts a summary proposal for you to review.

1
Make sure yt-dlp is not needed here — but ensure the agent-bridge machine has Node.js access to your repo.
2
In HAPM → Agents → Blueprints → New blueprint:
Type:        CLAUDE_CODE
Skills:      CODE
Webhook URL: https://your-bridge/webhook
Repo path:   /absolute/path/to/your/codebase   ← on the bridge machine
System prompt: (optional) You are a senior engineer on this project. Focus on clean, minimal changes.
3
Assign a task:
Assignments → New → pick "Claude Code" agent
Context: "Refactor the auth module to use JWT. Update all call sites."
4
The agent runs Claude Code in repoPath. Files are changed on disk. When done, a proposal appears in your Review inbox with a summary of what was changed.
Changes happen immediately while the agent runs. Approving the proposal just records your sign-off — it does not apply the changes. Rejecting means you should revert or ask the agent to redo.

Good tasks for Claude Code

  • Refactor a module or rename a function across the codebase
  • Implement a feature from a spec you write in the context field
  • Write tests for an existing file
  • Fix a specific bug described in the context

Research agents use Claude's built-in web search tool to find current information. Results are written automatically to your Obsidian vault athapm/research/{date}-{title}.md — no approval needed for the note itself. Task proposals (next steps) still go through review.

1
Create a blueprint:
Type:        CUSTOM
Skills:      RESEARCH
Webhook URL: https://your-bridge/webhook
System prompt: (optional) You are a thorough research analyst. Always cite sources.
No repoPath needed — the bridge detects RESEARCH skill and uses web search automatically.
2
Assign a research task from any Project or OKR:
Context: "Research the best birthday party venues in Berlin under €500.
Compare at least 3 options with capacity, price, and vibe. Suggest the best pick."
3
The agent searches the web, synthesises findings, writes the vault note, then posts 2-4 task proposals (e.g. "Book a visit to Venue X") for your review.

Good tasks for a Research agent

  • Market research ("What are competitors doing in space X?")
  • Venue / vendor / tool comparisons
  • Technical deep-dives ("How does X work? What are the tradeoffs?")
  • News monitoring ("What happened this week in AI?")

OpenClaw acts as a project manager bot. It receives a complex goal, breaks it into 3-7 concrete subtasks, and routes each to the best available agent by skill. You get multiple parallel proposal sets back.

1
You need at least one specialist agent per skill you want to delegate to. Example setup:
Agent "Leo-Dev"       type=CLAUDE_CODE  skills=[CODE]        repoPath=/path/to/repo
Agent "Leo-Research"  type=CUSTOM       skills=[RESEARCH]    webhook=…/webhook
Agent "Leo-Writer"    type=CUSTOM       skills=[WRITING]     webhook=…/webhook
Agent "Leo-Orch"      type=OPENCLAW     skills=[ORCHESTRATION] webhook=…/webhook
2
Create the OpenClaw blueprint:
Type:        OPENCLAW
Skills:      ORCHESTRATION
Webhook URL: https://your-bridge/webhook
3
Assign a high-level goal:
Context: "Plan our product launch for Q2. We need a landing page,
a blog post, social media content, and the backend API ready."
4
OpenClaw decomposes this into subtasks and posts them toPOST /assignments/:id/subtasks. HAPM auto-routes each subtask to the right specialist agent.
OpenClaw is overkill for simple tasks. Use it when work spans multiple skills or when you want parallel execution across agents.

Good tasks for OpenClaw

  • Product launches (copy + code + research + design)
  • Sprint planning decomposition
  • Event planning across multiple workstreams
  • Any goal that naturally has 3+ independent parallel threads

Paste a video URL anywhere in HAPM (capture page, Telegram) and the system auto-detects it. If you have a Claude Code agent configured, it runs yt-dlp locally to transcribe and analyze the video. Otherwise the media worker handles it server-side.

1
Install yt-dlp on the agent-bridge machine (required for TikTok/Instagram; YouTube uses caption API):
pip install yt-dlp
# or: brew install yt-dlp
2
Make sure your workspace has a vaultPath set in Settings → Workspace.
3
Drop a video URL in the Capture page or send it to the Telegram bot. HAPM auto-detects YouTube/TikTok/Instagram URLs.
4
An assignment is created with status Pending Confirmation. Confirm it in the Agents page → the agent downloads the transcript, analyzes it, and writes to hapm/captures/video-{date}-{id}.md.
5
Task proposals (e.g. "Implement tip from the tutorial") appear in your Review inbox.
Pass autoAssign: true in the capture body to skip the confirmation step.

What the vault note contains

  • YAML frontmatter with source URL, platform, and date
  • AI-generated summary (2-3 sentences)
  • Key lessons extracted from the transcript
  • Suggested tasks checklist
  • Full transcript (truncated at 8,000 chars)

Feature implementation

  1. Write a task on the board: title + description with the spec
  2. Assign it to your Claude Code agent
  3. Agent reads the repo, implements the feature, posts summary proposal
  4. You review the diff, approve the proposal to log it, or reject and add feedback

Deep research + next steps

  1. Create an objective or task with the research question as context
  2. Assign to your Research agent
  3. Vault note is written automatically — open it in Obsidian
  4. Approve the task proposals in the Review inbox to turn findings into action

Brain dump from Telegram

  1. Send a voice note or text to the Telegram bot
  2. HAPM analyses it and shows a preview with tasks, ideas, OKR updates
  3. Tap ✅ Save everything or ⏭ Skip tasks
  4. Items appear in the Review inbox and Daily page

Video tutorial → actionable tasks

  1. Paste a YouTube tutorial URL in the Capture page
  2. Confirm the agent assignment in Agents page
  3. Vault note with transcript + key lessons is written
  4. Approve suggested task proposals to add them to the board

Questions? Open an issue or send a Telegram message to the bot.

Go to Agents →