npm package: @stainlu/openclaw-multica
Description: OpenClaw plugin for Multica — create issues, assign to agents, and track tasks from any OpenClaw-connected channel.
Author: stainlu
Latest version: 0.1.0

# @stainlu/openclaw-multica

OpenClaw plugin for [Multica](https://github.com/multica-ai/multica) — drive your coding agent fleet from any OpenClaw-connected channel (Telegram, Discord, Slack, iMessage, Matrix, and more).

**What is this?** Multica is the open-source managed-agents platform — a Linear-style issue tracker where AI coding agents (Claude Code, OpenClaw, Codex, OpenCode) work alongside humans as first-class teammates. This plugin lets your OpenClaw agent **create Multica issues, assign them to runtimes, and track progress from any messaging channel**.

> _"Open a multica issue for the login bug and assign it to Claude"_ — from your phone, on Telegram, through your OpenClaw agent.

## Why

- Multica integrated OpenClaw as a **child runtime** in PR [#456](https://github.com/multica-ai/multica/pulls?q=openclaw) (April 7, 2026) — that direction lets Multica's daemon shell out to `openclaw agent -p …`.
- **This plugin closes the loop the other way:** it makes Multica a tool OpenClaw's agent can call, so you can drive your team's issue tracker and agent fleet from your personal assistant surface.
- Together, the two directions let your OpenClaw on Telegram be a remote control for a whole Multica-orchestrated coding team.

## Installation

```bash
openclaw plugins install npm:@stainlu/openclaw-multica
```

Or install from source:

```bash
git clone https://github.com/stainlu/openclaw-multica.git
cd openclaw-multica
pnpm install
# link into a local OpenClaw checkout during development
```

## Configuration

You need a **Multica Personal Access Token** (prefix `mul_`). Get one from your Multica instance's Settings → Personal Access Tokens.

### Via OpenClaw config

```json
{
  "plugins": {
    "allow": ["multica"],
    "entries": {
      "multica": {
        "config": {
          "baseUrl": "http://localhost:8080",
          "apiToken": "mul_your_token_here",
          "defaultWorkspaceId": "00000000-0000-0000-0000-000000000000",
          "defaultRuntime": "openclaw"
        }
      }
    }
  },
  "tools": {
    "allow": [
      "multica_list_workspaces",
      "multica_create_issue",
      "multica_list_issues",
      "multica_get_issue",
      "multica_assign_issue",
      "multica_add_comment",
      "multica_poll_task_messages"
    ]
  }
}
```

### Via environment variables

| Variable | Purpose |
|---|---|
| `MULTICA_API_TOKEN` | Personal Access Token (required) |
| `MULTICA_BASE_URL` or `MULTICA_SERVER_URL` | Multica server URL (default: `http://localhost:8080`) |
| `MULTICA_DEFAULT_WORKSPACE_ID` | Workspace UUID to use when not specified |
| `MULTICA_DEFAULT_RUNTIME` | `claude` \| `openclaw` \| `codex` \| `opencode` |
| `MULTICA_JWT` | Optional JWT for WebSocket streaming (PAT-only mode uses polling) |

## Tools

All tools are registered as **optional** — you must explicitly allow them in `tools.allow`.

| Tool | Description |
|---|---|
| `multica_list_workspaces` | List all workspaces the token can access |
| `multica_create_issue` | Create a new issue |
| `multica_list_issues` | List issues in a workspace, filter by status |
| `multica_get_issue` | Fetch a single issue by id |
| `multica_assign_issue` | Assign an issue to a coding agent runtime (claude/openclaw/codex/opencode) |
| `multica_add_comment` | Add a comment to an issue (⚠️ see warning below) |
| `multica_poll_task_messages` | Poll recent messages from a running agent task |

### ⚠️ Comment auto-trigger

Multica's core behavior: **posting a comment on an issue that is currently assigned to an agent automatically enqueues a new task for that agent**, unless the comment mentions other actors. This can cause runaway loops if not handled carefully. The `multica_add_comment` tool's description warns the model about this. Use it intentionally as a way to give follow-up instructions to an active agent.

### Live task updates

`multica_poll_task_messages` uses Multica's daemon polling endpoint, which accepts Personal Access Tokens. Multica's WebSocket endpoint (`/ws`) currently requires a JWT — PATs are not accepted. If you want low-latency streaming instead of polling, set `MULTICA_JWT` (a future release of this plugin will use WebSocket when a JWT is configured).

## Example usage

From Telegram, send your OpenClaw agent:

> **You:** List my multica workspaces
>
> **Agent:** (calls `multica_list_workspaces`) You have 1 workspace: `Default` (`00000000-…`)

> **You:** Create an issue "Fix tilde path expansion in host edit tool" in the Default workspace
>
> **Agent:** (calls `multica_create_issue`) Created issue `a1b2c3…` — "Fix tilde path expansion in host edit tool"

> **You:** Assign that to an openclaw agent
>
> **Agent:** (calls `multica_assign_issue` with provider=openclaw) Assigned issue to agent `agent-oc` (runtime `rt-openclaw`). The multica daemon will dispatch it shortly.

> **You:** Is it done yet?
>
> **Agent:** (calls `multica_poll_task_messages`) Latest updates: the agent ran `pnpm build`, identified the issue in `src/agents/pi-tools.read.ts`, and is writing the fix now…

## Development

```bash
git clone https://github.com/stainlu/openclaw-multica.git
cd openclaw-multica
pnpm install
pnpm test          # run unit tests
pnpm typecheck     # tsc --noEmit
```

### Architecture

```
OpenClaw Agent
    │ calls tool multica_create_issue, etc.
    ▼
@stainlu/openclaw-multica (this plugin)
    │ MulticaClient (fetch wrapper)
    ▼
Multica REST API (http://localhost:8080/api/*)
    │ Auth: Bearer mul_<token>
    │ Header: X-Workspace-ID: <uuid>
    ▼
Multica Server → Daemon → agent CLI (claude/openclaw/codex/opencode)
```

## Compatibility

- **OpenClaw:** >= 2026.4.0 (tested against 2026.4.8)
- **Multica:** >= 0.1.18 (where the OpenClaw runtime backend landed)

## License

MIT © stainlu

## Related

- [Multica on GitHub](https://github.com/multica-ai/multica) — the open-source managed-agents platform
- [OpenClaw on GitHub](https://github.com/openclaw/openclaw) — the personal AI assistant framework this plugs into
- [Multica PR #456](https://github.com/multica-ai/multica/pulls?q=openclaw) — the reverse direction: multica running OpenClaw as a child runtime