Files
mindsdb--minds/docs/api.html
T
2026-07-13 12:08:46 +08:00

1489 lines
85 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>API Reference — Minds Cowork Docs</title>
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta name="description" content="REST API reference for Minds Cowork. Endpoints for conversations, projects, artifacts, schedules, files, connectors, memories, skills, and scratchpads." />
<meta name="keywords" content="Minds Cowork API, REST API, AI agent API, conversations API, projects API, artifacts API, schedules API, connectors API" />
<meta name="robots" content="index, follow" />
<meta name="author" content="Minds Platform" />
<meta property="og:title" content="API Reference — Minds Cowork" />
<meta property="og:description" content="REST API reference for Minds Cowork. Endpoints for conversations, projects, artifacts, schedules, files, connectors, memories, skills, and scratchpads." />
<meta property="og:type" content="website" />
<meta property="og:site_name" content="Minds Cowork" />
<meta property="og:image" content="favicon.png" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@MindsDB" />
<meta name="twitter:title" content="API Reference — Minds Cowork" />
<meta name="twitter:description" content="REST API reference for Minds Cowork. Endpoints for conversations, projects, artifacts, schedules, files, connectors, memories, skills, and scratchpads." />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Josefin+Sans:wght@300;400;700&display=swap" rel="stylesheet" />
<style>
:root {
--bg: #080d18;
--surface: #0E1626;
--surface-2: #131D31;
--surface-3: #1A2640;
--line: #1E2A44;
--line-2: #2A3957;
--ink: #F2F6FF;
--ink-2: #C7D2E5;
--ink-3: #8A97AE;
--ink-4: #5C6B85;
--accent: #22D3EE;
--accent-bg: rgba(34,211,238,0.10);
--accent-glow: rgba(34,211,238,0.45);
--method-get: #4ADE80;
--method-get-bg: rgba(74,222,128,0.10);
--method-post: #60A5FA;
--method-post-bg: rgba(96,165,250,0.10);
--method-patch: #FBBF24;
--method-patch-bg: rgba(251,191,36,0.10);
--method-delete: #F87171;
--method-delete-bg: rgba(248,113,113,0.10);
--method-put: #A78BFA;
--method-put-bg: rgba(167,139,250,0.10);
--r: 6px; --r-lg: 10px; --r-xl: 16px;
--font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
--font-display: 'Josefin Sans', 'Inter', sans-serif;
--font-mono: 'JetBrains Mono', ui-monospace, monospace;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: dark; }
body { background: var(--bg); color: var(--ink-2); font-family: var(--font-sans); font-size: 15px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { opacity: 0.8; }
code { font-family: var(--font-mono); font-size: 0.88em; background: var(--surface-3); border: 1px solid var(--line-2); border-radius: 4px; padding: 1px 6px; color: var(--accent); }
nav { position: sticky; top: 0; z-index: 40; background: rgba(8,13,24,0.80); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); border-bottom: 1px solid var(--line); }
.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; height: 52px; display: flex; align-items: center; gap: 32px; }
.brand { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.brand-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.nav-links { display: flex; gap: 24px; margin-left: auto; }
/* ── Mobile nav ── */
.hamburger {
display: none;
flex-direction: column; justify-content: center; gap: 5px;
width: 36px; height: 36px;
background: none; border: none; cursor: pointer;
padding: 4px; margin-left: auto; flex-shrink: 0;
}
.hamburger span {
display: block; width: 20px; height: 1.5px;
background: var(--ink-3); border-radius: 2px;
transition: transform 200ms, opacity 200ms, width 200ms;
transform-origin: center;
}
nav[data-open] .hamburger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
nav[data-open] .hamburger span:nth-child(2) { opacity: 0; width: 0; }
nav[data-open] .hamburger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
@media (max-width: 640px) {
.hamburger { display: flex; }
.nav-links {
display: none;
position: absolute; top: 52px; left: 0; right: 0;
flex-direction: column; gap: 0;
background: rgba(8,13,24,0.97);
backdrop-filter: saturate(160%) blur(16px);
-webkit-backdrop-filter: saturate(160%) blur(16px);
border-bottom: 1px solid var(--line);
padding: 8px 0;
z-index: 39;
}
nav[data-open] .nav-links { display: flex; }
.nav-links a {
padding: 12px 24px;
font-size: 14px;
border-left: 2px solid transparent;
}
.nav-links a.active { border-color: var(--accent); background: var(--accent-bg); }
}
.nav-links a { font-size: 13px; color: var(--ink-3); transition: color 120ms; }
.nav-links a:hover { color: var(--ink); opacity: 1; }
.nav-links a.active { color: var(--accent); }
.shell { max-width: 1100px; margin: 0 auto; padding: 64px 24px 120px; display: grid; grid-template-columns: 220px 1fr; gap: 0; align-items: start; }
@media (max-width: 768px) { .shell { grid-template-columns: 1fr; } }
.sidebar { padding-right: 40px; padding-top: 4px; position: sticky; top: 72px; }
@media (max-width: 768px) { .sidebar { display: none; } }
.sidebar-label { font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 12px; }
.sidebar ul { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.sidebar li a { font-size: 13px; color: var(--ink-3); display: block; padding: 4px 10px; border-left: 2px solid transparent; border-radius: 0 var(--r) var(--r) 0; transition: color 120ms, border-color 120ms; }
.sidebar li a:hover { color: var(--ink); opacity: 1; border-color: var(--line-2); }
.sidebar li a.active { color: var(--accent); border-color: var(--accent); }
.content { min-width: 0; }
.eyebrow { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.eyebrow::before { content: ''; display: block; width: 24px; height: 1px; background: var(--accent); }
h1 { font-family: var(--font-display); font-size: clamp(30px, 4vw, 46px); font-weight: 700; letter-spacing: -0.01em; line-height: 1.08; color: var(--ink); margin-bottom: 16px; }
.lede { font-size: 16px; line-height: 1.65; color: var(--ink-3); max-width: 60ch; margin-bottom: 52px; }
/* ── Base URL strip ── */
.base-url {
background: var(--surface-2);
border: 1px solid var(--line);
border-radius: var(--r-lg);
padding: 14px 18px;
display: flex; align-items: center; gap: 12px;
margin-bottom: 48px;
font-family: var(--font-mono); font-size: 13px;
}
.base-url .burl-label {
font-size: 10.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
color: var(--ink-4); white-space: nowrap;
}
.base-url .burl-val { color: var(--accent); }
/* ── Section ── */
.api-section { margin-bottom: 56px; scroll-margin-top: 80px; }
h2 { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.section-desc { font-size: 14px; color: var(--ink-3); margin-bottom: 20px; }
/* ── Endpoint ── */
.endpoint {
background: var(--surface);
border: 1px solid var(--line);
border-radius: var(--r-xl);
margin-bottom: 12px;
overflow: hidden;
}
.endpoint-header {
padding: 14px 18px;
display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
cursor: pointer;
user-select: none;
}
.endpoint:hover .endpoint-header { background: var(--surface-2); }
.method {
font-family: var(--font-mono); font-size: 10.5px; font-weight: 700;
letter-spacing: 0.08em; text-transform: uppercase;
padding: 3px 9px; border-radius: var(--r);
min-width: 56px; text-align: center;
}
.method.get { color: var(--method-get); background: var(--method-get-bg); }
.method.post { color: var(--method-post); background: var(--method-post-bg); }
.method.patch { color: var(--method-patch); background: var(--method-patch-bg); }
.method.delete { color: var(--method-delete); background: var(--method-delete-bg); }
.method.put { color: var(--method-put); background: var(--method-put-bg); }
.endpoint-path { font-family: var(--font-mono); font-size: 13.5px; color: var(--ink); }
.endpoint-desc { font-size: 13px; color: var(--ink-3); margin-left: auto; }
.endpoint-body { padding: 0 18px 18px; border-top: 1px solid var(--line); }
.endpoint-body p { font-size: 13.5px; color: var(--ink-3); margin: 14px 0 10px; }
pre { font-family: var(--font-mono); font-size: 12.5px; line-height: 1.65; color: var(--ink-2); overflow-x: auto; tab-size: 2; }
.code-block { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin: 10px 0; }
.code-header { padding: 8px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; }
.code-lang { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-4); }
.code-block pre { padding: 14px 16px; }
.hl { color: var(--accent); }
.cm { color: var(--ink-4); }
.st { color: #A5F3FC; }
/* ── ERD ── */
.erd-wrap { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 24px 20px 14px; margin-bottom: 48px; overflow-x: auto; }
.erd-wrap svg a { cursor: pointer; }
.erd-wrap svg a:hover { filter: brightness(1.25); }
.erd-notes { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.erd-note { font-size: 12px; color: var(--ink-4); font-family: var(--font-mono); line-height: 1.55; padding: 0 2px; }
.erd-note strong { color: var(--ink-3); font-weight: 600; }
/* ── Params table ── */
.schema-label { font-family: var(--font-mono); font-size: 9.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-4); margin: 16px 0 8px; }
.params-table { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.params-table tr:not(:last-child) td { border-bottom: 1px solid var(--line); }
.params-table td { padding: 7px 0; vertical-align: top; }
.p-name { font-family: var(--font-mono); color: var(--accent); font-size: 12px; padding-right: 16px; white-space: nowrap; width: 1%; }
.p-type { font-family: var(--font-mono); color: var(--ink-4); font-size: 11px; padding-right: 16px; white-space: nowrap; width: 1%; }
.p-req { font-family: var(--font-mono); font-size: 10px; padding-right: 16px; white-space: nowrap; width: 1%; }
.p-req.req { color: var(--method-post); }
.p-req.opt { color: var(--ink-4); }
.p-desc { font-size: 12.5px; color: var(--ink-3); }
.p-desc code { font-size: 0.9em; }
footer { border-top: 1px solid var(--line); padding: 24px; text-align: center; font-family: var(--font-mono); font-size: 11px; color: var(--ink-4); letter-spacing: 0.06em; }
</style>
</head>
<body>
<nav>
<div class="nav-inner">
<div class="brand"><div class="brand-dot"></div>Minds Cowork</div>
<div class="nav-links">
<a href="index.html">Docs</a>
<a href="setup.html">Setup</a>
<a href="use-cases.html">Use Cases</a>
<a href="api.html" class="active">API</a>
<a href="https://github.com/mindsdb/minds-platform">GitHub ↗</a>
</div>
<button class="hamburger" aria-label="Toggle menu">
<span></span><span></span><span></span>
</button>
</div>
</nav>
<div class="shell">
<aside class="sidebar">
<div class="sidebar-label">Endpoints</div>
<ul>
<li><a href="#overview">Overview</a></li>
<li><a href="#responses">Responses</a></li>
<li><a href="#conversations">Conversations</a></li>
<li><a href="#projects">Projects</a></li>
<li><a href="#artifacts">Artifacts</a></li>
<li><a href="#schedules">Schedules</a></li>
<li><a href="#files">Files</a></li>
<li><a href="#connectors">Connectors</a></li>
<li><a href="#memories">Memories</a></li>
<li><a href="#skills">Skills</a></li>
<li><a href="#scratchpads">Scratchpads</a></li>
<li><a href="#search">Search</a></li>
</ul>
</aside>
<main class="content">
<div class="eyebrow">API Reference</div>
<h1 id="overview">REST API</h1>
<p class="lede">
The Cowork server exposes a versioned REST API at <code>/api/v1</code>.
All endpoints return JSON.
</p>
<!-- ERD -->
<div class="erd-wrap">
<svg viewBox="0 0 760 360" xmlns="http://www.w3.org/2000/svg" aria-label="Resource relationship diagram" style="width:100%;height:auto;display:block">
<defs>
<marker id="ah" markerWidth="9" markerHeight="9" refX="7" refY="4.5" orient="auto">
<path d="M1.5,1.5 L7,4.5 L1.5,7.5" stroke="#3A4F6E" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/>
</marker>
<marker id="ah-d" markerWidth="9" markerHeight="9" refX="7" refY="4.5" orient="auto">
<path d="M1.5,1.5 L7,4.5 L1.5,7.5" stroke="#2A3957" stroke-width="1.2" fill="none" stroke-linecap="round" stroke-linejoin="round"/>
</marker>
</defs>
<!-- ── Relationship lines (drawn behind boxes) ── -->
<!-- Project → Conversations -->
<path d="M 350,60 C 350,95 89,95 89,130" stroke="#2A3957" stroke-width="1.5" fill="none" marker-end="url(#ah)"/>
<text x="80" y="127" font-family="'JetBrains Mono',monospace" font-size="9" fill="#3A4F6E">N</text>
<!-- Project → Artifacts -->
<path d="M 350,60 C 350,95 260,95 260,130" stroke="#2A3957" stroke-width="1.5" fill="none" marker-end="url(#ah)"/>
<text x="251" y="127" font-family="'JetBrains Mono',monospace" font-size="9" fill="#3A4F6E">N</text>
<!-- Project → Schedules -->
<path d="M 350,60 C 350,95 415,95 415,130" stroke="#2A3957" stroke-width="1.5" fill="none" marker-end="url(#ah)"/>
<text x="407" y="127" font-family="'JetBrains Mono',monospace" font-size="9" fill="#3A4F6E">N</text>
<!-- Project → File (routes right of Schedules) -->
<path d="M 430,60 C 550,60 550,200 415,215" stroke="#2A3957" stroke-width="1.5" fill="none" marker-end="url(#ah)"/>
<text x="548" y="140" font-family="'JetBrains Mono',monospace" font-size="9" fill="#3A4F6E">N</text>
<!-- Conversation → File (optional, dashed) -->
<path d="M 89,186 C 89,215 415,211 415,215" stroke="#1E2A44" stroke-width="1.2" stroke-dasharray="5,3" fill="none" marker-end="url(#ah-d)"/>
<!-- "1" near Project bottom -->
<text x="356" y="75" font-family="'JetBrains Mono',monospace" font-size="9" fill="#3A4F6E">1</text>
<!-- Conversations → Responses -->
<path d="M 89,186 C 89,225 70,225 70,265" stroke="#2A3957" stroke-width="1.5" fill="none" marker-end="url(#ah)"/>
<text x="95" y="230" font-family="'JetBrains Mono',monospace" font-size="9" fill="#3A4F6E">N</text>
<text x="95" y="172" font-family="'JetBrains Mono',monospace" font-size="9" fill="#3A4F6E">1</text>
<!-- Conversations → Scratchpads -->
<path d="M 168,162 C 220,162 220,265 210,265" stroke="#2A3957" stroke-width="1.5" fill="none" marker-end="url(#ah)"/>
<text x="228" y="261" font-family="'JetBrains Mono',monospace" font-size="9" fill="#3A4F6E">N</text>
<!-- Scratchpad → Cells -->
<path d="M 278,288 C 320,288 320,303 330,310" stroke="#2A3957" stroke-width="1.5" fill="none" marker-end="url(#ah)"/>
<text x="340" y="306" font-family="'JetBrains Mono',monospace" font-size="9" fill="#3A4F6E">N</text>
<!-- Schedules → triggers → Conversations (dashed) -->
<path d="M 355,153 C 295,153 228,162 168,162" stroke="#1E2A44" stroke-width="1.2" stroke-dasharray="5,3" fill="none" marker-end="url(#ah-d)"/>
<text x="268" y="147" font-family="'JetBrains Mono',monospace" font-size="9" fill="#5C6B85" text-anchor="middle">triggers</text>
<!-- Project — Connectors (dashed, usable within) -->
<line x1="430" y1="37" x2="590" y2="37" stroke="#1E2A44" stroke-width="1.2" stroke-dasharray="5,3" marker-end="url(#ah-d)"/>
<!-- Project → Memory (optional, dashed 0..N) -->
<path d="M 430,60 C 490,60 490,101 590,101" stroke="#1E2A44" stroke-width="1.2" stroke-dasharray="5,3" fill="none" marker-end="url(#ah-d)"/>
<text x="510" y="76" font-family="'JetBrains Mono',monospace" font-size="9" fill="#3A465E" text-anchor="middle">0..N</text>
<!-- ── Entity boxes ── -->
<!-- Project (accent border) -->
<a href="#projects">
<rect x="270" y="14" width="160" height="46" rx="8" fill="#0A1420" stroke="rgba(34,211,238,0.18)" stroke-width="9"/>
<rect x="270" y="14" width="160" height="46" rx="8" fill="#0E1626" stroke="#22D3EE" stroke-width="1.5"/>
<text x="350" y="35" text-anchor="middle" font-family="'Inter',sans-serif" font-size="13" font-weight="700" fill="#F2F6FF" letter-spacing="0.2">Project</text>
<text x="350" y="51" text-anchor="middle" font-family="'JetBrains Mono',monospace" font-size="9" fill="#5C6B85">central workspace</text>
</a>
<!-- Connectors (dashed border = independent) -->
<a href="#connectors">
<rect x="590" y="14" width="148" height="46" rx="8" fill="#0E1626" stroke="#2A3957" stroke-width="1.5" stroke-dasharray="5,3"/>
<text x="664" y="35" text-anchor="middle" font-family="'Inter',sans-serif" font-size="13" font-weight="600" fill="#8A97AE">Connector</text>
<text x="664" y="51" text-anchor="middle" font-family="'JetBrains Mono',monospace" font-size="9" fill="#3A465E">independent</text>
</a>
<!-- Conversations / Tasks -->
<a href="#conversations">
<rect x="10" y="130" width="158" height="56" rx="8" fill="#0E1626" stroke="#1E2A44" stroke-width="1.5"/>
<text x="89" y="152" text-anchor="middle" font-family="'Inter',sans-serif" font-size="13" font-weight="600" fill="#F2F6FF">Conversation</text>
<rect x="19" y="159" width="50" height="17" rx="4" fill="rgba(34,211,238,0.12)" stroke="rgba(34,211,238,0.28)" stroke-width="1"/>
<text x="44" y="171" text-anchor="middle" font-family="'JetBrains Mono',monospace" font-size="9" font-weight="600" fill="#22D3EE">= Task</text>
</a>
<!-- Artifacts -->
<a href="#artifacts">
<rect x="195" y="130" width="130" height="56" rx="8" fill="#0E1626" stroke="#1E2A44" stroke-width="1.5"/>
<text x="260" y="152" text-anchor="middle" font-family="'Inter',sans-serif" font-size="13" font-weight="600" fill="#F2F6FF">Artifact</text>
<rect x="204" y="159" width="62" height="17" rx="4" fill="rgba(196,181,253,0.12)" stroke="rgba(196,181,253,0.28)" stroke-width="1"/>
<text x="235" y="171" text-anchor="middle" font-family="'JetBrains Mono',monospace" font-size="9" font-weight="600" fill="#C4B5FD">mini app</text>
</a>
<!-- Schedules -->
<a href="#schedules">
<rect x="355" y="130" width="120" height="46" rx="8" fill="#0E1626" stroke="#1E2A44" stroke-width="1.5"/>
<text x="415" y="157" text-anchor="middle" font-family="'Inter',sans-serif" font-size="13" font-weight="600" fill="#F2F6FF">Schedule</text>
</a>
<!-- Files (below Schedule) -->
<a href="#files">
<rect x="370" y="215" width="90" height="46" rx="8" fill="#0E1626" stroke="#1E2A44" stroke-width="1.5"/>
<text x="415" y="242" text-anchor="middle" font-family="'Inter',sans-serif" font-size="13" font-weight="600" fill="#F2F6FF">File</text>
</a>
<!-- Responses -->
<a href="#responses">
<rect x="10" y="265" width="120" height="46" rx="8" fill="#0E1626" stroke="#1E2A44" stroke-width="1.5"/>
<text x="70" y="292" text-anchor="middle" font-family="'Inter',sans-serif" font-size="13" font-weight="600" fill="#F2F6FF">Response</text>
</a>
<!-- Scratchpads (conversation-scoped) -->
<a href="#scratchpads">
<rect x="148" y="265" width="130" height="46" rx="8" fill="#0E1626" stroke="#1E2A44" stroke-width="1.5"/>
<text x="213" y="286" text-anchor="middle" font-family="'Inter',sans-serif" font-size="13" font-weight="600" fill="#F2F6FF">Scratchpad</text>
<text x="213" y="302" text-anchor="middle" font-family="'JetBrains Mono',monospace" font-size="9" fill="#5C6B85">ephemeral draft</text>
</a>
<!-- Cell (scratchpad-scoped) -->
<a href="#scratchpads">
<rect x="330" y="298" width="90" height="46" rx="8" fill="#0E1626" stroke="#1E2A44" stroke-width="1.5"/>
<text x="375" y="319" text-anchor="middle" font-family="'Inter',sans-serif" font-size="13" font-weight="600" fill="#F2F6FF">Cell</text>
<text x="375" y="335" text-anchor="middle" font-family="'JetBrains Mono',monospace" font-size="9" fill="#5C6B85">code · md · output</text>
</a>
<!-- Memory (optional project scope, solid border) -->
<a href="#memories">
<rect x="590" y="78" width="148" height="46" rx="8" fill="#0E1626" stroke="#1E2A44" stroke-width="1.5"/>
<text x="664" y="99" text-anchor="middle" font-family="'Inter',sans-serif" font-size="13" font-weight="600" fill="#F2F6FF">Memory</text>
<text x="664" y="115" text-anchor="middle" font-family="'JetBrains Mono',monospace" font-size="9" fill="#5C6B85">global or project</text>
</a>
<!-- Skills (global, dashed border like Connectors) -->
<a href="#skills">
<rect x="590" y="142" width="148" height="46" rx="8" fill="#0E1626" stroke="#2A3957" stroke-width="1.5" stroke-dasharray="5,3"/>
<text x="664" y="163" text-anchor="middle" font-family="'Inter',sans-serif" font-size="13" font-weight="600" fill="#8A97AE">Skill</text>
<text x="664" y="179" text-anchor="middle" font-family="'JetBrains Mono',monospace" font-size="9" fill="#3A465E">global</text>
</a>
<!-- "usable within" label — rendered last so it sits above boxes -->
<rect x="463" y="18" width="94" height="14" rx="3" fill="#0C1522" stroke="#1E2A44" stroke-width="0.75"/>
<text x="510" y="28.5" font-family="'JetBrains Mono',monospace" font-size="8.5" fill="#5C6B85" text-anchor="middle">usable within</text>
<!-- ── Legend (bottom-right, dotted box) ── -->
<rect x="492" y="210" width="250" height="98" rx="6" fill="rgba(8,13,24,0.88)" stroke="#2A3957" stroke-width="1" stroke-dasharray="4,3"/>
<text x="502" y="225" font-family="'JetBrains Mono',monospace" font-size="8" font-weight="600" fill="#3A465E" letter-spacing="0.12em">LEGEND</text>
<!-- owns 1..N -->
<line x1="502" y1="238" x2="522" y2="238" stroke="#2A3957" stroke-width="1.5"/>
<path d="M517.5,235.5 L522,238 L517.5,240.5" stroke="#3A4F6E" stroke-width="1.2" fill="none" stroke-linecap="round" stroke-linejoin="round"/>
<text x="528" y="242" font-family="'JetBrains Mono',monospace" font-size="9" fill="#5C6B85">owns 1..N</text>
<!-- optional / triggers -->
<line x1="502" y1="257" x2="522" y2="257" stroke="#1E2A44" stroke-width="1.2" stroke-dasharray="4,2"/>
<path d="M517.5,254.5 L522,257 L517.5,259.5" stroke="#2A3957" stroke-width="1" fill="none" stroke-linecap="round" stroke-linejoin="round"/>
<text x="528" y="261" font-family="'JetBrains Mono',monospace" font-size="9" fill="#5C6B85">optional / triggers</text>
<!-- independent -->
<rect x="502" y="268" width="20" height="14" rx="3" fill="none" stroke="#2A3957" stroke-width="1" stroke-dasharray="3,2"/>
<text x="528" y="279" font-family="'JetBrains Mono',monospace" font-size="9" fill="#5C6B85">independent / global</text>
<!-- usable within -->
<line x1="502" y1="293" x2="522" y2="293" stroke="#1E2A44" stroke-width="1" stroke-dasharray="4,2"/>
<text x="528" y="297" font-family="'JetBrains Mono',monospace" font-size="9" fill="#5C6B85">usable within / 0..N</text>
</svg>
</div>
<div class="base-url">
<span class="burl-label">Base URL</span>
<span class="burl-val">http://localhost:26866/api/v1</span>
</div>
<!-- Responses -->
<div class="api-section" id="responses">
<h2>Responses</h2>
<p class="section-desc">Stream AI responses from the agent. Compatible with the OpenAI Responses API shape.</p>
<p class="schema-label">Response object</p>
<div class="code-block" style="margin-bottom:24px">
<div class="code-header"><span class="code-lang">json</span></div>
<pre>{
<span class="hl">"id"</span>: <span class="st">"resp_abc123"</span>,
<span class="hl">"conversation_id"</span>: <span class="st">"conv_xyz"</span>,
<span class="hl">"input"</span>: <span class="st">"Summarise last week's sales data"</span>,
<span class="hl">"output"</span>: [{ <span class="hl">"type"</span>: <span class="st">"text"</span>, <span class="hl">"text"</span>: <span class="st">"Here is the summary..."</span> }],
<span class="hl">"status"</span>: <span class="st">"completed"</span>, <span class="cm">// "in_progress" | "completed" | "failed"</span>
<span class="hl">"model"</span>: <span class="st">"claude-opus-4-8"</span>,
<span class="hl">"usage"</span>: { <span class="hl">"input_tokens"</span>: <span class="st">120</span>, <span class="hl">"output_tokens"</span>: <span class="st">340</span> },
<span class="hl">"created_at"</span>: <span class="st">"2026-06-11T10:00:00Z"</span>
}</pre>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method post">POST</span>
<span class="endpoint-path">/responses</span>
<span class="endpoint-desc">Create a streaming response</span>
</div>
<div class="endpoint-body">
<p class="schema-label">Body</p>
<table class="params-table">
<tr><td class="p-name">conversation_id</td><td class="p-type">string</td><td class="p-req req">required</td><td class="p-desc">ID of the conversation to append the response to.</td></tr>
<tr><td class="p-name">input</td><td class="p-type">string</td><td class="p-req req">required</td><td class="p-desc">User message text.</td></tr>
<tr><td class="p-name">stream</td><td class="p-type">boolean</td><td class="p-req opt">optional</td><td class="p-desc">Default <code>true</code>. Return server-sent events. Set to <code>false</code> for a single JSON response.</td></tr>
<tr><td class="p-name">model</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc">Override the agent model for this turn. Defaults to the project setting.</td></tr>
<tr><td class="p-name">skill_ids</td><td class="p-type">string[]</td><td class="p-req opt">optional</td><td class="p-desc">Skill IDs to activate for this turn.</td></tr>
</table>
<div class="code-block">
<div class="code-header"><span class="code-lang">curl</span></div>
<pre><span class="hl">curl</span> -X POST http://localhost:26866/api/v1/responses \
-H <span class="st">"Content-Type: application/json"</span> \
-d <span class="st">'{"conversation_id":"conv_xyz","input":"Summarise last week'\''s sales data","stream":true}'</span></pre>
</div>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method get">GET</span>
<span class="endpoint-path">/responses/in-flight-list</span>
<span class="endpoint-desc">List active streams</span>
</div>
<div class="endpoint-body">
<p class="schema-label">Query parameters</p>
<table class="params-table">
<tr><td class="p-name">conversation_id</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc">Filter to a specific conversation.</td></tr>
</table>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method get">GET</span>
<span class="endpoint-path">/responses/in-flight</span>
<span class="endpoint-desc">Check a specific in-flight stream</span>
</div>
<div class="endpoint-body">
<p class="schema-label">Query parameters</p>
<table class="params-table">
<tr><td class="p-name">conversation_id</td><td class="p-type">string</td><td class="p-req req">required</td><td class="p-desc">Conversation whose active stream to retrieve.</td></tr>
</table>
</div>
</div>
</div>
<!-- Conversations -->
<div class="api-section" id="conversations">
<h2>Conversations</h2>
<p class="section-desc">Manage conversation threads. Each conversation holds an ordered list of messages. <strong>Conversations and Tasks are the same concept</strong> — every task is a conversation with a goal and an assigned agent. The API uses both terms interchangeably.</p>
<p class="schema-label">Conversation object</p>
<div class="code-block" style="margin-bottom:24px">
<div class="code-header"><span class="code-lang">json</span></div>
<pre>{
<span class="hl">"id"</span>: <span class="st">"conv_abc123"</span>,
<span class="hl">"project_id"</span>: <span class="st">"proj_xyz"</span>, <span class="cm">// null if not project-scoped</span>
<span class="hl">"title"</span>: <span class="st">"Q2 analysis"</span>,
<span class="hl">"goal"</span>: <span class="st">"Analyse Q2 revenue by region"</span>, <span class="cm">// task prompt, optional</span>
<span class="hl">"status"</span>: <span class="st">"active"</span>, <span class="cm">// "active" | "archived"</span>
<span class="hl">"created_at"</span>: <span class="st">"2026-06-11T10:00:00Z"</span>,
<span class="hl">"updated_at"</span>: <span class="st">"2026-06-11T10:04:12Z"</span>
}</pre>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method get">GET</span>
<span class="endpoint-path">/conversations</span>
<span class="endpoint-desc">List conversations</span>
</div>
<div class="endpoint-body">
<p class="schema-label">Query parameters</p>
<table class="params-table">
<tr><td class="p-name">project_id</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc">Filter to a specific project.</td></tr>
<tr><td class="p-name">status</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc"><code>active</code> or <code>archived</code>. Returns all if omitted.</td></tr>
<tr><td class="p-name">limit</td><td class="p-type">integer</td><td class="p-req opt">optional</td><td class="p-desc">Max results to return. Default <code>50</code>, max <code>200</code>.</td></tr>
<tr><td class="p-name">offset</td><td class="p-type">integer</td><td class="p-req opt">optional</td><td class="p-desc">Pagination offset. Default <code>0</code>.</td></tr>
</table>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method post">POST</span>
<span class="endpoint-path">/conversations</span>
<span class="endpoint-desc">Create a conversation</span>
</div>
<div class="endpoint-body">
<p class="schema-label">Body</p>
<table class="params-table">
<tr><td class="p-name">project_id</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc">Attach to a project.</td></tr>
<tr><td class="p-name">title</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc">Human-readable name. Auto-generated from the first message if omitted.</td></tr>
<tr><td class="p-name">goal</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc">Task prompt or goal that frames the conversation for the agent.</td></tr>
</table>
<div class="code-block">
<div class="code-header"><span class="code-lang">curl</span></div>
<pre><span class="hl">curl</span> -X POST http://localhost:26866/api/v1/conversations \
-H <span class="st">"Content-Type: application/json"</span> \
-d <span class="st">'{"project_id":"proj_xyz","title":"Q2 analysis","goal":"Analyse Q2 revenue by region"}'</span></pre>
</div>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method get">GET</span>
<span class="endpoint-path">/conversations/{id}</span>
<span class="endpoint-desc">Get a conversation</span>
</div>
<div class="endpoint-body">
<p class="schema-label">Path parameters</p>
<table class="params-table">
<tr><td class="p-name">id</td><td class="p-type">string</td><td class="p-req req">required</td><td class="p-desc">Conversation ID.</td></tr>
</table>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method patch">PATCH</span>
<span class="endpoint-path">/conversations/{id}</span>
<span class="endpoint-desc">Update title, goal, or status</span>
</div>
<div class="endpoint-body">
<p class="schema-label">Body</p>
<table class="params-table">
<tr><td class="p-name">title</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc">New title.</td></tr>
<tr><td class="p-name">goal</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc">Updated task goal.</td></tr>
<tr><td class="p-name">status</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc"><code>active</code> or <code>archived</code>.</td></tr>
</table>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method get">GET</span>
<span class="endpoint-path">/conversations/{id}/items</span>
<span class="endpoint-desc">Get messages in a conversation</span>
</div>
<div class="endpoint-body">
<p>Returns an ordered array of message items. Each item has <code>role</code> (<code>user</code> or <code>assistant</code>), <code>content</code>, and <code>created_at</code>.</p>
<p class="schema-label">Query parameters</p>
<table class="params-table">
<tr><td class="p-name">limit</td><td class="p-type">integer</td><td class="p-req opt">optional</td><td class="p-desc">Default <code>100</code>.</td></tr>
<tr><td class="p-name">before</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc">Return items before this item ID (cursor pagination).</td></tr>
</table>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method delete">DELETE</span>
<span class="endpoint-path">/conversations/{id}</span>
<span class="endpoint-desc">Delete a conversation and all its messages</span>
</div>
</div>
</div>
<!-- Projects -->
<div class="api-section" id="projects">
<h2>Projects</h2>
<p class="section-desc">Projects are workspaces that group conversations, files, and artifacts.</p>
<p class="schema-label">Project object</p>
<div class="code-block" style="margin-bottom:24px">
<div class="code-header"><span class="code-lang">json</span></div>
<pre>{
<span class="hl">"id"</span>: <span class="st">"proj_abc123"</span>,
<span class="hl">"name"</span>: <span class="st">"Sales Automation"</span>,
<span class="hl">"description"</span>: <span class="st">"Weekly reporting flows"</span>,
<span class="hl">"connector_ids"</span>: [<span class="st">"conn_001"</span>, <span class="st">"conn_002"</span>],
<span class="hl">"skill_ids"</span>: [<span class="st">"skill_abc"</span>],
<span class="hl">"created_at"</span>: <span class="st">"2026-06-11T10:00:00Z"</span>,
<span class="hl">"updated_at"</span>: <span class="st">"2026-06-11T10:00:00Z"</span>
}</pre>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method get">GET</span>
<span class="endpoint-path">/projects</span>
<span class="endpoint-desc">List all projects</span>
</div>
<div class="endpoint-body">
<p class="schema-label">Query parameters</p>
<table class="params-table">
<tr><td class="p-name">limit</td><td class="p-type">integer</td><td class="p-req opt">optional</td><td class="p-desc">Default <code>50</code>.</td></tr>
<tr><td class="p-name">offset</td><td class="p-type">integer</td><td class="p-req opt">optional</td><td class="p-desc">Default <code>0</code>.</td></tr>
</table>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method post">POST</span>
<span class="endpoint-path">/projects</span>
<span class="endpoint-desc">Create a project</span>
</div>
<div class="endpoint-body">
<p class="schema-label">Body</p>
<table class="params-table">
<tr><td class="p-name">name</td><td class="p-type">string</td><td class="p-req req">required</td><td class="p-desc">Display name for the project.</td></tr>
<tr><td class="p-name">description</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc">Short description shown in the UI.</td></tr>
<tr><td class="p-name">connector_ids</td><td class="p-type">string[]</td><td class="p-req opt">optional</td><td class="p-desc">Data source connections available within this project.</td></tr>
<tr><td class="p-name">skill_ids</td><td class="p-type">string[]</td><td class="p-req opt">optional</td><td class="p-desc">Global skills to activate for all conversations in this project.</td></tr>
</table>
<div class="code-block">
<div class="code-header"><span class="code-lang">curl</span></div>
<pre><span class="hl">curl</span> -X POST http://localhost:26866/api/v1/projects \
-H <span class="st">"Content-Type: application/json"</span> \
-d <span class="st">'{"name":"Sales Automation","description":"Weekly reporting flows","connector_ids":["conn_001"]}'</span></pre>
</div>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method patch">PATCH</span>
<span class="endpoint-path">/projects/{id}</span>
<span class="endpoint-desc">Update a project</span>
</div>
<div class="endpoint-body">
<p class="schema-label">Body</p>
<table class="params-table">
<tr><td class="p-name">name</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc"></td></tr>
<tr><td class="p-name">description</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc"></td></tr>
<tr><td class="p-name">connector_ids</td><td class="p-type">string[]</td><td class="p-req opt">optional</td><td class="p-desc">Replaces the current list.</td></tr>
<tr><td class="p-name">skill_ids</td><td class="p-type">string[]</td><td class="p-req opt">optional</td><td class="p-desc">Replaces the current list.</td></tr>
</table>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method delete">DELETE</span>
<span class="endpoint-path">/projects/{id}</span>
<span class="endpoint-desc">Delete a project and all its contents</span>
</div>
</div>
</div>
<!-- Artifacts -->
<div class="api-section" id="artifacts">
<h2>Artifacts</h2>
<p class="section-desc"><strong>Artifacts are mini apps</strong> — web apps, dashboards, reports, and documents generated by the agent and hosted within a project. Each artifact belongs to a project.</p>
<p class="schema-label">Artifact object</p>
<div class="code-block" style="margin-bottom:24px">
<div class="code-header"><span class="code-lang">json</span></div>
<pre>{
<span class="hl">"id"</span>: <span class="st">"art_abc123"</span>,
<span class="hl">"project_id"</span>: <span class="st">"proj_xyz"</span>,
<span class="hl">"title"</span>: <span class="st">"Sales Dashboard"</span>,
<span class="hl">"type"</span>: <span class="st">"app"</span>, <span class="cm">// "app" | "report" | "doc" | "dashboard"</span>
<span class="hl">"path"</span>: <span class="st">"sales_dashboard/index.html"</span>, <span class="cm">// relative path within project</span>
<span class="hl">"created_at"</span>: <span class="st">"2026-06-11T10:00:00Z"</span>,
<span class="hl">"updated_at"</span>: <span class="st">"2026-06-11T10:00:00Z"</span>
}</pre>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method get">GET</span>
<span class="endpoint-path">/artifacts</span>
<span class="endpoint-desc">List artifacts</span>
</div>
<div class="endpoint-body">
<p class="schema-label">Query parameters</p>
<table class="params-table">
<tr><td class="p-name">project_id</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc">Filter to a project.</td></tr>
<tr><td class="p-name">type</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc"><code>app</code>, <code>report</code>, <code>doc</code>, or <code>dashboard</code>.</td></tr>
<tr><td class="p-name">limit</td><td class="p-type">integer</td><td class="p-req opt">optional</td><td class="p-desc">Default <code>50</code>.</td></tr>
</table>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method get">GET</span>
<span class="endpoint-path">/artifacts/preview</span>
<span class="endpoint-desc">Preview an artifact by path</span>
</div>
<div class="endpoint-body">
<p class="schema-label">Query parameters</p>
<table class="params-table">
<tr><td class="p-name">path</td><td class="p-type">string</td><td class="p-req req">required</td><td class="p-desc">Relative artifact path, e.g. <code>sales_dashboard/index.html</code>.</td></tr>
<tr><td class="p-name">project_id</td><td class="p-type">string</td><td class="p-req req">required</td><td class="p-desc">Project that owns the artifact.</td></tr>
</table>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method post">POST</span>
<span class="endpoint-path">/artifacts/open</span>
<span class="endpoint-desc">Open an artifact in the desktop shell</span>
</div>
<div class="endpoint-body">
<p class="schema-label">Body</p>
<table class="params-table">
<tr><td class="p-name">artifact_id</td><td class="p-type">string</td><td class="p-req req">required</td><td class="p-desc">Artifact to open in the Electron window.</td></tr>
</table>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method get">GET</span>
<span class="endpoint-path">/artifacts/serve/{project_id}/{path}</span>
<span class="endpoint-desc">Serve a raw artifact file</span>
</div>
<div class="endpoint-body">
<p class="schema-label">Path parameters</p>
<table class="params-table">
<tr><td class="p-name">project_id</td><td class="p-type">string</td><td class="p-req req">required</td><td class="p-desc">Project ID.</td></tr>
<tr><td class="p-name">path</td><td class="p-type">string</td><td class="p-req req">required</td><td class="p-desc">File path within the artifact, e.g. <code>index.html</code> or <code>assets/chart.js</code>.</td></tr>
</table>
</div>
</div>
</div>
<!-- Schedules -->
<div class="api-section" id="schedules">
<h2>Schedules</h2>
<p class="section-desc">Run tasks on a cron schedule. Schedules belong to a project and trigger a conversation or workflow automatically.</p>
<p class="schema-label">Schedule object</p>
<div class="code-block" style="margin-bottom:24px">
<div class="code-header"><span class="code-lang">json</span></div>
<pre>{
<span class="hl">"id"</span>: <span class="st">"sched_abc123"</span>,
<span class="hl">"project_id"</span>: <span class="st">"proj_xyz"</span>,
<span class="hl">"cron"</span>: <span class="st">"0 9 * * 1"</span>, <span class="cm">// standard 5-field cron expression</span>
<span class="hl">"timezone"</span>: <span class="st">"America/New_York"</span>,
<span class="hl">"prompt"</span>: <span class="st">"Generate weekly sales digest"</span>,
<span class="hl">"conversation_id"</span>: <span class="st">null</span>, <span class="cm">// null = create new conversation each run</span>
<span class="hl">"status"</span>: <span class="st">"active"</span>, <span class="cm">// "active" | "paused"</span>
<span class="hl">"last_run_at"</span>: <span class="st">"2026-06-09T09:00:00Z"</span>,
<span class="hl">"next_run_at"</span>: <span class="st">"2026-06-16T09:00:00Z"</span>,
<span class="hl">"created_at"</span>: <span class="st">"2026-06-01T00:00:00Z"</span>
}</pre>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method get">GET</span>
<span class="endpoint-path">/schedules</span>
<span class="endpoint-desc">List schedules</span>
</div>
<div class="endpoint-body">
<p class="schema-label">Query parameters</p>
<table class="params-table">
<tr><td class="p-name">project_id</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc">Filter to a project.</td></tr>
<tr><td class="p-name">status</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc"><code>active</code> or <code>paused</code>.</td></tr>
</table>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method post">POST</span>
<span class="endpoint-path">/schedules</span>
<span class="endpoint-desc">Create a schedule</span>
</div>
<div class="endpoint-body">
<p class="schema-label">Body</p>
<table class="params-table">
<tr><td class="p-name">project_id</td><td class="p-type">string</td><td class="p-req req">required</td><td class="p-desc">Project this schedule belongs to.</td></tr>
<tr><td class="p-name">cron</td><td class="p-type">string</td><td class="p-req req">required</td><td class="p-desc">Standard 5-field cron expression, e.g. <code>"0 9 * * 1"</code> = every Monday at 09:00.</td></tr>
<tr><td class="p-name">prompt</td><td class="p-type">string</td><td class="p-req req">required</td><td class="p-desc">Task the agent runs at each scheduled time.</td></tr>
<tr><td class="p-name">timezone</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc">IANA timezone. Default <code>UTC</code>.</td></tr>
<tr><td class="p-name">conversation_id</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc">Append each run to an existing conversation. If omitted, a new conversation is created per run.</td></tr>
</table>
<div class="code-block">
<div class="code-header"><span class="code-lang">curl</span></div>
<pre><span class="hl">curl</span> -X POST http://localhost:26866/api/v1/schedules \
-H <span class="st">"Content-Type: application/json"</span> \
-d <span class="st">'{"project_id":"proj_xyz","cron":"0 9 * * 1","prompt":"Generate weekly sales digest","timezone":"America/New_York"}'</span></pre>
</div>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method patch">PATCH</span>
<span class="endpoint-path">/schedules/{id}</span>
<span class="endpoint-desc">Update a schedule</span>
</div>
<div class="endpoint-body">
<p class="schema-label">Body</p>
<table class="params-table">
<tr><td class="p-name">cron</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc">New cron expression.</td></tr>
<tr><td class="p-name">prompt</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc">Updated task prompt.</td></tr>
<tr><td class="p-name">timezone</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc">New timezone.</td></tr>
<tr><td class="p-name">status</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc"><code>active</code> or <code>paused</code>.</td></tr>
</table>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method post">POST</span>
<span class="endpoint-path">/schedules/{id}/run</span>
<span class="endpoint-desc">Trigger a schedule immediately</span>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method delete">DELETE</span>
<span class="endpoint-path">/schedules/{id}</span>
<span class="endpoint-desc">Delete a schedule</span>
</div>
</div>
</div>
<!-- Files -->
<div class="api-section" id="files">
<h2>Files</h2>
<p class="section-desc">Upload and manage files that the agent can read, search, and reference. Files can be attached to a project or to individual conversations.</p>
<p class="schema-label">File object</p>
<div class="code-block" style="margin-bottom:24px">
<div class="code-header"><span class="code-lang">json</span></div>
<pre>{
<span class="hl">"id"</span>: <span class="st">"file_abc123"</span>,
<span class="hl">"name"</span>: <span class="st">"Q2-report.pdf"</span>,
<span class="hl">"mime_type"</span>: <span class="st">"application/pdf"</span>,
<span class="hl">"size"</span>: <span class="st">204800</span>, <span class="cm">// bytes</span>
<span class="hl">"project_id"</span>: <span class="st">"proj_xyz"</span>, <span class="cm">// null if conversation-scoped only</span>
<span class="hl">"conversation_id"</span>: <span class="st">null</span>, <span class="cm">// null if project-scoped only</span>
<span class="hl">"created_at"</span>: <span class="st">"2026-06-11T10:00:00Z"</span>
}</pre>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method get">GET</span>
<span class="endpoint-path">/files</span>
<span class="endpoint-desc">List files</span>
</div>
<div class="endpoint-body">
<p class="schema-label">Query parameters</p>
<table class="params-table">
<tr><td class="p-name">project_id</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc">Filter to a project.</td></tr>
<tr><td class="p-name">conversation_id</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc">Filter to a conversation.</td></tr>
</table>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method post">POST</span>
<span class="endpoint-path">/files</span>
<span class="endpoint-desc">Upload a file</span>
</div>
<div class="endpoint-body">
<p>Multipart <code>form-data</code> upload.</p>
<p class="schema-label">Form fields</p>
<table class="params-table">
<tr><td class="p-name">file</td><td class="p-type">file</td><td class="p-req req">required</td><td class="p-desc">The file binary. Accepted: PDF, DOCX, XLSX, CSV, TXT, PNG, JPG, and more.</td></tr>
<tr><td class="p-name">project_id</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc">Attach to a project.</td></tr>
<tr><td class="p-name">conversation_id</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc">Attach to a conversation. Can be set alongside <code>project_id</code>.</td></tr>
</table>
<div class="code-block">
<div class="code-header"><span class="code-lang">curl</span></div>
<pre><span class="hl">curl</span> -X POST http://localhost:26866/api/v1/files \
-F <span class="st">"file=@Q2-report.pdf"</span> \
-F <span class="st">"project_id=proj_xyz"</span></pre>
</div>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method delete">DELETE</span>
<span class="endpoint-path">/files/{id}</span>
<span class="endpoint-desc">Delete a file</span>
</div>
</div>
</div>
<!-- Connectors -->
<div class="api-section" id="connectors">
<h2>Connectors</h2>
<p class="section-desc">Integrate external data sources. Connectors exist independently of any project but can be referenced inside any project. They are defined by <strong>specs</strong> (the connector type, e.g. PostgreSQL, Snowflake, Google Sheets) and instantiated as <strong>connections</strong> with encrypted credentials. Credentials are write-only — never returned after creation.</p>
<p class="schema-label">ConnectorSpec object</p>
<div class="code-block" style="margin-bottom:24px">
<div class="code-header"><span class="code-lang">json</span></div>
<pre>{
<span class="hl">"id"</span>: <span class="st">"postgres"</span>,
<span class="hl">"name"</span>: <span class="st">"PostgreSQL"</span>,
<span class="hl">"description"</span>: <span class="st">"Connect to any PostgreSQL-compatible database."</span>,
<span class="hl">"auth_type"</span>: <span class="st">"credentials"</span>, <span class="cm">// "credentials" | "oauth2"</span>
<span class="hl">"fields"</span>: [ <span class="cm">// credential fields required at connection time</span>
{ <span class="hl">"key"</span>: <span class="st">"host"</span>, <span class="hl">"label"</span>: <span class="st">"Host"</span>, <span class="hl">"secret"</span>: <span class="st">false</span> },
{ <span class="hl">"key"</span>: <span class="st">"port"</span>, <span class="hl">"label"</span>: <span class="st">"Port"</span>, <span class="hl">"secret"</span>: <span class="st">false</span> },
{ <span class="hl">"key"</span>: <span class="st">"database"</span>, <span class="hl">"label"</span>: <span class="st">"Database"</span>, <span class="hl">"secret"</span>: <span class="st">false</span> },
{ <span class="hl">"key"</span>: <span class="st">"user"</span>, <span class="hl">"label"</span>: <span class="st">"User"</span>, <span class="hl">"secret"</span>: <span class="st">false</span> },
{ <span class="hl">"key"</span>: <span class="st">"password"</span>, <span class="hl">"label"</span>: <span class="st">"Password"</span>, <span class="hl">"secret"</span>: <span class="st">true</span> }
]
}</pre>
</div>
<p class="schema-label">Connection object</p>
<div class="code-block" style="margin-bottom:24px">
<div class="code-header"><span class="code-lang">json</span></div>
<pre>{
<span class="hl">"id"</span>: <span class="st">"conn_abc123"</span>,
<span class="hl">"spec_id"</span>: <span class="st">"postgres"</span>, <span class="cm">// which ConnectorSpec this uses</span>
<span class="hl">"name"</span>: <span class="st">"prod-db"</span>,
<span class="hl">"status"</span>: <span class="st">"connected"</span>, <span class="cm">// "connected" | "error" | "pending"</span>
<span class="hl">"created_at"</span>: <span class="st">"2026-06-11T10:00:00Z"</span>
<span class="cm">// credentials are never returned</span>
}</pre>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method get">GET</span>
<span class="endpoint-path">/connectors/specs</span>
<span class="endpoint-desc">List available connector specs</span>
</div>
<div class="endpoint-body">
<div class="code-block">
<div class="code-header"><span class="code-lang">curl</span></div>
<pre><span class="hl">curl</span> <span class="st">"http://localhost:26866/api/v1/connectors/specs"</span></pre>
</div>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method get">GET</span>
<span class="endpoint-path">/connectors/connections</span>
<span class="endpoint-desc">List active connections</span>
</div>
<div class="endpoint-body">
<p class="schema-label">Query parameters</p>
<table class="params-table">
<tr><td class="p-name">spec_id</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc">Filter by connector type (e.g. <code>postgres</code>).</td></tr>
</table>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method post">POST</span>
<span class="endpoint-path">/connectors/connections</span>
<span class="endpoint-desc">Create a connection</span>
</div>
<div class="endpoint-body">
<p class="schema-label">Body</p>
<table class="params-table">
<tr><td class="p-name">spec_id</td><td class="p-type">string</td><td class="p-req req">required</td><td class="p-desc">The connector spec to use (e.g. <code>"postgres"</code>).</td></tr>
<tr><td class="p-name">name</td><td class="p-type">string</td><td class="p-req req">required</td><td class="p-desc">Human-readable label for this connection.</td></tr>
<tr><td class="p-name">credentials</td><td class="p-type">object</td><td class="p-req req">required</td><td class="p-desc">Key-value map of credential fields defined by the spec. Secret fields are encrypted at rest and never returned.</td></tr>
</table>
<div class="code-block">
<div class="code-header"><span class="code-lang">curl</span></div>
<pre><span class="hl">curl</span> -X POST <span class="st">"http://localhost:26866/api/v1/connectors/connections"</span> \
-H <span class="st">"Content-Type: application/json"</span> \
-d <span class="st">'{
"spec_id": "postgres",
"name": "prod-db",
"credentials": {
"host": "db.example.com",
"port": 5432,
"database": "analytics",
"user": "reader",
"password": "s3cr3t"
}
}'</span></pre>
</div>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method delete">DELETE</span>
<span class="endpoint-path">/connectors/connections/{id}</span>
<span class="endpoint-desc">Remove a connection</span>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method get">GET</span>
<span class="endpoint-path">/connectors/oauth/{spec}/start</span>
<span class="endpoint-desc">Start OAuth 2.0 flow</span>
</div>
<div class="endpoint-body">
<p>Returns a redirect URL. Send the user's browser there; after authorization the platform receives the callback and stores the token automatically.</p>
<p class="schema-label">Path parameter</p>
<table class="params-table">
<tr><td class="p-name">spec</td><td class="p-type">string</td><td class="p-req req">required</td><td class="p-desc">The connector spec ID (e.g. <code>google-sheets</code>, <code>notion</code>).</td></tr>
</table>
</div>
</div>
</div>
<!-- Memories -->
<div class="api-section" id="memories">
<h2>Memories</h2>
<p class="section-desc">Persistent facts and context the agent retains across conversations. Memories can be <strong>global</strong> (shared across all projects and conversations) or <strong>project-scoped</strong> — omit <code>project_id</code> to create a global memory. The agent automatically surfaces relevant memories as context at the start of each conversation.</p>
<p class="schema-label">Memory object</p>
<div class="code-block" style="margin-bottom:24px">
<div class="code-header"><span class="code-lang">json</span></div>
<pre>{
<span class="hl">"id"</span>: <span class="st">"mem_abc123"</span>,
<span class="hl">"content"</span>: <span class="st">"Prefers executive summaries under 200 words."</span>,
<span class="hl">"project_id"</span>: <span class="st">null</span>, <span class="cm">// null = global; string = project-scoped</span>
<span class="hl">"source"</span>: <span class="st">"user"</span>, <span class="cm">// "user" | "agent" — who created it</span>
<span class="hl">"created_at"</span>: <span class="st">"2026-06-11T10:00:00Z"</span>,
<span class="hl">"updated_at"</span>: <span class="st">"2026-06-11T10:00:00Z"</span>
}</pre>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method get">GET</span>
<span class="endpoint-path">/memories</span>
<span class="endpoint-desc">List memories</span>
</div>
<div class="endpoint-body">
<p class="schema-label">Query parameters</p>
<table class="params-table">
<tr><td class="p-name">project_id</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc">Return memories scoped to this project. Omit to return global memories.</td></tr>
<tr><td class="p-name">source</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc">Filter by who created it: <code>user</code> or <code>agent</code>.</td></tr>
</table>
<div class="code-block">
<div class="code-header"><span class="code-lang">curl</span></div>
<pre><span class="hl">curl</span> <span class="st">"http://localhost:26866/api/v1/memories"</span> <span class="cm"># global</span>
<span class="hl">curl</span> <span class="st">"http://localhost:26866/api/v1/memories?project_id=..."</span> <span class="cm"># project-scoped</span></pre>
</div>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method post">POST</span>
<span class="endpoint-path">/memories</span>
<span class="endpoint-desc">Create a memory</span>
</div>
<div class="endpoint-body">
<p class="schema-label">Body</p>
<table class="params-table">
<tr><td class="p-name">content</td><td class="p-type">string</td><td class="p-req req">required</td><td class="p-desc">The fact or preference to remember. Plain text.</td></tr>
<tr><td class="p-name">project_id</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc">Scope to a project. Omit for a global memory.</td></tr>
</table>
<div class="code-block">
<div class="code-header"><span class="code-lang">curl</span></div>
<pre><span class="hl">curl</span> -X POST <span class="st">"http://localhost:26866/api/v1/memories"</span> \
-H <span class="st">"Content-Type: application/json"</span> \
-d <span class="st">'{"content": "Always use Q3 targets as the baseline.", "project_id": "proj_xyz"}'</span></pre>
</div>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method patch">PATCH</span>
<span class="endpoint-path">/memories/{id}</span>
<span class="endpoint-desc">Update a memory</span>
</div>
<div class="endpoint-body">
<p class="schema-label">Body</p>
<table class="params-table">
<tr><td class="p-name">content</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc">Updated text for the memory.</td></tr>
</table>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method delete">DELETE</span>
<span class="endpoint-path">/memories/{id}</span>
<span class="endpoint-desc">Delete a memory</span>
</div>
</div>
</div>
<div class="api-section" id="skills">
<h2>Skills</h2>
<p class="section-desc">Reusable capabilities available globally across all projects — custom instructions, tools, or prompt templates the agent can invoke. Skills extend what the agent knows how to do without re-explaining it each time. Like Connectors, they exist independently of any single project.</p>
<p class="schema-label">Skill object</p>
<div class="code-block" style="margin-bottom:24px">
<div class="code-header"><span class="code-lang">json</span></div>
<pre>{
<span class="hl">"id"</span>: <span class="st">"skill_abc123"</span>,
<span class="hl">"name"</span>: <span class="st">"weekly-report"</span>,
<span class="hl">"description"</span>: <span class="st">"Generates a weekly performance report from connected data sources."</span>,
<span class="hl">"instructions"</span>: <span class="st">"Always include a one-paragraph executive summary first. Use bullet points for metrics..."</span>,
<span class="hl">"tools"</span>: [ <span class="cm">// external tool integrations this skill may invoke</span>
<span class="st">"sql_query"</span>,
<span class="st">"send_email"</span>
],
<span class="hl">"created_at"</span>: <span class="st">"2026-06-11T10:00:00Z"</span>,
<span class="hl">"updated_at"</span>: <span class="st">"2026-06-11T10:00:00Z"</span>
}</pre>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method get">GET</span>
<span class="endpoint-path">/skills</span>
<span class="endpoint-desc">List all skills</span>
</div>
<div class="endpoint-body">
<div class="code-block">
<div class="code-header"><span class="code-lang">curl</span></div>
<pre><span class="hl">curl</span> <span class="st">"http://localhost:26866/api/v1/skills"</span></pre>
</div>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method post">POST</span>
<span class="endpoint-path">/skills</span>
<span class="endpoint-desc">Register a skill</span>
</div>
<div class="endpoint-body">
<p class="schema-label">Body</p>
<table class="params-table">
<tr><td class="p-name">name</td><td class="p-type">string</td><td class="p-req req">required</td><td class="p-desc">Kebab-case identifier. Used to invoke the skill from a conversation.</td></tr>
<tr><td class="p-name">description</td><td class="p-type">string</td><td class="p-req req">required</td><td class="p-desc">Short summary of what this skill does. Shown in the UI and used by the agent to decide whether to invoke it.</td></tr>
<tr><td class="p-name">instructions</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc">Detailed prompt injected whenever this skill is active. Explains how to carry out the task, preferred format, constraints, etc.</td></tr>
<tr><td class="p-name">tools</td><td class="p-type">string[]</td><td class="p-req opt">optional</td><td class="p-desc">List of tool identifiers the agent may call when running this skill (e.g. <code>"sql_query"</code>, <code>"send_email"</code>).</td></tr>
</table>
<div class="code-block">
<div class="code-header"><span class="code-lang">curl</span></div>
<pre><span class="hl">curl</span> -X POST <span class="st">"http://localhost:26866/api/v1/skills"</span> \
-H <span class="st">"Content-Type: application/json"</span> \
-d <span class="st">'{
"name": "weekly-report",
"description": "Generates a weekly performance report.",
"instructions": "Always start with an executive summary. Limit to 3 charts.",
"tools": ["sql_query", "send_email"]
}'</span></pre>
</div>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method patch">PATCH</span>
<span class="endpoint-path">/skills/{id}</span>
<span class="endpoint-desc">Update a skill</span>
</div>
<div class="endpoint-body">
<p class="schema-label">Body</p>
<table class="params-table">
<tr><td class="p-name">name</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc">New identifier.</td></tr>
<tr><td class="p-name">description</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc">Updated summary.</td></tr>
<tr><td class="p-name">instructions</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc">Revised prompt instructions.</td></tr>
<tr><td class="p-name">tools</td><td class="p-type">string[]</td><td class="p-req opt">optional</td><td class="p-desc">Replace the full list of allowed tools.</td></tr>
</table>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method delete">DELETE</span>
<span class="endpoint-path">/skills/{id}</span>
<span class="endpoint-desc">Delete a skill</span>
</div>
</div>
</div>
<div class="api-section" id="scratchpads">
<h2>Scratchpads</h2>
<p class="section-desc">Notebook-style workspaces scoped to a conversation. A scratchpad is made up of ordered <strong>cells</strong> — the agent writes to cells as it reasons, drafts, and executes code. Each cell has a type (<code>markdown</code>, <code>code</code>, or <code>output</code>) and tracks its own execution state. Scratchpads persist for the lifetime of the conversation and can be promoted to an Artifact.</p>
<h2 style="font-size:14px;font-weight:600;color:var(--ink-3);border:none;margin:0 0 16px;padding:0;letter-spacing:0.04em;">Scratchpad object</h2>
<div class="code-block" style="margin-bottom:32px">
<div class="code-header"><span class="code-lang">json</span></div>
<pre>{
<span class="hl">"id"</span>: <span class="st">"sp_abc123"</span>,
<span class="hl">"conversation_id"</span>: <span class="st">"conv_xyz"</span>,
<span class="hl">"title"</span>: <span class="st">"Sales analysis draft"</span>,
<span class="hl">"cells"</span>: <span class="cm">[ /* ordered array of Cell objects */</span> ],
<span class="hl">"saved"</span>: <span class="st">false</span>, <span class="cm">// true once promoted / pinned</span>
<span class="hl">"created_at"</span>: <span class="st">"2026-06-11T10:00:00Z"</span>,
<span class="hl">"updated_at"</span>: <span class="st">"2026-06-11T10:04:12Z"</span>
}</pre>
</div>
<h2 style="font-size:14px;font-weight:600;color:var(--ink-3);border:none;margin:0 0 16px;padding:0;letter-spacing:0.04em;">Cell object</h2>
<div class="code-block" style="margin-bottom:8px">
<div class="code-header"><span class="code-lang">json</span></div>
<pre>{
<span class="hl">"id"</span>: <span class="st">"cell_001"</span>,
<span class="hl">"type"</span>: <span class="st">"code"</span>, <span class="cm">// "markdown" | "code" | "output"</span>
<span class="hl">"content"</span>: <span class="st">"df.describe()"</span>,
<span class="hl">"language"</span>: <span class="st">"python"</span>, <span class="cm">// present when type = "code"</span>
<span class="hl">"status"</span>: <span class="st">"success"</span>, <span class="cm">// "pending" | "running" | "success" | "error"</span>
<span class="hl">"outputs"</span>: [ <span class="cm">// present when type = "output"</span>
{
<span class="hl">"mime"</span>: <span class="st">"text/plain"</span>,
<span class="hl">"data"</span>: <span class="st">"count 12.0\nmean 4.2\n..."</span>
},
{
<span class="hl">"mime"</span>: <span class="st">"image/png"</span>,
<span class="hl">"data"</span>: <span class="st">"data:image/png;base64,..."</span>
}
],
<span class="hl">"error"</span>: <span class="st">null</span>, <span class="cm">// error message when status = "error"</span>
<span class="hl">"index"</span>: <span class="st">0</span> <span class="cm">// display order within the scratchpad</span>
}</pre>
</div>
<p class="section-desc" style="margin-bottom:32px;font-size:12.5px">
<strong>type</strong><code>markdown</code> cells are prose written by the agent; <code>code</code> cells are executable snippets; <code>output</code> cells are the results attached to the preceding code cell (stdout, images, tables).<br>
<strong>status</strong> — only relevant on <code>code</code> cells. <code>pending</code> means queued, <code>running</code> means currently executing, <code>success</code>/<code>error</code> are terminal states.<br>
<strong>outputs</strong> — multi-modal: a single code cell can produce several output objects with different MIME types (plain text, HTML, PNG charts, JSON).
</p>
<div class="endpoint">
<div class="endpoint-header">
<span class="method get">GET</span>
<span class="endpoint-path">/scratchpads</span>
<span class="endpoint-desc">List scratchpads for a conversation</span>
</div>
<div class="endpoint-body">
<div class="code-block">
<div class="code-header"><span class="code-lang">curl</span></div>
<pre><span class="hl">curl</span> <span class="st">"http://localhost:26866/api/v1/scratchpads?conversation_id=..."</span></pre>
</div>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method post">POST</span>
<span class="endpoint-path">/scratchpads</span>
<span class="endpoint-desc">Create a scratchpad</span>
</div>
<div class="endpoint-body">
<div class="code-block">
<div class="code-header"><span class="code-lang">curl</span></div>
<pre><span class="hl">curl</span> -X POST <span class="st">"http://localhost:26866/api/v1/scratchpads"</span> \
-H <span class="st">"Content-Type: application/json"</span> \
-d <span class="st">'{"conversation_id":"...","title":"Sales analysis draft","cells":[]}'</span></pre>
</div>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method get">GET</span>
<span class="endpoint-path">/scratchpads/{scratchpad_id}</span>
<span class="endpoint-desc">Get a scratchpad with all cells</span>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method patch">PATCH</span>
<span class="endpoint-path">/scratchpads/{scratchpad_id}</span>
<span class="endpoint-desc">Update title or save state</span>
</div>
<div class="endpoint-body">
<div class="code-block">
<div class="code-header"><span class="code-lang">curl</span></div>
<pre><span class="hl">curl</span> -X PATCH <span class="st">"http://localhost:26866/api/v1/scratchpads/{scratchpad_id}"</span> \
-H <span class="st">"Content-Type: application/json"</span> \
-d <span class="st">'{"title":"Final analysis","saved":true}'</span></pre>
</div>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method delete">DELETE</span>
<span class="endpoint-path">/scratchpads/{scratchpad_id}</span>
<span class="endpoint-desc">Delete a scratchpad and all its cells</span>
</div>
</div>
<h2 style="font-size:16px;font-weight:600;color:var(--ink);border-bottom:1px solid var(--line);margin:32px 0 16px;padding-bottom:10px;">Cells</h2>
<p class="section-desc">Cells are managed individually so the agent can append, edit, or re-run a single cell without replacing the whole scratchpad.</p>
<div class="endpoint">
<div class="endpoint-header">
<span class="method post">POST</span>
<span class="endpoint-path">/scratchpads/{scratchpad_id}/cells</span>
<span class="endpoint-desc">Append a cell</span>
</div>
<div class="endpoint-body">
<div class="code-block">
<div class="code-header"><span class="code-lang">curl</span></div>
<pre><span class="hl">curl</span> -X POST <span class="st">"http://localhost:26866/api/v1/scratchpads/{scratchpad_id}/cells"</span> \
-H <span class="st">"Content-Type: application/json"</span> \
-d <span class="st">'{"type":"code","language":"python","content":"df.head()"}'</span></pre>
</div>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method patch">PATCH</span>
<span class="endpoint-path">/scratchpads/{scratchpad_id}/cells/{cell_id}</span>
<span class="endpoint-desc">Edit a cell's content or index</span>
</div>
<div class="endpoint-body">
<div class="code-block">
<div class="code-header"><span class="code-lang">curl</span></div>
<pre><span class="hl">curl</span> -X PATCH <span class="st">"http://localhost:26866/api/v1/scratchpads/{scratchpad_id}/cells/{cell_id}"</span> \
-H <span class="st">"Content-Type: application/json"</span> \
-d <span class="st">'{"content":"df.tail(10)","index":2}'</span></pre>
</div>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method post">POST</span>
<span class="endpoint-path">/scratchpads/{scratchpad_id}/cells/{cell_id}/run</span>
<span class="endpoint-desc">Execute a code cell</span>
</div>
<div class="endpoint-body">
<p>Runs the cell and streams output back as server-sent events. Each event carries a partial output object. Terminal event has <code>status: "success"</code> or <code>status: "error"</code>.</p>
<div class="code-block">
<div class="code-header"><span class="code-lang">curl</span></div>
<pre><span class="hl">curl</span> -X POST <span class="st">"http://localhost:26866/api/v1/scratchpads/{scratchpad_id}/cells/{cell_id}/run"</span></pre>
</div>
</div>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method delete">DELETE</span>
<span class="endpoint-path">/scratchpads/{scratchpad_id}/cells/{cell_id}</span>
<span class="endpoint-desc">Delete a cell</span>
</div>
</div>
</div>
<div class="api-section" id="search">
<h2>Search</h2>
<p class="section-desc">Full-text and semantic search across conversations, artifacts, files, and memories. Returns ranked results with the matching resource type and a short excerpt.</p>
<p class="schema-label">SearchResult object</p>
<div class="code-block" style="margin-bottom:24px">
<div class="code-header"><span class="code-lang">json</span></div>
<pre>{
<span class="hl">"type"</span>: <span class="st">"conversation"</span>, <span class="cm">// "conversation" | "artifact" | "file" | "memory"</span>
<span class="hl">"id"</span>: <span class="st">"conv_abc123"</span>,
<span class="hl">"title"</span>: <span class="st">"Sales forecast Q3"</span>,
<span class="hl">"excerpt"</span>: <span class="st">"...the Q3 sales forecast shows a 12% increase over..."</span>,
<span class="hl">"score"</span>: <span class="st">0.93</span>, <span class="cm">// relevance score 01</span>
<span class="hl">"project_id"</span>: <span class="st">"proj_xyz"</span> <span class="cm">// null for global results</span>
}</pre>
</div>
<div class="endpoint">
<div class="endpoint-header">
<span class="method get">GET</span>
<span class="endpoint-path">/search</span>
<span class="endpoint-desc">Search across the workspace</span>
</div>
<div class="endpoint-body">
<p class="schema-label">Query parameters</p>
<table class="params-table">
<tr><td class="p-name">q</td><td class="p-type">string</td><td class="p-req req">required</td><td class="p-desc">The search query. Supports natural language and keyword matching.</td></tr>
<tr><td class="p-name">project_id</td><td class="p-type">string</td><td class="p-req opt">optional</td><td class="p-desc">Limit results to a single project.</td></tr>
<tr><td class="p-name">types</td><td class="p-type">string[]</td><td class="p-req opt">optional</td><td class="p-desc">Comma-separated list of resource types to include: <code>conversation</code>, <code>artifact</code>, <code>file</code>, <code>memory</code>. Defaults to all.</td></tr>
<tr><td class="p-name">limit</td><td class="p-type">integer</td><td class="p-req opt">optional</td><td class="p-desc">Maximum results to return. Defaults to <code>20</code>, max <code>100</code>.</td></tr>
</table>
<div class="code-block">
<div class="code-header"><span class="code-lang">curl</span></div>
<pre><span class="hl">curl</span> <span class="st">"http://localhost:26866/api/v1/search?q=sales+forecast&project_id=proj_xyz&types=conversation,file&limit=10"</span></pre>
</div>
<p class="schema-label">Response</p>
<div class="code-block">
<div class="code-header"><span class="code-lang">json</span></div>
<pre>{
<span class="hl">"results"</span>: [
{
<span class="hl">"type"</span>: <span class="st">"conversation"</span>,
<span class="hl">"id"</span>: <span class="st">"conv_abc123"</span>,
<span class="hl">"title"</span>: <span class="st">"Sales forecast Q3"</span>,
<span class="hl">"excerpt"</span>: <span class="st">"...the Q3 sales forecast shows a 12% increase over..."</span>,
<span class="hl">"score"</span>: <span class="st">0.93</span>,
<span class="hl">"project_id"</span>: <span class="st">"proj_xyz"</span>
}
],
<span class="hl">"total"</span>: 1
}</pre>
</div>
</div>
</div>
</div>
</main>
</div>
<footer>
Minds Platform · Open Source · <a href="https://github.com/mindsdb/minds-platform">github.com/mindsdb/minds-platform</a>
</footer>
<script>
document.querySelector('.hamburger').addEventListener('click', function() {
const nav = this.closest('nav');
nav.toggleAttribute('data-open');
});
document.querySelectorAll('.nav-links a').forEach(function(a) {
a.addEventListener('click', function() {
document.querySelector('nav').removeAttribute('data-open');
});
});
// Scroll spy
var sidebarLinks = Array.from(document.querySelectorAll('.sidebar a[href^="#"]'));
var sections = sidebarLinks.map(function(a) {
return document.querySelector(a.getAttribute('href'));
}).filter(Boolean);
function onScroll() {
var scrollY = window.scrollY + 100;
var active = sections[0];
sections.forEach(function(s) {
if (s.getBoundingClientRect().top + window.scrollY <= scrollY) active = s;
});
sidebarLinks.forEach(function(a) {
a.classList.toggle('active', a.getAttribute('href') === '#' + active.id);
});
}
window.addEventListener('scroll', onScroll, { passive: true });
onScroll();
</script>
</body>
</html>