Perceive
Receive events such as a user request or a tool result, and identify what is new.
Connect a new request to remembered context, a plan, and an action. Akasha’s optional cognitive cycle brings those stages into one workflow, with feedback that can inform what happens next.
Cognitive cycle
Your order arrives tomorrow. I’ve sent the update by email, as you prefer.
“Email is best for delivery updates.”Previous customer conversation
Record what the application actually did. The next interaction can start with that experience.
Illustrative application workflow. The optional cognitive cycle uses your configured profile and planner.
A support request arrives with a history. Recall the customer’s earlier preference, decide what needs attention, and prepare the next action. Each stage has a defined role that developers can configure for their application.
Receive events such as a user request or a tool result, and identify what is new.
Rank incoming information so the agent can focus its limited working context.
Break information into facts and experiences that can be stored and retrieved.
Use the prepared knowledge to form a plan. Developers can customize the planner.
Use feedback to adjust which processing pathways receive more weight over time.
Send the chosen action to your application and return its result as feedback.
Send an event to the configured cognitive-cycle service, then inspect the returned action and trace. Your application carries out the action and can use the saved cycle history to review what happened.
// 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();
}
// Requires the cognitive-cycle service and a configured dispatcher.
const cycle = await request("POST", "/v1/cognitive/cycles", {
input: "Check the delivery estimate and prepare an email update.",
trigger: "customer-request",
});
// Inspect cycle.action and cycle.trace before your application acts.
const history = await request("GET", "/v1/cognitive/cycles");Choose a processing profile and connect the stages your application needs. Full, analytical, and minimal profiles change how much work the cycle performs.
Connect your agent’s events, knowledge, and feedback in a workflow you can inspect and customize.