# Connect to your Mind

List available tools, save a test memory, and retrieve it through the dedicated instance HTTP API.

Source: https://docs.minds.sh/docs/developers/quickstart



This guide uses the daemon's HTTP tool interface. It works independently of any model provider and makes the request and result shape explicit.

You need an existing dedicated Mind endpoint and a valid capability issued for that instance. The capability must allow the tool's action and memory keyspace. Do not use a key generated by a UI demonstration or treat a timed connection animation as credential verification.

Set `MINDS_INSTANCE_URL` to the returned HTTPS endpoint. Supply `MINDS_CAPABILITY` through your application's secret configuration. If the deployment separately requires a legacy JWT, supply it in an additional `Authorization: Bearer ...` header; it does not replace the capability header.

## 1. Discover the tools [#1-discover-the-tools]

```bash
curl --fail-with-body \
  --request POST \
  --header 'Content-Type: application/json' \
  --header "x-akasha-capability: $MINDS_CAPABILITY" \
  --data '{}' \
  "$MINDS_INSTANCE_URL/v1/mcp/tools/list"
```

The result contains a `tools` array. Use each tool's advertised input schema rather than assuming every deployment enables the same list. A 401 or 403 is a credential/scope problem; it is not proof that the memory service is empty.

## 2. Save a small memory [#2-save-a-small-memory]

```bash
curl --fail-with-body \
  --request POST \
  --header 'Content-Type: application/json' \
  --header "x-akasha-capability: $MINDS_CAPABILITY" \
  --data '{"name":"remember","arguments":{"content":"The launch review is on Tuesday.","context":{"source":"integration-test","tags":["quickstart"]}}}' \
  "$MINDS_INSTANCE_URL/v1/mcp/tools/call"
```

The tool output has `content`, `is_error`, and `result`. Check `is_error` before reading `result`. On success, the remember result reports whether storage occurred and includes a memory identifier. Save the actual returned ID; do not assume one from this example.

## 3. Ask for it in a later request [#3-ask-for-it-in-a-later-request]

```bash
curl --fail-with-body \
  --request POST \
  --header 'Content-Type: application/json' \
  --header "x-akasha-capability: $MINDS_CAPABILITY" \
  --data '{"name":"recall","arguments":{"query":"When is the launch review?","limit":5,"filters":{"tags":["quickstart"]}}}' \
  "$MINDS_INSTANCE_URL/v1/mcp/tools/call"
```

Read `result.memories`, not a top-level `memories` field. Compare the retrieved content and source with the test record. Empty matches are a valid result; verify the same endpoint, namespace authority, and filters before changing the query.

## 4. Add it to your application [#4-add-it-to-your-application]

A typical application retrieves relevant memory before composing a model request, then stores selected outcomes after the work completes. The application decides what is worth retaining. Store source information and distinguish a user-provided fact from a model's inference.

For cleanup, inspect the deployed `forget` schema and target the returned test-memory ID. Its reason field is required. Avoid broad query-based deletion while validating an integration.

## What this verifies [#what-this-verifies]

A successful save followed by a later recall verifies that these two tool requests worked against the selected instance. It does not prove backup recovery, plan billing, every SDK method, or every engine service. Those need their own workflow checks.

Source: `akasha-daemon/src/main.rs` routes `/v1/mcp/tools/list` and `/v1/mcp/tools/call`, `akasha-daemon/src/mcp/handlers.rs`, and `akasha/mcp/src/tools/{mod,remember,recall,forget}.rs`. Capability enforcement is in the daemon authentication middleware.
