openapi: 3.1.0 info: # Do not change the title, if the title changes, the import paths will be broken title: Api version: 0.1.0 description: Gruve AI Vibe Platform API servers: - url: /api description: Base API path tags: - name: health description: Health operations - name: dashboard description: Dashboard metrics and summaries - name: projects description: AI prototype project management - name: chat description: LLM-powered chat sessions - name: documents description: Knowledge base document management - name: workflows description: Agentic workflow management paths: /healthz: get: operationId: healthCheck tags: [health] summary: Health check responses: "200": description: Healthy content: application/json: schema: $ref: "#/components/schemas/HealthStatus" /dashboard/metrics: get: operationId: getDashboardMetrics tags: [dashboard] summary: Get dashboard overview metrics responses: "200": description: Dashboard metrics content: application/json: schema: $ref: "#/components/schemas/DashboardMetrics" /dashboard/activity: get: operationId: getDashboardActivity tags: [dashboard] summary: Get recent activity feed responses: "200": description: Recent activity items content: application/json: schema: type: array items: $ref: "#/components/schemas/ActivityItem" /projects: get: operationId: listProjects tags: [projects] summary: List all projects parameters: - name: status in: query schema: type: string enum: [draft, in_progress, completed, archived] - name: domain in: query schema: type: string responses: "200": description: List of projects content: application/json: schema: type: array items: $ref: "#/components/schemas/Project" post: operationId: createProject tags: [projects] summary: Create a new project requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ProjectInput" responses: "201": description: Created project content: application/json: schema: $ref: "#/components/schemas/Project" /projects/{id}: get: operationId: getProject tags: [projects] summary: Get a project by ID parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Project details content: application/json: schema: $ref: "#/components/schemas/Project" "404": description: Not found content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" patch: operationId: updateProject tags: [projects] summary: Update a project parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ProjectUpdate" responses: "200": description: Updated project content: application/json: schema: $ref: "#/components/schemas/Project" delete: operationId: deleteProject tags: [projects] summary: Delete a project parameters: - name: id in: path required: true schema: type: integer responses: "204": description: Deleted /projects/stats/by-domain: get: operationId: getProjectStatsByDomain tags: [projects] summary: Get project counts grouped by domain responses: "200": description: Project stats by domain content: application/json: schema: type: array items: $ref: "#/components/schemas/DomainStat" /chat/sessions: get: operationId: listChatSessions tags: [chat] summary: List all chat sessions parameters: - name: projectId in: query schema: type: ["integer", "null"] responses: "200": description: Chat sessions content: application/json: schema: type: array items: $ref: "#/components/schemas/ChatSession" post: operationId: createChatSession tags: [chat] summary: Create a new chat session requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ChatSessionInput" responses: "201": description: Created session content: application/json: schema: $ref: "#/components/schemas/ChatSession" /chat/sessions/{id}: get: operationId: getChatSession tags: [chat] summary: Get a chat session with messages parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Chat session with messages content: application/json: schema: $ref: "#/components/schemas/ChatSessionWithMessages" delete: operationId: deleteChatSession tags: [chat] summary: Delete a chat session parameters: - name: id in: path required: true schema: type: integer responses: "204": description: Deleted /chat/sessions/{id}/messages: post: operationId: sendMessage tags: [chat] summary: Send a message and get an AI response parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/MessageInput" responses: "200": description: AI response message content: application/json: schema: $ref: "#/components/schemas/Message" /documents: get: operationId: listDocuments tags: [documents] summary: List knowledge base documents responses: "200": description: List of documents content: application/json: schema: type: array items: $ref: "#/components/schemas/Document" post: operationId: createDocument tags: [documents] summary: Add a document to the knowledge base requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/DocumentInput" responses: "201": description: Created document content: application/json: schema: $ref: "#/components/schemas/Document" /documents/search: get: operationId: searchDocuments tags: [documents] summary: Search knowledge base documents parameters: - name: q in: query required: true schema: type: string responses: "200": description: Search results content: application/json: schema: type: array items: $ref: "#/components/schemas/DocumentSearchResult" /documents/{id}: get: operationId: getDocument tags: [documents] summary: Get a document by ID parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Document content: application/json: schema: $ref: "#/components/schemas/Document" delete: operationId: deleteDocument tags: [documents] summary: Delete a document parameters: - name: id in: path required: true schema: type: integer responses: "204": description: Deleted /workflows: get: operationId: listWorkflows tags: [workflows] summary: List all agentic workflows responses: "200": description: Workflows list content: application/json: schema: type: array items: $ref: "#/components/schemas/Workflow" post: operationId: createWorkflow tags: [workflows] summary: Create a new workflow requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/WorkflowInput" responses: "201": description: Created workflow content: application/json: schema: $ref: "#/components/schemas/Workflow" /workflows/{id}: get: operationId: getWorkflow tags: [workflows] summary: Get a workflow by ID parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Workflow details content: application/json: schema: $ref: "#/components/schemas/Workflow" patch: operationId: updateWorkflow tags: [workflows] summary: Update a workflow parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/WorkflowUpdate" responses: "200": description: Updated workflow content: application/json: schema: $ref: "#/components/schemas/Workflow" delete: operationId: deleteWorkflow tags: [workflows] summary: Delete a workflow parameters: - name: id in: path required: true schema: type: integer responses: "204": description: Deleted /workflows/{id}/run: post: operationId: runWorkflow tags: [workflows] summary: Execute a workflow parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Workflow run result content: application/json: schema: $ref: "#/components/schemas/WorkflowRun" /workflows/{id}/runs: get: operationId: listWorkflowRuns tags: [workflows] summary: Get run history for a workflow parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Workflow runs content: application/json: schema: type: array items: $ref: "#/components/schemas/WorkflowRun" components: schemas: HealthStatus: type: object required: [status] properties: status: type: string ErrorResponse: type: object required: [error] properties: error: type: string DashboardMetrics: type: object required: [totalProjects, activeProjects, totalDocuments, totalWorkflows, completedWorkflowRuns, chatSessions, avgVibeScore, domainBreakdown] properties: totalProjects: type: integer activeProjects: type: integer totalDocuments: type: integer totalWorkflows: type: integer completedWorkflowRuns: type: integer chatSessions: type: integer avgVibeScore: type: number domainBreakdown: type: array items: $ref: "#/components/schemas/DomainStat" DomainStat: type: object required: [domain, count] properties: domain: type: string count: type: integer ActivityItem: type: object required: [id, type, description, entityName, createdAt] properties: id: type: string type: type: string enum: [project_created, project_updated, chat_message, document_added, workflow_run] description: type: string entityName: type: string createdAt: type: string format: date-time Project: type: object required: [id, name, description, status, domain, aiTool, vibeScore, stackTags, createdAt, updatedAt] properties: id: type: integer name: type: string description: type: string status: type: string enum: [draft, in_progress, completed, archived] domain: type: string enum: [cybersecurity, customer_experience, cloud_infrastructure, advanced_tech, general] aiTool: type: string enum: [cursor, copilot, windsurf, bolt, v0, replit, claude, custom] vibeScore: type: integer minimum: 0 maximum: 100 stackTags: type: array items: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time ProjectInput: type: object required: [name, description, domain, aiTool] properties: name: type: string minLength: 1 description: type: string status: type: string enum: [draft, in_progress, completed, archived] default: draft domain: type: string enum: [cybersecurity, customer_experience, cloud_infrastructure, advanced_tech, general] aiTool: type: string enum: [cursor, copilot, windsurf, bolt, v0, replit, claude, custom] vibeScore: type: integer minimum: 0 maximum: 100 default: 50 stackTags: type: array items: type: string ProjectUpdate: type: object properties: name: type: string minLength: 1 description: type: string status: type: string enum: [draft, in_progress, completed, archived] domain: type: string enum: [cybersecurity, customer_experience, cloud_infrastructure, advanced_tech, general] aiTool: type: string enum: [cursor, copilot, windsurf, bolt, v0, replit, claude, custom] vibeScore: type: integer minimum: 0 maximum: 100 stackTags: type: array items: type: string ChatSession: type: object required: [id, title, projectId, messageCount, createdAt] properties: id: type: integer title: type: string projectId: type: ["integer", "null"] messageCount: type: integer createdAt: type: string format: date-time ChatSessionInput: type: object required: [title] properties: title: type: string minLength: 1 projectId: type: ["integer", "null"] Message: type: object required: [id, sessionId, role, content, createdAt] properties: id: type: integer sessionId: type: integer role: type: string enum: [user, assistant] content: type: string createdAt: type: string format: date-time ChatSessionWithMessages: type: object required: [id, title, projectId, messages, createdAt] properties: id: type: integer title: type: string projectId: type: ["integer", "null"] messages: type: array items: $ref: "#/components/schemas/Message" createdAt: type: string format: date-time MessageInput: type: object required: [content] properties: content: type: string minLength: 1 Document: type: object required: [id, title, content, status, chunkCount, createdAt] properties: id: type: integer title: type: string content: type: string status: type: string enum: [pending, processed, failed] chunkCount: type: integer tags: type: array items: type: string createdAt: type: string format: date-time DocumentInput: type: object required: [title, content] properties: title: type: string minLength: 1 content: type: string minLength: 1 tags: type: array items: type: string DocumentSearchResult: type: object required: [id, title, excerpt, relevanceScore] properties: id: type: integer title: type: string excerpt: type: string relevanceScore: type: number Workflow: type: object required: [id, name, description, status, steps, runCount, lastRunAt, createdAt] properties: id: type: integer name: type: string description: type: string status: type: string enum: [idle, running, completed, failed] steps: type: array items: $ref: "#/components/schemas/WorkflowStep" runCount: type: integer lastRunAt: type: ["string", "null"] format: date-time createdAt: type: string format: date-time WorkflowStep: type: object required: [id, type, name, prompt] properties: id: type: string type: type: string enum: [llm_prompt, rag_search, code_gen, review, summarize] name: type: string prompt: type: string config: type: object additionalProperties: true WorkflowInput: type: object required: [name, description, steps] properties: name: type: string minLength: 1 description: type: string steps: type: array items: $ref: "#/components/schemas/WorkflowStep" WorkflowUpdate: type: object properties: name: type: string minLength: 1 description: type: string steps: type: array items: $ref: "#/components/schemas/WorkflowStep" WorkflowRun: type: object required: [id, workflowId, status, output, startedAt, completedAt] properties: id: type: integer workflowId: type: integer status: type: string enum: [running, completed, failed] output: type: string stepOutputs: type: array items: $ref: "#/components/schemas/StepOutput" startedAt: type: string format: date-time completedAt: type: ["string", "null"] format: date-time StepOutput: type: object required: [stepId, stepName, output] properties: stepId: type: string stepName: type: string output: type: string