Capture Templates
Templates are slash-prefixed shortcuts for repetitive captures. Type /idea: build a fast pastebin and Cortexa strips the prefix, applies the template's tags, and overrides the action toggles -- turning a quick thought into a fully structured, automated capture.
How Templates Work
When you type content starting with /trigger: or /trigger (with either a colon or a space after the trigger word), Cortexa matches it against your configured templates. If a match is found:
- The
/trigger:prefix is stripped from the content - The template's tags are automatically applied
- The template's action defaults (Summarize, Deep Think, Research) override whatever the source defaults would have been
Templates are parsed server-side in the Rust backend. This means the same behavior applies everywhere -- the app popup, the HTTP API, MCP cortexa_ingest, the CLI, the browser extension, and the Telegram bot.
Parsing rules
- Case-insensitive --
/IDEA:,/Idea:,/idea:all match theideatemplate - Colon or space -- both
/idea: build a thingand/idea build a thingwork - Leading whitespace tolerated --
/idea: build a thingparses correctly - Multiline content --
/idea:\n multi\nlinestrips the prefix and preserves the body asmulti\nline - Unknown triggers ignored --
/unknown: foois captured as-is, no template applies
Default Templates
Cortexa ships with three built-in templates:
/idea
| Setting | Value |
|---|---|
| Tags | idea |
| Summarize | off |
| Deep Think | on |
| Research | off |
| Description | Brain-dump an idea and run the thesis pipeline |
/idea: Use HNSW for semantic search instead of brute-force cosineThis captures "Use HNSW for semantic search instead of brute-force cosine", tags it idea, and kicks off the full Deep Think pipeline (Expand -> Counterpoint -> Synthesize). You get a structured research brief without any extra clicks.
/todo
| Setting | Value |
|---|---|
| Tags | todo |
| Summarize | off |
| Deep Think | off |
| Research | off |
| Description | Plain todo. No automation. |
/todo: Wire up the embedding migration progress barCaptures the text, tags it todo, and does nothing else. TODOs are lightweight -- no LLM calls.
/quote
| Setting | Value |
|---|---|
| Tags | quote |
| Summarize | on |
| Deep Think | off |
| Research | off |
| Description | Save a quote and summarize it |
/quote: "The best way to predict the future is to invent it" — Alan KayCaptures the quote, tags it quote, and runs summarization to extract the key insight.
Defining Custom Templates
Open Settings > Capture > Slash templates to manage templates. Each template has:
| Field | Description |
|---|---|
| Trigger | The word after / that activates this template (alphanumeric, underscores, hyphens) |
| Tags | Comma-separated tags to auto-apply on capture |
| Summarize | Whether to auto-summarize this capture |
| Deep Think | Whether to run the Deep Think pipeline |
| Research | Whether to run DuckDuckGo + LLM research |
| Description | Human-readable note shown in the template list |
Example: custom /bug template
Create a template with:
- Trigger:
bug - Tags:
bug, needs-triage - Summarize: on
- Deep Think: off
- Research: off
Now capturing:
/bug: Login fails with 403 when JWT expires during a long-running request.
The middleware checks exp before the handler runs, but the handler itself
makes a second auth call that can fail if the token expires mid-flight.produces a thought tagged bug and needs-triage, with a summary auto-generated, and no Deep Think overhead.
Example: custom /arch template
- Trigger:
arch - Tags:
architecture, design - Summarize: off
- Deep Think: on
- Research: on
/arch: Replace the monolithic API gateway with per-service BFF (Backend for Frontend)This tags the capture architecture and design, then runs both Deep Think (for the structured brief with gates) and Research (for DuckDuckGo SERP synthesis on the topic).
Templates Across All Capture Paths
Because parsing happens server-side, templates work identically everywhere:
App popup
Type /idea: build a fast pastebin in the capture window and press Ctrl+Enter.
CLI
cortexa-cli ingest "/idea: build a fast pastebin"The CLI sends raw content to the API; the backend parses the template.
MCP
{ "name": "cortexa_ingest", "arguments": { "content": "/idea: build a fast pastebin" } }Agents can use slash templates through cortexa_ingest without knowing anything about the template system -- the server handles it.
HTTP API
curl http://127.0.0.1:7373/api/ingest \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"content": "/idea: build a fast pastebin"}'Telegram
Send /idea: build a fast pastebin as a message to your Cortexa bot. The template is parsed the same way.
Browser extension
The extension sends captured text to /api/ingest. If you prepend /quote: to a selection before sending, the template applies.
Template Priority
Templates override source defaults but not explicit per-capture options. The full priority order:
- Slash template -- if the content starts with a registered
/trigger, the template's actions win - Explicit options -- if the capture UI or API passes explicit toggles (e.g., the user toggled "Summarize" on in the popup), those win
- Source defaults -- otherwise, the per-source defaults from Settings > Notifications apply
This means a /todo capture from Telegram will not auto-summarize even if the Telegram source default has summarize enabled -- the template's "summarize: off" takes precedence.
Combining Templates with Inline Tags
Templates and #hashtag extraction are additive. If you capture:
/idea: Build a #rust CLI for #kubernetes cluster managementThe thought gets:
ideatag (from the template)rusttag (from inline#rust)kubernetestag (from inline#kubernetes)- Deep Think enabled (from the template's actions)
What's Next
- Thoughts & Captures -- the full metadata model for captured thoughts
- Deep Think -- what happens when a template enables the thesis pipeline
- MCP Tools Reference --
cortexa_ingestwith template-aware content