{"openapi":"3.1.0","info":{"title":"Cognition","version":"1.0.0","summary":"Memory and judgment for coding agents.","description":"Sign in at /start, mint a personal cog_ key, then call the product MCP with Authorization: Bearer. The docs MCP at /mcp/docs needs no key. Shell installers are the CLI. Scopes are read and write.","contact":{"email":"jo@lamlab.ai","url":"https://www.lamlab.ai/developers/agents"},"x-cli":{"docs":"https://www.lamlab.ai/cli","install":"curl -fsSL https://www.lamlab.ai/api/install/cursor | COGNITION_KEY=cog_me_xxx bash"}},"servers":[{"url":"https://www.lamlab.ai","description":"Canonical site."},{"url":"https://cognitionus.com","description":"Legacy host. Still answers /api, /mcp, and /install."}],"components":{"securitySchemes":{"cognitionBearer":{"type":"http","scheme":"bearer","bearerFormat":"cog_","description":"Personal key from POST /api/start/mint-key after sign-in at /start. Scopes: read, write. Send Authorization: Bearer cog_..."}},"schemas":{"Error":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"code":{"type":"string"},"hint":{"type":"string"},"docs":{"type":"string"}},"required":["error"]}}},"paths":{"/api/version":{"get":{"operationId":"getVersion","summary":"Deployed commit metadata. No key.","responses":{"200":{"description":"Version payload."},"404":{"description":"JSON error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/mcp/docs":{"get":{"operationId":"describeDocsMcp","summary":"Public docs MCP descriptor, including ui:// resources.","responses":{"200":{"description":"Docs MCP card."}}},"post":{"operationId":"callDocsMcp","summary":"JSON-RPC for the public docs MCP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string","const":"2.0"},"id":{"type":["string","number","null"]},"method":{"type":"string"},"params":{"type":"object"}},"required":["method"]}}}},"responses":{"200":{"description":"JSON-RPC result."},"400":{"description":"JSON error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"JSON error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/mcp":{"post":{"operationId":"callProductMcp","summary":"Product MCP (streamable HTTP). Requires a cog_ key.","security":[{"cognitionBearer":[]}],"responses":{"200":{"description":"JSON-RPC result."},"401":{"description":"JSON error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"JSON error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/install/{host}":{"get":{"operationId":"getInstallScript","summary":"Shell installer for one coding agent.","parameters":[{"name":"host","in":"path","required":true,"schema":{"type":"string","enum":["cursor","codex","gemini"]}}],"responses":{"200":{"description":"Bash script."},"404":{"description":"JSON error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/start/mint-key":{"post":{"operationId":"mintPersonalKey","summary":"Mint a cog_ key for the signed-in person. Browser session required. Not an OAuth token endpoint.","responses":{"200":{"description":"Key minted."},"401":{"description":"JSON error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"JSON error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"mintPersonalKeyHelp","summary":"Explains that minting is POST-only.","responses":{"405":{"description":"JSON error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}