cognee-server
Use when the user wants to run the cognee API server (and optional UI) on their own machine — starting it, checking it's healthy, connecting the SDK or other clients to it, and choosing the right auth posture.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-17
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- cognee-server
- description
- Use when the user wants to run the cognee API server (and optional UI) on their own machine — starting it, checking it's healthy, connecting the SDK or other clients to it, and choosing the right auth posture.
03 SKILL.md 正文
Start the cognee server locally
From an installed cognee (no Docker)
cognee-cli -ui
launches the full local stack: FastAPI backend on http://localhost:8000
and the UI on http://localhost:3000. Needs LLM_API_KEY in the
environment or .env. The interactive API reference is at
http://localhost:8000/docs, health at /health.
For API-only serving via Docker instead, use the cognee-docker skill (the
prebuilt cognee/cognee:main image or docker compose up from the repo).
Auth posture
ENABLE_BACKEND_ACCESS_CONTROL decides everything:
true(default): multi-tenant — auth required on every API call, per user+dataset database isolation.false: single-user local mode — no auth, shared local databases. Right choice for a personal dev server; never for anything exposed.
REQUIRE_AUTHENTICATION=false is ignored while access control is on; to turn
auth off you must set ENABLE_BACKEND_ACCESS_CONTROL=false.
Connecting clients to the running server
-
SDK / CLI against the server (instead of embedded local mode):
cognee-cli serve --url http://localhost:8000 # local instance cognee-cli serve # cognee cloud (device flow) cognee-cli serve --logout # disconnectIn Python:
await cognee.serve(url="http://localhost:8000"). -
HTTP: main routes live under
/api/v1/— the memory API isremember(plusremember/entry),recall,improve,forget;sessionscovers session memory;datasets,users,visualizehandle the rest. The legacyadd,cognify,search,memify, anddeleteroutes still exist and are what the memory routes call underneath (seecognee/api/client.pyfor the registered routers, orGET /openapi.jsonon a running server).Note there is no
/api/v1/feedbackroute —feedbackexists as a CLI command and in the SDK, but is not exposed over HTTP.
Graph visualization without the full UI
from cognee.api.v1.visualize import visualization_server
shutdown = visualization_server(port=8080) # synchronous; returns a shutdown callable
Troubleshooting
- Port 8000 already taken → stop the other service or remap (compose:
"8080:8000"). - 401/403 on every call → you're in multi-tenant mode; either authenticate or
set
ENABLE_BACKEND_ACCESS_CONTROL=falseand restart. recall/searchreturns[]instead of erroring → permission-filtered result; check dataset access rights for the calling user.
04 同仓库更多 Skills
skill-feedback-writer
Use to identify missing instructions in another skill based on its output.
pr-comment-evaluator
Use to judge whether a PR review comment sounds polite.
diff-risk-explainer
Use to briefly explain small code diffs.
cognee
Use this skill whenever the user asks about Cognee, AI memory, persistent agent memory, self-improving agents, agents learning from feedback, knowledge graphs, graph-based RAG, long-term memory for agents, short-term memory for agents, personalization, personas, temporal search, temporal knowledge graphs, ontology-based extraction, ontology grounding, feedback, Cypher search, natural-language graph search, chunk search, RAG search, cross-session memory, session feedback, feedback loops, session based memory, redis based memory, knowledge promotion. Also use when the user describes the workflow such as: "turn documents into a knowledge graph", "build memory from files", "search my graph", "extract entities and relations", "sync data into a graph", "update graph memory", "store memories for an agent", "help my agent learn over time", "visualize a knowledge graph built from documents", "let the agent learn", "adaptive agents", "personalized agents", "session based personalization", "find important ontologies", "find custom pydantic models", "isolate agentic behaviour", "add permission control to retrieval", "reduce context bloating".
cognee-permissions
Use when working with cognee's permission system — understanding or changing how users, roles, and tenants get access to datasets, how ACL grants work, where permissions are enforced in add/cognify/search/delete, and how the grant records surface in the memory-provenance view.
cognee-integrations
Use when the user wants to connect cognee to external services — switching LLM or embedding providers (OpenAI, Azure, Gemini, Anthropic, Ollama, OpenRouter), changing databases (Postgres, PGVector, Neo4j, Neptune, Turso), S3 storage, or the MCP server for IDE integration.