Blueprint: 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, storing ACCOUNT-scoped FACT, EPISODE, REFERENCE, and PROVIDER_RUN records so each harness can load the same schema and continue the same work. A workflow started in an MCP client can hand off to a backend SDK worker without replaying transcripts.

Agent harness portability is a RushDB blueprint for storing FACT, EPISODE, REFERENCE, and PROVIDER_RUN records outside any single agent runtime, so MCP clients, SDK workers, and orchestration frameworks can all read and continue the same memory graph.

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

Agent stacks move quickly: a workflow may start inside Claude Desktop as an MCP client, shift into a backend SDK worker, and later run inside a custom orchestration framework. If FACT and EPISODE data belong to the harness instead of a shared graph, each move forces someone to replay transcripts, remap PROVIDER_RUN state, or lose the renewal_language fact and support-ticket REFERENCE entirely, leaving the next harness to start the account context from zero.

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
  • Schema 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.

ACCOUNT-scoped FACT, EPISODE, REFERENCE, and PROVIDER_RUN records arrive from whichever harness is active, whether that is an MCP tool call or an SDK worker. RushDB types each record on arrival and keeps accountId as the shared key, so a fact like renewal_language and an episode summary stay attached to the same ACCOUNT regardless of which runtime wrote them.

01

Normalize as data arrives

FACT, EPISODE, and PROVIDER_RUN records are typed on write so accountId, summary text, and run metadata are queryable the same way from any harness.

02

Auto-link nested structure

When an ACCOUNT payload nests FACT, EPISODE, and REFERENCE entries, those become relationships automatically instead of separate disconnected tables per harness.

03

Enrich scattered sources

Suggested relationship analysis flags recurring accountId and ticket-reference keys across PROVIDER_RUN and REFERENCE records so a new harness inherits the full context graph.

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 schema first, retrieve scoped records and semantic episodes, then let the current harness act on durable state.

from rushdb import RushDB

db = RushDB('RUSHDB_API_KEY')

schema = db.ai.get_schema_markdown({
    'labels': ['ACCOUNT', 'FACT', 'EPISODE', 'REFERENCE', 'PROVIDER_RUN'],
}).data
facts = db.records.find({'labels': ['FACT'], 'where': {'active': True, 'ACCOUNT': {'accountId': 'acme-01'}}, 'limit': 20})
episodes = db.ai.search({
    'labels': ['EPISODE'],
    'propertyName': 'summary',
    'query': 'How should this renewal workflow continue?',
    'where': {'ACCOUNT': {'accountId': 'acme-01'}},
    'limit': 5,
})

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 schema 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 schema 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 blueprint: 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 schema 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.