Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.
Python agent-contextagent-memoryagent-pluginsagentic-ragcontext-databasedsh-pluginknowledge-basememorymemory-managementself-evolvingvector-database
Kimi Code host contract
Verified against Kimi Code CLI 0.43.1 and Node.js 18+.
- Kimi loads a native plugin from its managed plugin directory. The installer assembles that directory; this source directory is not itself a complete runnable plugin.
- Hook stdin is snake-case JSON. The adapter consumes the verified
session_id,cwd,prompt,tool_name, andtool_inputfields only;UserPromptSubmit.promptmay be a string or an array of content parts. UserPromptSubmitaccepts raw text on stdout. Other lifecycle hooks are silent;PreToolUsereturns Kimi'spermissionDecisionJSON shape.- The stable transcript is the session's
agents/main/wire.jsonl, located viasession_index.jsonl.turn.endedcloses interrupted or tool-only turns. If log rotation removes the acknowledged cursor, capture restarts from the current file and the bounded acknowledgement set suppresses duplicates. - Stop, PreCompact, and SessionEnd capture may detach. Interrupt stays synchronous and all of its OpenViking requests share a two-second budget.
- The native plugin manifest owns hooks and MCP. Installation does not edit
legacy
config.tomlormcp.jsonfiles.
Shared configuration, recall, capture filtering, retry queues, HTTP, and MCP
transport remain in memory-plugin-shared; kimicode.mjs owns only Kimi's
event mapping, input/output shape, transcript decoding, and commit policy.
Versioned host references: