kdeps-tools-memory_query
v1.0.1Run a relational query over agent state. Relations: `memory` (persistent memory entries: key, value, namespace, type, references, createdAt, updatedAt), `tool_calls` (recent tool call history: name, args, result, timestamp), `tasks` (active goal's task list: id, desc, status, rounds, note). Query language is expr-lang: filter(relation, predicate) selects rows (e.g. filter(memory, .type == "error")), map(relation, expr) projects fields, join(left, right, leftField, rightField) equi-joins two relations into rows with left_/right_ prefixed fields, union(a, b) combines two relations with set semantics. String operators are infix: .value contains "x", .value startsWith "x", .value endsWith "x", .value matches "regex"; lower()/upper() are functions (lower(.value)); membership is .key in ["a", "b"].
set tools / shelf memory
LLM context: ~266 tokens when loaded (prompt or tool definition)
Where it runs
Part of the tools set, used in workflow and agent mode. What the model is told about each built-in tool: its description, usage notes and parameters. kdeps runs the tool itself.
- the agent loop builds the request
- the tool definitions are sent to the modeltools/memory_query
- the model calls a tool
- kdeps runs it
- the result goes back to the model
Loaded by: kdeps (agent loop), /update, /settings, kdeps run, kdeps install, kdeps list, kdeps uninstall, kdeps update
In the code: kdeps (agent loop)agent.RegisterBuiltinToolsagent.definedAs
Install
A kdeps asset: installed with the first-run profile that includes its set, or the first time a command needs it, and updated without a new release.
Pin a version with kdeps install tools/memory_query@<version>.
Contents
Run a relational query over agent state. Relations: `memory` (persistent memory entries: key, value, namespace, type, references, createdAt, updatedAt), `tool_calls` (recent tool call history: name, args, result, timestamp), `tasks` (active goal's task list: id, desc, status, rounds, note). Query language is expr-lang: filter(relation, predicate) selects rows (e.g. filter(memory, .type == "error")), map(relation, expr) projects fields, join(left, right, leftField, rightField) equi-joins two relations into rows with left_/right_ prefixed fields, union(a, b) combines two relations with set semantics. String operators are infix: .value contains "x", .value startsWith "x", .value endsWith "x", .value matches "regex"; lower()/upper() are functions (lower(.value)); membership is .key in ["a", "b"].
| Parameter | Type | Description |
|---|---|---|
| limit | integer | Max rows returned when the result is a relation (default 50, hard cap 500) |
| query * | string | expr-lang expression over the memory/tool_calls/tasks relations |
version: 1.0.1
description: 'Run a relational query over agent state. Relations: `memory` (persistent memory entries: key, value, namespace, type, references, createdAt, updatedAt), `tool_calls` (recent tool call history: name, args, result, timestamp), `tasks` (active goal''s task list: id, desc, status, rounds, note). Query language is expr-lang: filter(relation, predicate) selects rows (e.g. filter(memory, .type == "error")), map(relation, expr) projects fields, join(left, right, leftField, rightField) equi-joins two relations into rows with left_/right_ prefixed fields, union(a, b) combines two relations with set semantics. String operators are infix: .value contains "x", .value startsWith "x", .value endsWith "x", .value matches "regex"; lower()/upper() are functions (lower(.value)); membership is .key in ["a", "b"].'
parameters:
limit:
type: integer
description: Max rows returned when the result is a relation (default 50, hard cap 500)
query:
type: string
description: expr-lang expression over the memory/tool_calls/tasks relations
required: true
Versions
| Version | Published | Status |
|---|---|---|
| 1.0.1 | 10/20/2026 | active |
| 1.0.0 | 10/11/2026 | active |
Details
- Author
- kdeps
- License
- Apache-2.0
- Latest Version
- 1.0.1
- Published
- 10/11/2026