# Membase

Decentralized memory layer for AI agents — persistent, verifiable storage for conversations, knowledge bases, and on-chain task coordination. **SDK**, **MCP**, or **Skill** integration.

### 30-Second Example

```python
pip install git+https://github.com/unibaseio/membase.git
```

```python
from membase.memory.buffered_memory import BufferedMemory
from membase.memory.message import Message

memory = BufferedMemory(membase_account="default", auto_upload_to_hub=True)
memory.add(Message(name="my-agent", content="Hello!", role="assistant", metadata=""))
# View at https://hub.membase.unibase.com
```

### Why Membase

| vs. Centralized DB            | vs. Local Storage                     |
| ----------------------------- | ------------------------------------- |
| Verifiable on-chain           | Syncs to Hub, survives restarts       |
| ZK-verified access            | Multi-agent shared memory             |
| MCP/Skill — no custom backend | Chain tasks for collaborative rewards |

### Integration Options

| Option    | Best for                         | Setup                                                      |
| --------- | -------------------------------- | ---------------------------------------------------------- |
| **SDK**   | Custom agents, full control      | `pip install git+https://github.com/unibaseio/membase.git` |
| **MCP**   | Claude Desktop, Cline, etc.      | [membase-mcp](https://github.com/unibaseio/membase-mcp)    |
| **Skill** | BitAgent, skill-based frameworks | Install skill, configure                                   |

### Next Steps

* [Quick Start](https://unibaseio.gitbook.io/unibase-docs/membase/quick-start) — Multi-Memory, Knowledge Base, Chain Tasks
* [Integration Options](https://unibaseio.gitbook.io/unibase-docs/membase/integration-options)
* [Architecture](https://unibaseio.gitbook.io/unibase-docs/membase/architecture)

### Resources

* [Membase GitHub](https://github.com/unibaseio/membase) · [Memory Hub](https://hub.membase.unibase.com)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://unibaseio.gitbook.io/unibase-docs/membase.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
