Case study: agent harnesses

Agent harnesses change. Memory should stay put.

Use RushDB as the durable memory layer behind Claude Desktop, Cursor, custom SDK agents, and orchestration frameworks so each harness can inspect the same structure and continue the same work.

Harness-specific memory turns every tool change into a migration.

Agent stacks move quickly. A workflow may start in an MCP client, shift into a backend SDK worker, and later run inside a custom orchestration framework. If memory belongs to the harness, each move requires replaying transcripts, remapping state, or losing context.

Before

  • Facts stored in framework-specific session state
  • Tool results trapped inside one harness transcript
  • Prompt migrations before a new agent can continue
  • No shared schema for agents to inspect before querying

With RushDB

  • Facts, episodes, references, and runs stored as Records
  • MCP clients and SDK workers read the same graph
  • Ontology gives each harness the live labels and fields
  • Provider and harness runs stay auditable without owning memory

Graph intelligence on ingest

Incoming data becomes queryable graph context.

RushDB turns structured data into graph-ready context without a separate modeling pipeline. Structure already encoded in a nested payload is linked immediately. For flat records imported from scattered sources, relationship analysis can propose stable cross-source patterns.

01

Normalize as data arrives

Import JSON or CSV. RushDB infers property types and adds new fields to the live, queryable ontology without a schema migration.

02

Auto-link nested structure

Nested objects become connected records automatically, preserving the parent-child graph structure already encoded in your payload.

03

Enrich scattered sources

After flat imports or schema changes, analyze the project ontology. RushDB can suggest join patterns and semantic relationship types for your review.

Suggested relationship analysis requires an LLM configured for the project. Suggestions stay in draft form until you approve them, so inferred domain meaning never mutates the graph silently. You can also add explicit relationships through the SDK or API.

Review suggested relationship patterns

Data model

One flexible graph for the workflow.

Start with the payload shape your product already produces. RushDB stores it as Records, infers typed properties, and keeps nested or approved domain relationships queryable.

Schema sketch
Harness-neutral memory

MCP clients, SDK workers, and orchestration frameworks write run metadata without owning the durable memory.

{
  "accountId": "acme-01",
  "FACT": [{ "key": "renewalLanguage", "value": "Spanish", "active": true }],
  "EPISODE": [{ "summary": "Renewal workflow started in Claude Desktop." }],
  "REFERENCE": [{ "sourceId": "crm-note-19", "kind": "crm_note" }],
  "HARNESS_RUN": [
    { "harness": "claude-desktop", "runId": "run-mcp-01", "status": "completed" },
    { "harness": "backend-sdk-worker", "runId": "run-sdk-02", "status": "queued" }
  ]
}

Working example

Move from an MCP client to a backend worker.

An MCP-connected assistant stores a customer episode. A later SDK worker retrieves the same account facts, relevant episodes, references, and provider runs without relying on the original transcript.

Input
ACCOUNT acme-01
  FACT renewal_language: "Spanish"
  EPISODE "Customer asked for renewal summary"
  PROVIDER_RUN claude-desktop
  REFERENCE support-ticket-884
Query
{
  "labels": ["EPISODE"],
  "propertyName": "summary",
  "query": "How should this renewal workflow continue?",
  "where": { "ACCOUNT": { "accountId": "acme-01" } }
}
Result
{
  "accountId": "acme-01",
  "activeFact": "Send renewal summaries in Spanish",
  "episode": "Customer asked for renewal summary",
  "nextHarness": "backend-sdk-worker"
}

TypeScript SDK

Load the same memory from any harness.

This is the core pattern from the singleton-memory demo: load ontology first, retrieve scoped records and semantic episodes, then let the current harness act on durable state.

Implementation blueprint

Build the harness-portability path.

This blueprint uses the singleton-memory implementation path: provider and harness runs write to one RushDB memory graph while reusable facts, episodes, and references stay independent of the runtime.

  1. 01Put memory writes behind one application-owned interface
  2. 02Let MCP clients and SDK workers call the same RushDB-backed memory tools
  3. 03Load ontology before each harness plans queries or writes
  4. 04Store harness/provider runs as audit records
  5. 05Keep durable facts, episodes, references, and tool output reusable across runtimes

Build path

  • Expose the same memory operations through MCP tools and SDK endpoints.
  • Store FACT, EPISODE, REFERENCE, PROVIDER_RUN, and HARNESS_RUN records.
  • Use ontology so each harness queries real labels and properties.
  • Keep prompts and harness state disposable; keep records durable.

Relevant docs

Read the exact primitives behind this pattern.

These links point to the RushDB docs pages that map directly to this case study: ingestion, labels, properties, values, SearchQuery, relationships, semantic search, MCP, or deployment.

How it works

Build the smallest useful workflow first.

01

Put memory behind the harness

Route MCP tools, SDK workers, and provider callbacks through one memory interface that writes Records instead of harness-specific session blobs.

02

Expose structure before action

Load ontology so the current harness sees labels, fields, and relationships before constructing queries or tool plans.

03

Track runs without coupling to them

Write provider and harness runs as audit records, but keep reusable facts, episodes, references, and tool outputs in the shared graph.

Know where it fits.

Portability is an application contract

RushDB keeps the memory graph durable and inspectable. Your application still defines which harnesses may read, write, approve, or mutate workflow state.

MCP and SDK should expose the same capability

When a RushDB capability exists in the API, expose the equivalent path through SDKs and MCP tools where possible so harness changes do not fork the memory model.

Questions developers ask.