Memory · Resource

Keep the source behind the answer.

Keep the board memo, project brief, or reference file alongside a useful description and tags. Resource memory gives your agent a way to find that material and retrieve the original when the next question comes up.

Resource memory

Go straight to the source.

Workspace study.pdf
Example workspace
02 / FOCUSED WORK

Room to concentrate

The workspace should support the kind of attention a task requires.

Participants preferred a quiet room for sustained concentration.[1]

A place to focus made it easier to return to demanding work without rebuilding context.

Page 12 of 14

An answer you can follow back.

Show where an answer came from. Change pages in this example to explore the source and its corresponding citation.

Choose a chapter to explore

Fictional research excerpt in an example reader. The application supplies text extraction, page navigation, and citations.

Source material

Bring the right document back into the work.

A summary is useful, but the original still matters. Resource memory keeps files with their names, content types, and metadata, so your agent can find relevant material and return to its source.

01

Find the right resource

Search resource names, descriptions, and tags to find the material your application needs.

02

Keep useful labels

Attach tags such as project, customer, or reporting period to organize stored resources.

03

Return to the original

Retrieve stored resource data when you need to inspect the material behind a result.

04

Describe the format

Content types let your application distinguish a PDF from a spreadsheet or plain text.

05

Track the resource

Keep metadata and access history alongside the file, so its use can be inspected.

06

Keep more than prose

Use resource storage for files and other artifacts your application needs during its work.

Developer example

Return to the original document.

List stored documents, select a resource, and retrieve its original data. Your application can extract document text for a richer search index while resource storage keeps the original file.

Find stored documents and retrieve an original filetypescript
// 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 documents = await request("POST", "/v1/memory/resources/type", {
  kind: "document",
});
// Select an existing resource UUID from your stored documents.
const id = process.env.RESOURCE_ID;
if (!id) throw new Error("Choose a stored resource");
const resource = await request("POST", "/v1/memory/resources/get", { id });
const data = await request("POST", "/v1/memory/resources/data", { id });
Under the hood

Files with context attached.

Resource
Store request
resource metadata + base64-encoded file data
Lookup
List by resource type; retrieve by UUID
Searchable resource text
name · description · tags · type
HTTP
/v1/memory/resources/type · /get · /data

Give your agent the material to work from.

Keep the documents that matter in your Mind, ready for the next question.