@grok/agent-sdk) builds agents from a folder of Markdown and TypeScript and runs them locally or on Cursor hosting. Its built-in memory is one journal file that every user of the agent shares. Honcho replaces it with a separate, growing model of each person the agent talks to.
There are two ways to connect them:
Both need a Honcho API key from app.honcho.dev.
Option 1: Mount the Honcho plugin
The Honcho plugin for Cursor and Grok Bot runs from its MCP server and its skills alone. The Agent SDK mounts a Cursor plugin’s skills and MCP servers, so the plugin works unchanged.1
Copy the plugin into your project
2
Mount it
Mount the plugin as a directory, so you can replace its MCP server in the next step:
bot/extensions/honcho/extension.ts
3
Connect with an API key
The plugin signs in to Honcho with OAuth. The Agent SDK keeps OAuth tokens on the machine that signed in, so a hosted agent can’t use them. Replace the server with one that sends your API key:
bot/extensions/honcho/mcp-connections/honcho.ts
4
Tell the agent to use it
Skills load only when the model decides it needs them, and the memory loop must run every turn. Add this to If
bot/instructions.md:bot/hooks/memory.ts and a ## Memory section from agent-sdk init are still there, delete them.5
Deploy
Allow the Honcho MCP host and declare the secret:Locally, export
bot/agent.ts
HONCHO_API_KEY before agent-sdk dev.agent-sdk dev and say hello. On the first conversation the agent runs honcho-setup and asks what Honcho should call you. It uses the cursor workspace, the same one the plugin uses in the Cursor IDE and Grok Bot, so all three share what they learn about you.
The plugin’s rules and lifecycle hooks are not mounted. The plugin does not need them. The trade-off is that the model records each turn itself, so an interrupted turn can go unrecorded. Scheduled and webhook runs have no user to record.
Option 2: Record with a hook
Here the agent’s own code writes every turn to Honcho, and gives the model one tool to ask about the person it is talking to. Each Slack user or GitHub account becomes its own peer.1
Shared helpers
Files under
bot/lib/ are shared code, not loaded as agent parts.bot/lib/honcho.ts
2
Record every turn
Hooks run after each event is recorded, so they never slow the model down.
bot/hooks/honcho.ts
3
Let the model ask Honcho
A hook cannot add context before the model runs, so the model asks when it needs to. The tool works out who the user is, so the model never handles peer ids.Add a line to
bot/tools/recall.ts
bot/instructions.md, and delete bot/hooks/memory.ts and its ## Memory section if agent-sdk init created them:4
Deploy
Allow the Honcho host and declare the secrets:Locally, export both variables before
bot/agent.ts
agent-sdk dev.How memory is organized
A Slack thread can include several people, but the Agent SDK tells hooks only who started it. Every message in a thread is recorded under the person who started it.
Troubleshooting
Nothing shows up in Honcho. Runagent-sdk run --dir . --message "hi" and look for hook "honcho" handler for ... threw in the log. A 401 means HONCHO_API_KEY is missing in that environment. On hosting, check api.honcho.dev is in egressDomains.
recall says Honcho knows nothing. Honcho reasons in the background, so a new peer has little to show for the first few turns.
Source
Option 1 uses the plugin in the Honcho monorepo underintegrations/cursor/. Issues and pull requests go to plastic-labs/honcho.