Ask what NEXUS knows
cognitive_queryGet what NEXUS has stored about a topic in one read-only call: memories, facts, hypotheses and rules, returned as one structured object.
- memories: semantic retrieval over episodes and facts (up to 15).
- facts: if entity_id is given, all facts of that entity. Otherwise, the
entities linked to the top 3 retrieved episodes are used (returned as
`entity_ids`, and the first becomes `entity_id`), and their facts are
ranked against the topic (top 10). This inference needs 'memories' in
include; without it and without entity_id, facts is empty.
- hypotheses and rules: filtered by topic keywords in their text fields
(top 10). If nothing matches, the result is an empty list.
For a single kind of data, use retrieve_memories, get_facts_by_entity or
list_hypotheses instead.
Returns:
{"topic", "entity_id", "entity_ids"?, "memories": {"episodes", ...},
"facts": [...], "hypotheses": [...], "rules": [...]}, where only
the included modules are present.
Args:
topic: Natural-language description of what you want to know.
entity_id: Optional entity UUID. If given, all facts of that entity are returned.
include: Subset of ['memories', 'facts', 'hypotheses', 'rules'] (default: all).
time_range: Optional time window for the memories module only. It accepts the same values as retrieve_memories (e.g. 'last_7d', 'last_30d').
since: Optional ISO-8601 start of the window (memories module only).
until: Optional ISO-8601 end of the window (memories module only).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"topic": "<topic>"
},
"name": "cognitive_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| since | No | ||
| topic | Yes | ||
| until | No | ||
| include | No | ||
| entity_id | No | ||
| time_range | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| facts | No | ||
| rules | No | ||
| topic | Yes | ||
| concepts | No | ||
| memories | No | ||
| entity_id | No | ||
| hypotheses | No |