Skip to content

Forkable reference agent templates: research, RAG, and monitor over the MCP triad #28

Description

@harrymove-ctrl

Context

There are no examples/ and no Nexus/Talus 'first agent call' onboarding (roadmap §5 gaps). Agent builders have to reverse-engineer how to drive contextmem_extract/recall/remember from the MCP server in packages/mcp. The roadmap calls for 2-3 runnable templates plus a sample Nexus DAG that calls a tool and emits an on-chain receipt.

Goal / user story

As an agent builder, I want forkable starter templates that already wire the ContextMEM triad over MCP for the three obvious patterns — research, RAG chat, and change-monitoring — so I can clone one, point it at my namespace, and have a working Sui-native agent in minutes.

Acceptance criteria

  • examples/research-agent/ — a minimal TS/LangGraph (or plain MCP-client) agent that runs extract over N sources, remembers them to a namespace, then recalls to answer a question; runnable with documented env.
  • examples/rag-chat/ — a recall-grounded chat loop that calls recall (with includeSources) against the hosted MCP namespace and cites sources per turn.
  • examples/monitor-agent/ — a scheduled agent that re-extracts a target, diffs vs the prior run, and remembers only the delta (mirroring the live */30 freshness pattern), printing 'what changed'.
  • A combined mcpServers JSON example shows ContextMEM (and optionally a second MCP) configured together for Claude/Cursor, including the read-token header for private namespaces.
  • examples/nexus-dag/ — a sample Talus/Nexus DAG (or a clearly-labeled scaffold) that calls one triad tool as a node and shows where the attribution receipt id flows into parents of the next node.
  • Each template has its own README (prereqs, env, run command) and an examples/README.md index; CI or a documented bun command can at least typecheck the templates.

Implementation notes

  • Add a top-level examples/ dir; templates consume the published @contextmem/mcp (or the hosted URL via mcp-remote) — keep them decoupled from monorepo internals so they're genuinely forkable.
  • Reuse the canonical triad I/O schemas (from the triad issue) as the typed contract; the monitor template should reuse diffRunSnapshots semantics and the delta-write path (rememberSnapshotDelta) conceptually.
  • The nexus-dag example should reference the receipt envelope returned by the tools (receipt.id, parents) so it doubles as the 'first Nexus call' doc; mark clearly which parts are live vs awaiting the Move receipt module.
  • Gotcha: private namespaces need the Authorization: Bearer <read-token> header — make this explicit in every template's config so users don't hit silent 401s.
  • Keep secrets out of committed examples; use .env.example per template.

Sui Overflow angle

These templates are the agent-ecosystem on-ramp for Sui Overflow: research/RAG/monitor are the canonical agent shapes, and shipping them pre-wired to a Walrus-backed, receipt-emitting memory layer lets other hackathon teams build Sui-native agents on top of ContextMEM. The Nexus DAG example is the concrete 'compose ContextMEM into a Talus pipeline' artifact judges can run.

Dependencies

Depends on the canonical triad issue (stable tool contract). Soft-depends on the publish issue (@contextmem/mcp for clean installs) and the on-chain attribution-receipt issue (for the Nexus DAG receipt flow).

Part of the ContextMEM roadmap (#4) • Sui Overflow build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Post-demo: distribution, polish, and reliabilityagent-talusTalus/Nexus agent integration and attribution receiptsfeatureUser- or agent-facing capabilityonboardingUser and developer onboarding / first-run experience

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions