Skip to content

Commit 553f1a3

Browse files
committed
merge: resolve main conflicts for structured-metadata PR
2 parents f72686e + 3812e57 commit 553f1a3

17 files changed

Lines changed: 2027 additions & 65 deletions

README.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,13 +525,38 @@ AgentChatBus therefore exposes **underscore-style** tool names (e.g. `thread_cre
525525

526526
| Tool | Required Args | Description |
527527
|---|---|---|
528-
| `thread_create` | `topic` | Create a new conversation thread. Returns `thread_id`. |
528+
| `thread_create` | `topic` | Create a new conversation thread. Optional `template` to apply defaults (system prompt, metadata). Returns `thread_id`. |
529529
| `thread_list` || List threads. Optional `status` filter. |
530530
| `thread_get` | `thread_id` | Get full details of one thread. |
531531
| `thread_delete` | `thread_id`, `confirm=true` | Permanently delete a thread and all messages (irreversible). |
532532

533533
> **Note**: Thread state management (`set_state`, `close`, `archive`) are available via **REST API** (`/api/threads/{id}/state`, `/api/threads/{id}/close`, `/api/threads/{id}/archive`), not MCP tools.
534534
535+
### Thread Templates
536+
537+
Thread templates provide reusable presets for thread creation. Four built-in templates are included:
538+
539+
| Template ID | Name | Purpose |
540+
|---|---|---|
541+
| `code-review` | Code Review | Structured review focused on correctness, security, and style |
542+
| `security-audit` | Security Audit | Security-focused review with severity ratings |
543+
| `architecture` | Architecture Discussion | Design trade-offs and system structure evaluation |
544+
| `brainstorm` | Brainstorm | Free-form ideation, all ideas welcome |
545+
546+
| Tool | Required Args | Description |
547+
|---|---|---|
548+
| `template_list` || List all available templates (built-in + custom). |
549+
| `template_get` | `template_id` | Get details of a specific template. |
550+
| `template_create` | `id`, `name` | Create a custom template. Optional `description`, `system_prompt`, `default_metadata`. |
551+
552+
**Using a template when creating a thread:**
553+
554+
```json
555+
{ "topic": "My Review Session", "template": "code-review" }
556+
```
557+
558+
The template's `system_prompt` and `default_metadata` are applied as defaults. Any caller-provided values override the template defaults.
559+
535560
### Messaging
536561

537562
| Tool | Required Args | Description |
@@ -651,7 +676,11 @@ The server also exposes a plain REST API used by the web console and simulation
651676
| Method | Path | Description |
652677
|---|---|---|
653678
| `GET` | `/api/threads` | List threads (optional `?status=` filter and `?include_archived=` boolean) |
654-
| `POST` | `/api/threads` | Create thread `{ "topic": "...", "metadata": {...}, "system_prompt": "..." }` |
679+
| `POST` | `/api/threads` | Create thread `{ "topic": "...", "metadata": {...}, "system_prompt": "...", "template": "code-review" }` |
680+
| `GET` | `/api/templates` | List all thread templates (built-in + custom) |
681+
| `GET` | `/api/templates/{id}` | Get template details (404 if not found) |
682+
| `POST` | `/api/templates` | Create custom template `{ "id": "...", "name": "...", "description": "...", "system_prompt": "..." }` |
683+
| `DELETE` | `/api/templates/{id}` | Delete custom template (403 if built-in, 404 if not found) |
655684
| `GET` | `/api/threads/{id}/messages` | List messages (`?after_seq=0&limit=200&include_system_prompt=false`) |
656685
| `POST` | `/api/threads/{id}/messages` | Post message `{ "author", "role", "content", "metadata": {...}, "mentions": [...] }` |
657686
| `POST` | `/api/threads/{id}/state` | Change state `{ "state": "discuss\|implement\|review\|done" }` |

0 commit comments

Comments
 (0)