Files
AgapHost/ai/cognee-openclaw-plugin/openclaw.plugin.json
alvis 9094d71e2f ai: migrate LLM backbone from Kimi CLI to Codex CLI
Retires the Moonshot/Kimi subscription in favour of the already-paid ChatGPT
plan. Both CLI wrappers now run `codex exec`; the kimi-agent container is gone.

adolf-llm + hindsight-llm:
- runKimi -> runCodex (`codex exec --json --skip-git-repo-check`), resume via
  `codex exec resume <thread_id>`.
- MCP moves from a per-session .mcp.json (a workaround for Kimi having no
  --mcp-config-file flag) to a $CODEX_HOME/config.toml generated once at
  startup from shared-mcp.json. Field translation is load-bearing:
  bearerTokenEnvVar -> bearer_token_env_var, enabledTools -> enabled_tools.
- approval_policy="never" + sandbox_mode required, or unattended turns block
  on an approval prompt nobody can answer.

kimi-agent removed. It was the ONLY large-tier deployment behind LiteLLM, so
deleting it outright would have silently degraded every large-tier request to
the local 4B model via the existing fallbacks. tier-large, the auto_router
complex-reasoning route and their fallbacks now point at the codex-backed
adolf-llm wrapper (model_name: codex-agent).

Three environment blockers fixed along the way:
- OpenAI geo-blocks this host (403 unsupported_country_region_territory).
  Both containers now egress via the host xray proxy, with NO_PROXY keeping
  MCP and *.alogins.net traffic off the tunnel.
- node:22-slim ships no system CA store; the Rust codex binary validates TLS
  against it, so every HTTPS call failed with a generic transport error while
  Node's own fetch worked. ca-certificates added to both images.
- `codex exec resume` rejects -C/--cd (plain `codex exec` accepts it), which
  broke follow-up turns while first turns succeeded.

Known regression: Kimi's managed-usage API has no Codex equivalent, so the
/usage route returns 501 and there is no quota probe for the codex model.
The two quota plugins degrade quietly to no output.

Also: stop tracking cognee.env (live LLM + JWT secrets) and gitignore it.
The secrets remain in earlier history and should be rotated.

Verified live: plain turn, SSE streaming, session resume, MCP tool call,
bearer-token MCP call, and completions through both LiteLLM routes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014Y5QPagv4iun1ghpwM96Ff
2026-08-01 06:13:27 +00:00

70 lines
2.8 KiB
JSON

{
"id": "cognee-memory",
"name": "Cognee Memory",
"description": "Cross-session memory via Cognee. Injects LLM-free graph context before each reply (before_prompt_build), persists each turn after it ends (agent_end), and cognifies asynchronously on a background sweep (cognee-llm/Kimi). Modeled 1:1 on the Honcho plugin's touchpoints.",
"activation": {
"onStartup": true
},
"contracts": {
"tools": ["cognee_recall"]
},
"configSchema": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": { "type": "boolean" },
"cogneeUrl": { "type": "string" },
"agents": { "type": "array", "items": { "type": "string" } },
"topK": { "type": "integer", "minimum": 1, "maximum": 50 },
"maxContextChars": { "type": "integer", "minimum": 200, "maximum": 20000 },
"recallTimeoutMs": { "type": "integer", "minimum": 500, "maximum": 30000 },
"persistTimeoutMs": { "type": "integer", "minimum": 500, "maximum": 60000 },
"sweepIntervalMs": { "type": "integer", "minimum": 30000, "maximum": 86400000 },
"minTextChars": { "type": "integer", "minimum": 1, "maximum": 200 },
"injectHeader": { "type": "string" }
}
},
"uiHints": {
"enabled": {
"label": "Cognee Memory",
"help": "Enable cross-session Cognee memory (recall inject + turn persist + async cognify sweep)."
},
"cogneeUrl": {
"label": "Cognee URL",
"help": "Base URL of the cognee FastAPI service (default http://cognee:8000)."
},
"agents": {
"label": "Target Agents",
"help": "Agent ids that use Cognee memory. Empty means all agents."
},
"topK": {
"label": "Recall Top-K",
"help": "Number of graph triplet seeds to retrieve per recall (before_prompt_build)."
},
"maxContextChars": {
"label": "Max Injected Context Chars",
"help": "Hard cap on the size of the injected graph-context block."
},
"recallTimeoutMs": {
"label": "Recall Timeout (ms)",
"help": "Budget for the LLM-free graph recall on the reply path. On timeout the turn proceeds with no injected memory."
},
"persistTimeoutMs": {
"label": "Persist Timeout (ms)",
"help": "Budget for the post-turn raw add to cognee (off the reply path)."
},
"sweepIntervalMs": {
"label": "Cognify Sweep Interval (ms)",
"help": "Freshness dial: how often the background sweep cognifies datasets that received new turns. Cognify runs on cognee-llm (Kimi), off the reply path. Lower = fresher cross-session recall of recent facts, more Kimi calls."
},
"minTextChars": {
"label": "Minimum Text Chars",
"help": "Skip recall/persist for text shorter than this."
},
"injectHeader": {
"label": "Inject Header",
"help": "Header line prepended to the injected graph-context block."
}
}
}