-
Notifications
You must be signed in to change notification settings - Fork 1
Tools
help() returns every tool with a one-line summary; help(command='<name>')
returns that tool's signature and its full documentation, read live from the
code. "Full" is the operative word: a tool's description is sent with every
request for the whole session, so the reasoning and worked detail live behind
help() and only what a caller needs in order to choose correctly stays in the
schema.
The same arithmetic applies to the tool list itself. All 36 schemas cost about
9.5k tokens of every request whether or not the session ever documents a flow
or runs a curation pass, so MEMAI_TOOLS names the groups to publish:
MEMAI_TOOLS |
tools | ~tokens/request |
|---|---|---|
full (default) |
36 | 9.5k |
core,curation |
30 | 7.7k |
core,diagrams |
28 | 7.7k |
core |
22 | 5.9k |
core is the reading, writing, editing and linking surface; diagrams is
authoring one (get_diagram stays in core — reading a flow is a read);
curation is the optimize/dedup pass plus the store-wide settings and
purge_memory. Any group implies core. The default publishes everything, and
help() documents every tool, naming the ones this process did not load and the
group that turns them on.
| Writing | |
|---|---|
note(content, domain, also, tags, session, review_after, source_ref) |
Save a fact/decision/finding (type='note') |
checkpoint(intent, established, pursuing, open_questions, session, domain, also) |
Save work state; fields are free-length |
anti_pattern(pattern, why_wrong, instead, domain, also, session) |
Save a pitfall to avoid repeating |
reasoning(content, domain, also, session) |
Save a reasoning trace |
handoff(content, domain, also, session) |
Leave a note for another agent/session |
| Reading | |
|---|---|
pulse(domain) |
Warm-up: latest checkpoint, open handoffs/anti-patterns, recent notes, flow titles, scope census (incl. what is overdue for a recheck) |
search(query, domain, type, limit) |
Hybrid BM25 + vector search, source-annotated |
recall(query, domain, limit) |
Relevance-ranked recall of note()'d knowledge |
list_by_domain(domain, type, limit, subtree) |
Recency-ordered, scoped to a path and its subdomains |
list_recent(type, domain, limit, subtree) |
Recency-ordered, global |
timeline(uid, query, before, after, domain, type) |
The records written either side of one memory, in created_at order; anchored by uid, or by a query whose top hit becomes the anchor |
list_domains() |
The domain tree: own/subtree/cross-listed counts and latest activity |
get_memory(uid) |
Full record: edit history, relations, referencing diagrams |
get_relations(uid) |
Relations for a memory |
| Diagrams | |
|---|---|
diagram(title, nodes, edges, summary, domain, also, session, tags, kind) |
Document a routine as a graph |
diagram_node(uid, key, label, shape, note, delete) |
Add, patch or remove one step |
diagram_edge(uid, from_key, to_key, label, delete) |
Wire two steps, relabel or remove the wire |
diagram_link(uid, node_key, target_uid, relation_type, delete) |
Attach a memory to one step |
diagram_jump(uid, node_key, peer_uid, peer_node, label, delete) |
Continue a step into another flow |
diagram_relayout(uid) |
Recompute the stored node positions |
get_diagram(uid, format) |
Read a diagram back (formats above) |
| Editing and domains | |
|---|---|
edit_memory(uid, new_content, note, mode, source_ref) |
Correct a memory, or mode='append' add to it; the prior version is kept. source_ref repoints it at its source, on its own or with the edit |
link_memories(from_uid, to_uid, relation_type, note) |
Create a typed relation |
set_confidence(uid, confidence) |
unverified | confirmed | contradicted
|
also_domain(uid, domain) |
Cross-list a memory into one more path |
unfile_domain(uid, domain) |
Drop one cross-listing; where it is filed is untouched |
get_domain_case() / set_domain_case(mode)
|
Read/set the domain-casing policy |
| Curation and deletion | |
|---|---|
dedup_scan(domain, type, threshold, limit) |
Likely-duplicate pairs, for review |
optimize_scan(domain, type, since, include_archived, limit, offset, full) |
Dump the corpus compactly to plan a curation pass |
optimize_stage(suggestions, note) |
Stage a batch of suggestions for human review |
optimize_runs() / optimize_status(run_id)
|
What was staged, and what the human applied or rejected |
forget(uid, reason, superseded_by) |
Soft delete (archive, reversible) |
purge_memory(uid, confirm_phrase) |
Hard delete, requires "DELETE <uid>"
|
help(command) |
Tool docs read live from the code's docstrings |
Writer tool names match the type they store (note() → type='note',
reasoning() → type='reasoning', ...), so the verb an agent calls is exactly
the string it later filters on.