API Reference
Auth, Chat, Agents, Flows, MCP endpoints
Base URL
All API requests go to the OSF Gateway:
https://api.openshopfloor.zeroguess.ai
Authorization header: Bearer <token>Authentication
/auth/registerCreate a new account
{ "email": "[email protected]", "password": "..." , "name": "..." }{ "token": "eyJ...", "user": { "id": "...", "email": "...", "name": "..." } }/auth/loginSign in and get a JWT token
{ "email": "[email protected]", "password": "..." }{ "token": "eyJ...", "user": { "id": "...", "email": "...", "name": "..." } }/auth/meAuthGet current user profile
{ "id": "...", "email": "...", "name": "...", "role": "user" }Chat
/chatAuthSend a message to the AI assistant. Response is streamed via SSE. The assistant can call MCP tools to answer factory-related questions.
{ "message": "What's the current OEE?", "conversationId": "optional-id" }SSE stream: data: { "type": "text|tool_call|tool_result", ... }/chat/conversationsAuthList all conversations for the current user
[{ "id": "...", "title": "...", "updatedAt": "..." }]/chat/conversations/:idAuthGet a specific conversation with message history
/chat/conversations/:idAuthDelete a conversation
Agents
/agentsAuthList all available agents (built-in + community)
[{ "id": "...", "name": "...", "description": "...", "icon": "...", "type": "builtin|community" }]/agents/:id/runAuthExecute an agent. Response is streamed via SSE.
SSE stream: data: { "type": "log|result|error", ... }/agents/:id/runsAuthList past runs for an agent
Code Agents
/code-agentsAuthDeploy a new code agent from a GitHub repository
{ "repoFullName": "user/repo", "branch": "main" }/code-agentsAuthList all deployed code agents for the current user
/code-agents/:id/syncAuthManually trigger a re-sync from the GitHub repository
/code-agents/:idAuthRemove a deployed code agent
Flows
/flowsAuthList all saved flows for the current user
[{ "id": "...", "name": "...", "description": "...", "nodeCount": 5 }]/flowsAuthSave a new flow from the Node-RED editor
{ "name": "...", "description": "...", "nodes": [...], "wires": [...] }/flows/:id/runAuthExecute a saved flow. Response is streamed via SSE.
SSE stream: data: { "nodeId": "...", "type": "start|result|error", ... }/flows/:idAuthDelete a saved flow
MCP Proxy
/mcpAuthCall any MCP tool through the gateway proxy. The gateway routes to the correct MCP server based on the tool name prefix.
{ "tool": "factory_get_latest_oee", "args": {} }{ "result": { ... } }/mcp/toolsAuthList all available MCP tools across all servers
[{ "name": "...", "description": "...", "parameters": {...} }]factory_ / tms_ / sgm_ / montage_ to Factory Sim, uns_ to UNS, kg_ to Knowledge Graph, history_ to Historian.GitHub Integration
/auth/githubStart GitHub OAuth flow for connecting a GitHub account
/auth/github/reposAuthList repositories for the connected GitHub account
/auth/github/webhookWebhook endpoint for GitHub push events (auto-sync)