{ "openapi": "3.1.0", "info": { "title": "Agentic AI Hub — Feature 006 API", "version": "2.0.0", "description": "Hub Backend API including all Feature 004 endpoints plus new Feature 006 true-agentic endpoints." }, "servers": [{ "url": "http://localhost:5000" }], "paths": { "/api/chat": { "post": { "summary": "Send a chat message (extended with thread_id)", "tags": ["Chat"], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["message"], "properties": { "message": { "type": "string", "minLength": 1, "maxLength": 4000 }, "thread_id": { "type": ["string","null"], "format": "uuid", "description": "Omit to start a new conversation." } } } } } }, "responses": { "200": { "description": "SSE stream of graph execution events", "content": { "text/event-stream": {} } } } } }, "/api/chat/{thread_id}/resume": { "post": { "summary": "Resume graph paused at a write-approval interrupt", "tags": ["Chat"], "parameters": [ { "name": "thread_id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["decision","checkpoint_id"], "properties": { "decision": { "type": "string", "enum": ["approve","reject","modify"] }, "checkpoint_id": { "type": "string", "description": "Must match latest checkpoint to prevent stale double-approval." }, "args": { "type": ["object","null"], "description": "Required when decision=modify." }, "reason": { "type": ["string","null"] } } } } } }, "responses": { "200": { "description": "Graph resumed, returns SSE stream" }, "409": { "description": "checkpoint_stale — another tab already resolved this approval" } } } }, "/api/conversations": { "get": { "summary": "List active conversation threads", "tags": ["Conversations"], "parameters": [ { "name": "limit", "in": "query", "schema": { "type": "integer", "default": 20 } }, { "name": "offset", "in": "query", "schema": { "type": "integer", "default": 0 } } ], "responses": { "200": { "description": "List of conversation threads", "content": { "application/json": { "schema": { "type": "object", "properties": { "conversations": { "type": "array" }, "total": { "type": "integer" } } } } } } } } }, "/api/conversations/{thread_id}": { "get": { "summary": "Get full turn history for a conversation", "tags": ["Conversations"], "parameters": [ { "name": "thread_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Full turn history" }, "404": { "description": "Thread not found" } } }, "delete": { "summary": "Delete a conversation and all its checkpoints", "tags": ["Conversations"], "parameters": [ { "name": "thread_id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "Thread deleted" }, "404": { "description": "Thread not found" } } } }, "/api/health": { "get": { "summary": "Hub health including MCP servers and checkpointer", "tags": ["Health"], "responses": { "200": { "description": "Health status", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "enum": ["ok","degraded","down"] }, "mcp_servers": { "type": "object" }, "total_tools_available": { "type": "integer" }, "total_tools_expected": { "type": "integer" }, "checkpointer": { "type": "object", "properties": { "connected": { "type": "boolean" } } } } } } } } } } } } }