Skip to content

code_knowledge

code_knowledge is the project-local note system. Notes are stored as graph nodes and linked to the code symbols they describe, so they automatically surface in code_related, code_context, and code_impact when you query those symbols.

ActionDescription
saveSave a note linked to code symbols
readRead a specific note by subject
searchSearch notes by subject, text, or tag
listList all notes grouped by tag
deleteRemove a note by subject
code_knowledge(
action="save",
subject="auth flow",
note="JWT from /auth/login → stored in localStorage → sent via Authorization header → validated by AuthGuard",
links=["AuthController", "AuthService", "AuthGuard"],
tags=["architecture", "pattern"]
)
code_knowledge(action="search", subject="auth")
code_knowledge(action="list")
code_knowledge(action="read", subject="auth flow")
ParameterTypeDescription
actionstringOne of: save, read, search, list, delete
subjectstringNote title / search query
notestringNote body (for save)
linksstring[]Symbol names to link this note to
tagsstring[]Tags for grouping (e.g. "architecture", "gotcha", "decision")

Notes linked to a symbol appear automatically when that symbol is queried:

code_related(name="AuthService")
→ --- Knowledge ---
→ [auth flow] JWT from /auth/login → stored in localStorage...
  • After tracing a non-obvious flow through multiple files
  • When discovering a gotcha: tags=["gotcha"]
  • After making an architectural decision: tags=["decision"]
  • When a pattern repeats: tags=["pattern"]
code_knowledgecode_memory
StorageProject graph (local)MemOS cloud (persistent)
Linked to code nodesYes — auto-surfacesNo
Cross-projectNoYes, per-project KB
Use forCode relationships, patternsPreferences, decisions, session notes