feat: Epicode memory-augmented workflow template + MCP integration guide#22
feat: Epicode memory-augmented workflow template + MCP integration guide#22sunormesky-max wants to merge 2 commits into
Conversation
…n guide Add the first Clutch workflow template that demonstrates persistent agent memory via Epicode (a spatial AI memory operating system). ## What's included - workflows/epicode-memory-pipeline.json: a 5-node pipeline (Research → Build → Verify → Human Gate → Review) where each agent recalls prior context before working and stores findings after. This demonstrates L1 (single-agent memory) out of the box and L2 (shared memory across workflow agents) when users bind the same Epicode MCP server to all agents. - docs/mcp-servers/epicode.md: a 2-minute integration guide covering account setup, MCP server config in Clutch, agent binding, how L2 shared memory works (with diagram), key MCP tools, and self-hosting. - README.md: add an 'MCP Server' section linking to the new doc. ## Why this is valuable Clutch agents currently start blank every session. With Epicode's 35 MCP tools (memory CRUD, semantic search, recall with knowledge-graph expansion, feedback loop), agents gain cross-session memory and workflow-level knowledge sharing — what the Research agent discovers, the Builder agent can recall without manual context passing. Epicode is MIT-licensed and self-hostable, or available as SaaS at epicode.cn. No changes to Clutch core are required — this uses the existing MCP client extension point (EXTENSIBILITY.md §4.2).
fancy1108
left a comment
There was a problem hiding this comment.
Thanks for the contribution — triaged this against our Phase 1 policy (CONTRIBUTING.md) and extension boundaries (EXTENSIBILITY.md).
What this PR is
Pure extension-layer content (no orchestrator / desktop core changes):
| File | Role |
|---|---|
workflows/epicode-memory-pipeline.json |
Built-in workflow template — 5-node Research→Build→Verify→Human Gate→Review, instructions tell agents to use Epicode MCP memory_recall / memory_create |
docs/mcp-servers/epicode.md |
Third-party MCP integration guide (SaaS epicode.cn or self-host) |
README.md |
Links the new doc under a new docs/mcp-servers/ section |
This matches EXTENSIBILITY §4.2 (user-configured MCP client) and §4.1 (workflow JSON templates). It does not change LangGraph, Engine Router, or WS state.
Fit / concerns (maintainer view)
Pros
- Small, focused diff (~188 LOC)
- Demonstrates cross-session / cross-agent memory via MCP — a real gap users ask about (see Issue #20)
- Self-host path documented; core stays local-first
Before merge we'd want
- Workflow validate — run against
workflows/workflow.schema.json/POST /api/workflows/validate(verify node uses$CLUTCH_TASK_OUTPUT, which may not exist in runtime) - Agent names — template references
Researcher/Builder/Reviewer; onboarding auto-provisions differ — doc should say users must create/bind these agents + Epicode MCP, or align with default agent IDs - Repo docs hygiene — if merged: index in
docs/README.md, and user-visible template list indocs/PRODUCT_INTRO.md+CHANGELOG.md(project release gate) - Third-party disclaimer — README section should note Epicode is community/vendor integration, not a Clutch official service; SaaS stores data on epicode.cn (see your privacy section — users opt in via MCP config)
- CI — please confirm green on
mainbase (checks did not run on the PR yet)
Status
Not merging immediately — direction looks reasonable for Phase 1 (docs + template), but needs the items above. Happy to re-review after updates.
If you prefer to keep this outside the main repo, publishing the JSON + guide in the Epicode repo and linking from a Discussion also works — we can add a single neutral pointer under docs/EXTENSIBILITY.md instead of vendoring vendor docs.
Thanks again for using Clutch's MCP extension point thoughtfully.
Per @fancy1108 review feedback: 1. Remove check node with $CLUTCH_TASK_OUTPUT (not in runtime) — pipeline is now Research→Build→Human Gate→Review (4 working nodes) 2. All agent_task nodes use default 'clutch-agent' instead of Researcher/Builder/Reviewer — doc explains how to create specialized agents and replace agent names for separate roles 3. Add third-party disclaimer to README MCP section and doc header — Epicode is community/vendor integration, not Clutch official service 4. Clarify L2 memory sharing: single default agent shares memory across steps; separate agents (optional) each get own system prompt + shared Epicode space
|
Thanks for the thorough review — all five items addressed in 1. Workflow validate — Removed the 2. Agent names — All 3. Repo docs hygiene — Ready to index in 4. Third-party disclaimer — Added to both the README MCP section ("社区/第三方集成指南,非 Clutch 官方服务") and the doc header ("Community/Vendor integration — Epicode is a third-party project"). Privacy section already covers epicode.cn data storage + self-host alternative. 5. CI — This PR is docs + JSON only (no Rust/Python/TS changes), so the verify/test CI shouldn't be affected. Let me know if you'd like me to run any specific validation. Regarding your alternative suggestion (publish in Epicode repo + link from Discussion) — I'm happy either way. If vendoring vendor docs in the main repo feels heavy, a neutral pointer in |
Consolidate safe Dependabot bumps, fix Windows pytest for mimo-cli detection, align windows-build to pnpm/action-setup@v6, and merge community Epicode workflow template + MCP guide from PR #22 with doc sync. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Merged to |
What this PR adds
The first Clutch workflow template with persistent agent memory, powered by Epicode — a spatial AI memory operating system with 35 MCP tools.
workflows/epicode-memory-pipeline.jsondocs/mcp-servers/epicode.mdREADME.mdThe problem this solves
Clutch agents start blank every session. When a workflow runs Research → Build → Review, each agent has no memory of:
This PR adds memory to Clutch agents via the existing MCP client extension point (no core changes, per EXTENSIBILITY.md §4.2).
Two levels of memory
L1 — Single-agent memory (works immediately):
An agent with Epicode MCP bound will
memory_recallprior context before working andmemory_createto store results. Next session, it remembers.L2 — Workflow-level shared memory (requires agent config):
When all agents in a workflow bind the same Epicode account, they share one user space:
No manual context passing between nodes. The workflow template's instructions tell each agent when to recall/store.
How to try it
epicode, URL:https://epicode.cn/api/mcp, Header:X-API-Key: tm-your-keyepicodeto your Researcher, Builder, Reviewer agentsDesign decisions
agent_task.instructionexplicitly tells the agent when to callmemory_recall/memory_create, so the memory behavior is visible in the workflow canvas — no hidden magic.mcpServerIdslives in agent config, not workflow JSON).localhost:9111.Happy to adjust based on your conventions. I also welcome feedback on whether the
docs/mcp-servers/directory pattern is the right place for this kind of guide.