- The Pieces Post
- Posts
- How to Connect Pieces to Your AI Agents
How to Connect Pieces to Your AI Agents
Infinite OpenClaw Memory with Pieces (In 3 Minutes)

β° Last Chance β 50% Off Pieces Pro!
For the next two days, you can get Pieces Pro at 50% off β then it's gone.
50% off access to powerful single-click summaries and state-of-the-art AI models.
(Use code: LXDRZU0HYF)
π Upgrade now β pieces.app
How to Give Your AI Agents Instant Memory
You can connect OpenClaw directly to your Pieces Long-Term Memory! π
So your agent instantly knows your projects, your decisions, and your history the moment you spin it up.
No explaining yourself. No manual context. Just an agent that's ready to work 24/7.
Letβs build it!
What This Unlocks
Pieces turns everything you've worked on into structured long-term memory. By connecting OpenClaw via MCP, your agent can:
Recall what you've been working on across every session
Understand your projects and past decisions
Create and store new memories from everything it does β automatically
An agent that works 24/7 based on your real work and goals
How To Set It Up (Build an Agent in 5 mins or Less)
1. Enable Long-Term Memory in Pieces
Open the Pieces Desktop app β Settings β Long-Term Memory β make sure it's enabled.
2. Start your tunnel
ngrok http 39300Copy the URL it gives you.
3. Install OpenClaw
Head to openclaw.ai, grab the install command, and run it. Then:
openclaw init
openclaw start --web4. Install the Pieces MCP Skill
In OpenClaw go to Skills β Browse β search Pieces MCP β install Pieces Long-Term Memory MCP.
5. Let the agent handle the rest!
In the chat type: "Set up my Pieces long-term memory" and paste your ngrok URL when prompted. OpenClaw configures everything automatically.
Test it out
Ask your agent: "Who am I and what am I working on?"

It'll pull directly from your real Pieces context.
Not guesses, not generic responses. Your actual work.

You can even have OpenClaw create memories directly to your Pieces LTM and access them inside the Pieces Desktop app!
PRO TIP: Ask your agent βCreate a job to check Pieces every few hours and learn about what Iβm working on. Then generate a list of tasks you can do to help.β
βΆοΈ Watch the video: https://www.youtube.com/watch?v=Bh_y65oGzMg
π§ Pieces MCP Skill: https://clawhub.ai/jackrosspieces/pieces-mcp
Know other developers fighting with context-switching in their AI tools? Join our Ambassador Program to get Pieces swag, participate in giveaways, and even get paid for talking about Pieces!
Ready to give your AI a memory upgrade? β Download Pieces Now
The Pieces Team
P.S. Join our Discord community to share your experience with long-term memory, get help from the Pieces team, and connect with other developers revolutionizing their AI workflows.
