ReasoningMemory API reference

Reasoning trace, step, and tool-call operations exposed through client.reasoning. The main signatures are for bolt; NAMS stores conversation-level steps and tool calls and synthesizes the trace lifecycle locally.

Signatures below show types, keyword-only arguments (*), and defaults. They are reference declarations; the examples show calls to execute.

See Backend capabilities for availability and data scope. This page is a short overview and index; each subsystem has its own page.

Overview

A bolt trace records a task and optional outcome. Its ordered steps can hold thoughts, actions, observations, and tool calls.

from neo4j_agent_memory.core.memory import ToolCallStatus

trace = await client.reasoning.start_trace("example", "Find Italian restaurants")
step = await client.reasoning.add_step(
    trace.id, thought="Search nearby restaurants", action="search_restaurants"
)
await client.reasoning.record_tool_call(
    step.id, "search_api", {"cuisine": "Italian"},
    result=[{"name": "La Trattoria"}], duration_ms=234,
    status=ToolCallStatus.SUCCESS,
)
await client.reasoning.complete_trace(
    trace.id, outcome="Recommended La Trattoria", success=True
)

For NAMS, first create a conversation and replace example with its server-issued ID. Read NAMS lifecycle and operations before relying on trace persistence.

On this subsystem