Agent Skillstopoteretes/cognee › cognee-server

cognee-server

GitHub

用于本地启动 Cognee API 服务器及 UI,配置认证模式(多租户或单用户),连接 SDK/CLI 客户端,以及排查端口冲突和权限问题。

.claude/skills/cognee-server/SKILL.md topoteretes/cognee

Trigger Scenarios

启动 cognee 本地服务 配置后端访问控制 连接 SDK 到本地服务器 解决 401/403 或端口占用错误

Install

npx skills add topoteretes/cognee --skill cognee-server -g -y
More Options

Non-standard path

npx skills add https://github.com/topoteretes/cognee/tree/main/.claude/skills/cognee-server -g -y

Use without installing

npx skills use topoteretes/cognee@cognee-server

指定 Agent (Claude Code)

npx skills add topoteretes/cognee --skill cognee-server -a claude-code -g -y

安装 repo 全部 skill

npx skills add topoteretes/cognee --all -g -y

预览 repo 内 skill

npx skills add topoteretes/cognee --list

SKILL.md

Frontmatter
{
    "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."
}

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                           # disconnect
    

    In Python: await cognee.serve(url="http://localhost:8000").

  • HTTP: main routes live under /api/v1/ — the memory API is remember (plus remember/entry), recall, improve, forget; sessions covers session memory; datasets, users, visualize handle the rest. The legacy add, cognify, search, memify, and delete routes still exist and are what the memory routes call underneath (see cognee/api/client.py for the registered routers, or GET /openapi.json on a running server).

    Note there is no /api/v1/feedback routefeedback exists 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=false and restart.
  • recall/search returns [] instead of erroring → permission-filtered result; check dataset access rights for the calling user.

Version History

  • fd5045f Current 2026-08-19 22:08

Same Skill Collection

.claude/skills/cognee-cli/SKILL.md
.claude/skills/cognee-community/SKILL.md
.claude/skills/cognee-docker/SKILL.md
.claude/skills/cognee-integrations/SKILL.md
.claude/skills/cognee-permissions/SKILL.md
examples/demos/skill_feedback_loop/skills/skill-feedback-writer/SKILL.md
examples/demos/skill_feedback_loop/skills/pr-comment-evaluator/SKILL.md
examples/demos/skill_feedback_loop/skills/diff-risk-explainer/SKILL.md

Metadata

Files
0
Version
fd5045f
Hash
cfe8c98f
Indexed
2026-08-19 22:08

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-22 01:30
浙ICP备14020137号-1 $mapa de visitantes$