Reasoning

Keep the evidence close to the decision.

Find the relevant knowledge, follow the connections, and keep an explanation of the decision. Minds gives your application a way to bring supporting context into view when someone asks why.

Reasoning

An answer you can examine.

QUESTION / 01

Did the delayed campaign
cause the sales decline?

Observed result
Orders were lower during the quarter. The report does not attribute the change to a single cause.
sales-review / §2September 2
RECORDED CONCLUSION

The delay may be a factor.
The cause is still unresolved.

3 sources attachedFurther comparison needed

Keep the uncertainty with the answer.

Record the conclusion, the supporting sources, and what remains unresolved. Someone else can return to the same evidence.

Choose a chapter to explore

Example evidence review with a recorded conclusion and open questions.

From question to explanation

Bring the supporting knowledge into view.

To investigate a revenue change, an application may need quarterly results, sales-channel relationships, and decisions from the previous review. Minds gives developers tools to retrieve that context and keep a record of how it informed the answer.

01

Find the relevant knowledge

Search stored knowledge by meaning to bring useful context into the question you are investigating.

02

Follow the connections

Walk relationships in the knowledge graph to see how the facts behind a question are connected.

03

Record the decision

Keep the question, options considered, selected outcome, and explanation together for later review.

04

Revisit the explanation

Retrieve the recorded reasoning chain when someone needs to understand why an application chose a particular response.

05

Keep perspectives distinct

Use named graph contexts to work with a particular perspective or set of assumptions.

06

Choose how to plan

Integrate your application’s planner, use the optional cognitive cycle, or develop a custom model through the Rust engine.

The cognitive cycle

Turn relevant knowledge into a plan.

The optional cognitive cycle includes a planning stage. Its default planner creates simple steps from the knowledge it receives. Developers can replace that planner when an application needs a different strategy.

01

Bring your own planner

A common interface accepts prepared knowledge and returns an execution plan, giving developers a clear integration point.

02

Keep plans bounded

Configure the number of knowledge items and plan steps considered. The default planner offers a starting point for application-specific behavior.

03

Search when planning fails

In the full cycle, a planning error can trigger another knowledge search to look for useful context.

A question, connected to evidence

Show what supports the answer.

Investigate a possible link between revenue and sales channels. Retrieve the recorded relationship, compare the supporting sources, and save the explanation with the decision. Keep assumptions visible as you assess the cause.

Explore the reasoning illustration
Example investigationExample
goalWhy did Q3 revenue dip?
Steps in the investigation
Clarify the revenue question
Review revenue by channel
Compare with the previous quarter
4Look for a similar change
5Investigate other explanations
6Request further analysis
Current step
$ Retrieve a relevant past event
matches Q3-2024 pattern
Example score0.94
Review step 4 / 4Illustrative data
Retrieve context and follow an existing graph connectiontypescript
// Run server-side with credentials scoped to this Mind.
const endpoint = process.env.AKASHA_URL;
const capability = process.env.AKASHA_CAPABILITY;
if (!endpoint || !capability) throw new Error("Configure your Mind connection");

async function request(method: string, path: string, body?: unknown) {
  const headers: Record<string, string> = {
    "Content-Type": "application/json",
    "x-akasha-capability": capability!,
  };
  if (process.env.AKASHA_TOKEN) {
    headers.Authorization = "Bearer " + process.env.AKASHA_TOKEN;
  }
  const response = await fetch(new URL(path, endpoint), {
    method, headers,
    body: body === undefined ? undefined : JSON.stringify(body),
  });
  if (!response.ok) throw new Error("Mind request failed: " + response.status);
  return response.json();
}

const memories = await request("POST", "/v1/ns/retrieve", {
  text: "Why did Q3 revenue change?", k: 5,
});
// Supply the UUIDs of two existing nodes in your graph.
const start = process.env.START_NODE_ID;
const end = process.env.END_NODE_ID;
if (!start || !end) throw new Error("Choose the graph nodes to investigate");
const path = await request("POST", "/v1/ns/paths/find", { start, end });
For model developers

Integrate hierarchical reasoning in Rust.

Build a custom reasoning model with Akasha’s Rust HRM library. It separates broad planning from detailed processing and learns when to stop. Prepare it with task-specific training or a compatible checkpoint, then run it through Candle. Developers integrate this model separately from the default cycle planner.

HierarchicalReasoningModel.reasonrust
use akasha_ml::hrm::{HRMConfig, HierarchicalReasoningModel};
use candle_core::{Device, DType};
use candle_nn::{VarBuilder, VarMap};

let config = HRMConfig::for_cognitive_reasoning();
let variables = VarMap::new();
let device = Device::Cpu;
let vb = VarBuilder::from_varmap(&variables, DType::F32, &device);
let hrm = HierarchicalReasoningModel::new(config, vb)?;

let input_ids = vec![1, 2, 3, 4, 5];
let result = hrm.reason(&input_ids).await?;
// result.steps · result.converged · result.q_halt_logits
Technical details

Choose the right integration.

Use the HTTP interfaces to retrieve memory and follow existing graph paths. Use the Rust HRM library when you are developing a custom reasoning model.

HRM · akasha-ml
Type
HierarchicalReasoningModel
Tensors
Candle (Burn optional on the crate)
reason
async fn reason(&self, input_ids: &[u32])
ACT default
halt_max_steps 10
H defaults
h_layers 6 · h_cycles 3
L defaults
l_layers 6 · l_cycles 2
Factories
for_arc · for_sudoku · for_maze · for_cognitive_reasoning
Model preparation
Task-specific training or compatible checkpoint
Cycle planning · HTTP retrieval
Default engine
DefaultReasoningEngine
max_steps
5
chain_of_thought
true
consideration_window
12
Failure path
AnnQuery fallback on Full
HTTP retrieval
text · k
HTTP paths
Shortest path between existing node UUIDs
Routes
/v1/ns/retrieve · /v1/ns/paths/find

Make the reasoning easier to inspect.

Connect relevant facts, examine the path between them, and keep the explanation with the decision.