Skip to content

AI coding assistants

Ask a coding assistant to build a Membase integration, with checks for learning completion, permissions and search failures.

Use this recipe when a coding assistant is implementing Membase in your application. To give the coding assistant your memory for its own work, follow its client guide under Connect your AI instead.

Install the Membase skill using your client’s setup guide (Claude Code, Codex, Cursor, Kimi Code). Then give it the integration task below.

The same skill carries the API reference, the SDK guide, the MCP setup and the use cases, so an agent that has it can write the integration for you. Install it once, then prompt:

Add Membase memory to this app. Read the membase skill first. Use the SDK; list the profile facts once per session when granted, search before answering about past work, and save only what the user supplied. Wait for learning before searching newly added documents and check partial. Never pass confirm on your own. Keep the key in the environment.

What the skill teaches, so you can check the result:

The agent should Because
call list_profile_facts once, near the start, when granted the profile is small and standing: who the user is
call search_memories before answering about past work, decisions or preferences search is retrieval inside the user’s own memory
cite memory_name every hit says which Memory it came from, over REST and MCP alike
use add_memory for a fact, add_document for text or a URL, with custom_id, and never send a container writes land in the key’s write target; documents are raw material until the Memory’s run; the same custom_id twice is a no-op
pass confirm=true only after the person agreed on a Full access key, a delete or forget without it changes nothing and answers with a how sentence (428 confirmation_required over REST), not an action
treat 403 as withdrawn access and stop the owner narrowed or revoked the key on Connect
use a suitable timeout and inspect partial a cold runtime or failed search must not be reported as an empty Memory

The skill is served at https://app.membase.com/skill (its SKILL.md with the install preamble) and as a zip at https://app.membase.com/plugin/membase-skill.zip. Its files are under https://app.membase.com/plugin/skills/membase/: SKILL.md, README.md and references/api-reference.md, references/sdk-guide.md, references/mcp-setup.md, references/quickstart.md, references/use-cases.md. That directory address itself is not a listing; fetch the files by name, or take the zip.

Any agent can be handed the OpenAPI document instead. It types the request bodies only: every response is an untyped JSON object, and it names no server or auth scheme, so the generated code must set the base URL (https://api.app.membase.com) and the Authorization: Bearer header by hand. The command below generates TypeScript types; OpenAPI Generator makes a client for another language:

Terminal window
curl -s https://app.membase.com/plugin/openapi/agent-protocol.json -o agent-protocol.json
npx openapi-typescript agent-protocol.json -o membase.d.ts

Three requests cover most integrations: GET /v1/profile-facts, POST /v1/search with {"q": …} and POST /v1/memories/add with {"content": …}, each with the bearer header. No request names a Memory; a write lands in the key’s write target. API reference has every operation.