Context-aware knowledge engine for AI — memory, graph, intelligent routing
Kairn defines 3 tools with visible schemas and descriptions. All tools have input schemas with typed parameters and reasonable descriptions (100-250 chars). However, several quality gaps prevent a higher score: (1) Tool names lack clear verb prefixes, 'kn_add', 'kn_connect', 'kn_judge' are prefixed with 'kn_' (namespace) rather than starting with action verbs like 'add_node', 'create_edge', 'record_judgment'. This makes intent less clear to LLMs. (2) Parameter descriptions are present but minimal, most lack examples of valid inputs, format constraints, or dependency hints. (3) Output schemas are not documented, callers cannot see what fields are returned or how to chain tools. (4) Error handling descriptions are absent, tools do not explain what to do if a node already exists, if an edge weight is invalid, or if a relation verb is unrecognized. (5) Security considerations are undocumented, kn_judge and kn_connect modify state but descriptions do not warn about irreversibility or permission requirements.
Add node to knowledge graph. Auto-links via FTS5.
Create typed, weighted edge between nodes.
Record a typed relationship judgment between two nodes. Strict-mode wrapper around kn_connect: only the 5 canonical relation verbs (conflicts_with, supersedes, compatible, scoped, related) are accepted. Use after kn_learn returns a non-empty candidates[] list to assert how the new node relates to an existing one. For legacy or system-generated edges, use kn_connect (lax mode).
Tool names do not start with action verbs. 'kn_add', 'kn_connect', 'kn_judge' are prefixed with namespace ('kn_') rather than conventional verbs (create_, add_, record_). LLMs infer intent from the verb, 'add_node' or 'create_edge' would be clearer.
No output schemas documented. Tools define inputs but callers cannot see what fields are returned (e.g., does kn_add return node_id? created_at?). This breaks tool chaining, if kn_judge requires source_id and target_id, downstream callers need to know how kn_add provides them.
Parameter descriptions lack format constraints and examples. 'Node name' does not specify length limits, character restrictions, or whether names must be unique. 'Edge weight 0.0-1.0' is good, but 'Relationship type' and 'Relation' (in kn_judge) do not enumerate valid values or explain the difference.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | C | 60 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 28 | - | v1 |
Error handling and recovery guidance missing. Descriptions do not explain what happens if a node with the same name already exists, if an invalid relation verb is passed to kn_judge, or if weight is outside [0.0, 1.0]. LLMs need 'If you get X error, try Y' guidance.
State-modifying tools (kn_connect, kn_judge) do not document irreversibility or confirmation requirements. Descriptions do not warn that these calls persist to the knowledge graph and cannot be undone without explicit deletion. kn_judge accepts 5 canonical verbs but does not enumerate them in the description.
kn_judge description mentions '5 canonical relation verbs' but does not list them inline. The input schema constrains relation to one of 5 values, but the description should enumerate them for LLM clarity: 'conflicts_with, supersedes, compatible, scoped, related'.