Everything you need to connect Clawtex to your OpenClaw agent.
1. Create an account and name your agent.
2. Copy the BOOTSTRAP snippet from the connection screen.
3. Paste it into your agent's BOOTSTRAP.md or system prompt.
4. Rename MEMORY.md to MEMORY.archived.md in your workspace.
5. Your agent now has persistent memory that improves over time.
Clawtex adds three things to your agent. Nothing else changes in your OpenClaw setup.
At every session start, your agent loads lessons, current state, and recent events from Clawtex.
curl -s -H "Authorization: Bearer YOUR_KEY" https://clawtex.io/api/lessons/inject curl -s -H "Authorization: Bearer YOUR_KEY" https://clawtex.io/api/state curl -s -H "Authorization: Bearer YOUR_KEY" "https://clawtex.io/api/events?days=7"
During sessions, your agent logs decisions, milestones, blockers, and tasks as they happen.
curl -s -X POST https://clawtex.io/api/events \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "decision",
"entity": "project/my-app",
"summary": "Switched from REST to GraphQL for performance"
}'Your agent writes structured state so it knows what's current at every session start.
curl -s -X POST https://clawtex.io/api/state/projects \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"id": "my-app",
"data": {
"name": "My App",
"status": "in progress",
"deadline": "2026-04-15"
}
}'The BOOTSTRAP snippet includes rules that keep your agent structured. These are the guardrails that prevent messy data.
Clawtex analyses your event history using AI to find patterns your agent keeps repeating. It proposes lessons that you approve or reject.
Manual extraction: Click "Extract from events" on the Lessons page. AI analyses the last 7 days and proposes 1-3 lessons.
Automatic extraction: Every Monday at 9am UTC, Clawtex runs extraction for all Pro/Team users automatically. Proposals appear on your Lessons page.
Approval flow: Review each proposal. Approve to make it active (injected every session). Reject to dismiss.
Injection format: Approved lessons are returned as WHEN / DON'T / DO instructions that your agent reads at session start.
# Extract manually: curl -s -X POST https://clawtex.io/api/lessons/extract \ -H "Authorization: Bearer YOUR_KEY" # Get active lessons for injection: curl -s https://clawtex.io/api/lessons/inject \ -H "Authorization: Bearer YOUR_KEY" | jq -r .injectionBlock
When a session compacts or ends, your agent should log any remaining events and update state before context clears. The BOOTSTRAP snippet includes instructions for this.
Your agent should:
All endpoints require Authorization: Bearer YOUR_API_KEY
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/state | All entities across all types |
| GET | /api/state/:type | All entities of a type |
| GET | /api/state/:type/:id | Single entity |
| POST | /api/state/:type | Create or update entity |
| PATCH | /api/state/:type/:id | Update entity fields |
| DELETE | /api/state/:type/:id | Delete entity |
| GET | /api/events | Query events (params: days, type, entity, limit) |
| POST | /api/events | Log event (accepts optional date, time fields) |
| GET | /api/lessons/inject | Get formatted lessons for injection |
| POST | /api/lessons/extract | Extract lessons from events (Pro/Team, max 5/day) |
| GET | /api/agents | List your agents |
| GET | /api/agents/:id/ping | Validate agent connection |
{
"id": "acme-corp", // lowercase, hyphenated
"type": "clients", // plural, lowercase
"data": { // any JSON - you decide the fields
"name": "Acme Corp",
"status": "active",
"contact": "jane@acme.com"
}
}{
"type": "decision", // decision | milestone | blocker | task | note | deploy | contact
"entity": "project/my-app", // type/id reference
"summary": "Switched to GraphQL", // one sentence
"date": "2026-03-22", // optional - defaults to now
"time": "14:30" // optional - defaults to now
}{
"context": "Integrating with client APIs",
"mistake": "Assumed API version without checking",
"correct": "Always confirm API version before starting"
}| What | Format | Example |
|---|---|---|
| Entity type | plural, lowercase | clients, projects, repos |
| Entity ID | lowercase, hyphenated | acme-corp, website-rebuild |
| Entity reference | type/id | project/website-rebuild |
Clawtex replaces OpenClaw's default memory system (MEMORY.md and daily logs). It does not sit on top of it.
After connecting Clawtex, rename your MEMORY.md to stop OpenClaw from injecting it:
mv MEMORY.md MEMORY.archived.md
Your other workspace files (SOUL.md, USER.md, TOOLS.md, AGENTS.md) are unaffected. Only MEMORY.md is replaced.
Clawtex handles everything MEMORY.md was doing - but structured, queryable, and with AI-powered learning on top.
| Feature | Free | Pro | Team |
|---|---|---|---|
| Agents | 1 | 3 | Unlimited |
| Event history | 14 days | Unlimited | Unlimited |
| Dashboard | Read-only | Full access | Full access |
| AI lesson extraction | - | Yes | Yes |
| Weekly auto-extraction | - | Yes | Yes |
| API + CLI | Yes | Yes | Yes |
| Support | - | Priority | |
| Price | Free | £9/month | £24/month |
1. Remove the Clawtex BOOTSTRAP snippet from your agent's system prompt.
2. Rename MEMORY.archived.md back to MEMORY.md if you want OpenClaw's default memory back.
3. Your OpenClaw setup continues working exactly as before.
4. Your data is retained on Clawtex for 30 days before deletion.
Clawtex never modifies your OpenClaw config, channels, or agent setup. It only reads and writes via the API.