Thread Management
Create Thread
Changed onCreates a new thread row.
WHO ACTUALLY CALLS THIS:
- mcp_server/admin/handlers/assistant.py (the admin MCP server at mcp.every.ai). External AI integrations like Claude.ai and ChatGPT invoke the ask_assistant MCP tool, which POSTs here to seed a thread before streaming agent output.
WHO DOES NOT:
- The web app (every-react) creates threads via a direct Supabase insert in packages/agent-chat/contexts/ThreadContext.tsx — RLS-protected.
- The mobile app (every-mobile-app) does the same in src/stores/threadStore.ts.
storage_mode is always "session"; the threads table column has the same NOT NULL default, so direct Supabase inserts land on the same value.
Idempotency: protected by idempotency_guard so MCP retries don't create duplicate threads. The MCP server doesn't send X-Idempotency-Key today but the guard is in place for future retry logic.
thread_data.metadata (optional) is merged as-is into the threads row's jsonb metadata column — e.g. the MCP handler stamps {"source": "chatgpt"|"claude"|"mcp"} so non-app clients are attributable without inferring it from the hardcoded thread name.
post/api/create-thread
Request
- Base URL: https://api.every.ai (the document declares no server; this is the origin it was published from)
- URL: https://api.every.ai/api/create-thread
- Auth: none declared
Query parameters
user_idstring
org_idstring
Request body
Response
Successful Response
unknown required
Changes
- info
added the new optional request property
- info