Setup
Edit
.env with your preferred configuration. See Setup Configuration guides for all available options.Deployment Methods
- Docker
- Python (Local)
Start Server
Access API
- API: http://localhost:8000
- Documentation: http://localhost:8000/docs
Authentication
IfREQUIRE_AUTHENTICATION=true in your .env file:
- Register:
POST /api/v1/auth/register - Login:
POST /api/v1/auth/login - Use token: Include
Authorization: Bearer <token>header or use cookies
Python SDK Client
After deploying the server, connect the Python SDK to your running instance usingcognee.serve():
serve():
CloudClient returned by serve() exposes four methods that map to the server’s V2 endpoints: remember() (ingest + cognify), recall() (search), improve() (enrich graph), and forget() (delete). Call await cognee.disconnect() to revert to local mode.
HTTP API Examples
Authentication
Authentication
Register a user:Login and get token:
Dataset Management
Dataset Management
Create a dataset:List datasets:
Data Operations
Data Operations
Add data (upload file):Build knowledge graph:Search data:
Multi-tenant Operations
Multi-tenant Operations
Create tenant:Add user to tenant:Create role:Assign user to role:Grant dataset permissions:
API Reference
Explore all API endpoints
Setup Configuration
Configure providers and databases
MCP Integration
Set up AI assistant integration