Skip to content
Contexta
The context harness for production agents

Stop your AI agents from acting on stale, missing, or unverifiable context.

Drop-in memory, multi-hop reasoning, and reactive triggers — every Context Packet ships with a receipt: source, time, confidence, hop chain.

  • Open-core · MIT SDK
  • REST + MCP transport
  • Self-hosted available

Works with LangGraph, CrewAI, Claude Agent SDK, AgentCore, OpenHarness

  • LangGraph
  • CrewAI
  • Claude Agent SDK
  • AgentCore
  • OpenHarness
SOC 2 Type II · in progress
§ 01 / The shift

The shift

2025 was the year of agents. 2026 is the year of the harness.

The model is commodity — Claude, GPT, Gemini all perform similarly. The harness is the moat. Inside the harness, context is the hardest unsolved piece: what the agent sees, when it sees it, and why it should believe it. Contexta is that layer, with receipts.

§ 02 / Primitives

Three verbs. Everything else is detail.

Contexta exposes a tiny disclosure surface — three primitives — that compose into every memory, retrieval, and proactive-agent pattern teams actually need.

Ingest

agent push event → graph update

Push any signal — a Slack message, a contract diff, a market tick — and Contexta resolves it into the graph with provenance.

// stream any event into the context graph
await contexta.ingest({
  source: "slack://acme/#renewals",
  event:  message,
  body:   "marcus left last week",
  hop:    ["sfdc:opp:9912"]
});

Memory

agent query → Context Packet with provenance

Ask in natural language; receive a Context Packet — claim, source, confidence, hop chain, temporal window — never a fuzzy chunk.

// query returns a Context Packet, not chunks
const packet = await contexta.recall({
  query:    "who owns acme renewal",
  as_of:    "2026-05-15",
  min_conf: 0.85
});
packet.provenance.verify();

Reflex

Reflex DSL → proactive Context Packet when conditions converge

Declare a trigger; Contexta watches the graph and pushes a Context Packet to your agent the moment conditions converge.

// fires when 3 conditions converge
contexta.reflex("renewal-at-risk")
  .when("contact.left")
  .and("ticket.open")
  .and("renewal.within", "60d")
  .push(agent.handle);
§ 03 / The concrete noun

The Context Packet.

Every recall, every Reflex firing, every cascading update returns this shape. No naked strings, no fuzzy chunks — a single auditable object your agent acts on.

  • source_uri
    Canonical URI of the originating system + record.
  • timestamp
    ISO-8601, with both ingest-time and observed-time.
  • confidence
    Calibrated score, [0–1], from a Bayesian fusion of corroboration.
  • hop_chain
    Ordered list of edges traversed to reach the claim.
  • temporal_window
    How long this claim remains valid; auto-expires on update.
  • actions[]
    Surfaces actions the agent is permitted to take on this claim.
  • constraints
    Policy, RBAC, GDPR-scope, retention class, residency.

This is the unit your agent acts on. Every field is auditable. Every claim is defensible.

§ 04 / The hard problems

Ten failure modes your RAG stack quietly ships.

These aren't edge cases — they're the everyday reasons agents lose customer trust, miss renewals, hallucinate citations, and quietly act on stale facts. Click any row.

Contradiction Detection
✕ Pain todayTwo retrieved chunks disagree silently. The agent picks one, usually the most recent, and answers with conviction.
✓ With ContextaContexta surfaces contradictions as first-class signals. The Context Packet returns both claims, marks the lower-confidence one as superseded, and exposes the diff to the agent.
Multi-Hop Reasoning
✕ Pain todayVector RAG retrieves a single neighborhood. Anything two hops away — vendor → contract → renewal date — is lost in cosine soup.
✓ With ContextaThe Context Graph traverses up to N hops with a calibrated decay. Every Packet carries the explicit hop_chain — your agent knows exactly how it got there.
Temporal Reasoning
✕ Pain todayStale facts get retrieved as if they were current. "Renewal date" from a year ago beats a one-week-old update because the embedding is denser.
✓ With ContextaEvery claim carries an observed_at + a temporal_window. Recall accepts an as_of= parameter; expired claims are filtered or returned with an explicit stale flag.
Cross-Session Goal Tracking
✕ Pain todayLong-horizon agents lose the thread. Goals declared in session 3 are forgotten by session 14; subgoal status drifts and nothing reconciles it.
✓ With ContextaGoals live in the graph as durable nodes with status edges. Reflex fires when subgoals stall, change owner, or contradict the parent goal across sessions.
Cascading Context Updates
✕ Pain todayA vendor changes their pricing PDF. The five answers your agents already gave based on the old version are now wrong and nobody is notified.
✓ With ContextaUpdates propagate through the dependency graph. Every downstream Packet that referenced the old claim is invalidated; Reflex re-runs affected workflows.
Adversarial Provenance
✕ Pain todayAn agent quotes a customer back to themselves with an almost-right phrase. The customer notices the difference. Trust evaporates.
✓ With ContextaEvery quote-bearing Packet ships with an exact-span pointer into the source. The agent literally cannot fabricate a citation — the field is either present or absent.
Selective Forgetting
✕ Pain todayA user invokes their GDPR right to deletion. You now have to find every chunk, embedding, summary, and inferred claim that touched their data. Good luck.
✓ With ContextaForgetting is a graph operation, not a vector hunt. Contexta tombstones the user node and propagates erasure across all derived Packets — with a signed proof of deletion.
Confidence-Aware Retrieval
✕ Pain todayVector search returns top-k with no notion of belief. An LLM gets a 0.31-similarity chunk treated identically to a 0.92 one and weighs them equally.
✓ With ContextaRecall accepts min_conf=, returns calibrated [0–1] scores fused across corroborating sources. Below-threshold claims surface as "insufficient evidence" instead of fabrication fuel.
Proactive Agents
✕ Pain todayYour agent only acts when prompted. The renewal-at-risk signal sits across three systems and nobody connects it until the customer churns.
✓ With ContextaReflex DSL declares the conjunction; Contexta watches the graph and pushes a Context Packet to the agent the moment the conditions converge. No polling.
Complex Trigger Conditions
✕ Pain todayZapier-style logic flattens at 5 steps. "X AND Y AND (Z within 60d) UNLESS W" is unrepresentable; teams write fragile Python instead.
✓ With ContextaReflex DSL is a small declarative language for conjunctions, temporal windows, NACK conditions, and graph-shape predicates. Twenty-step Zaps collapse to ten lines.
§ 05 / Case study · Decode-Markets

Built for analytical pipelines that demand provenance.

Every stylized fact in a quantitative model must be measure-variable-precise: daily log-returns, not returns; realized volatility (5-min mid-price log-returns, annualized), not volatility; Pearson correlation of daily log-returns, not correlation.

Contexta encodes that precision as graph metadata — every claim ships with its sample period, measure variable, source paper, and confidence. Reflex DSL fires when an anomaly’s t-statistic drops below the 3.0 Harvey-Liu-Zhu threshold, or when realized volatility, cross-sectional dispersion, and Pearson correlation converge on a regime-transition signature.

  • Stylized facts as graph nodes — measure variable, sample period, source DOI, confidence.
  • Reflex triggers on t-stat decay, regime convergence, cross-asset dispersion blowouts.
  • Audit-grade replay: every signal carries the exact paper and the exact estimator.
Three-step demo: Ingest a stylized-fact paper, recall the leverage-effect claim, return a fully typed receipt Context Packet.
Ingest
contexta.ingest("Cont (2001), 10.1080/713665670", schema: "stylized_fact")
Recall
contexta.recall("leverage effect in equity indices")
Receipt
claimPearson correlation of daily log-returns with future realized volatility (5-min mid-price log-returns, annualized) ≈ −0.3 to −0.7
measure_varρ(r_t, RV_(t+1))
sample_period1962–1999 · S&P 500
sourceCont, R. (2001). Quantitative Finance 1(2)
doi10.1080/713665670
confidence0.94
corroboration4 papers, 0 contradicting
§ 06 / Regulated industries
Regulated industries

Legal contradiction. Healthcare confidence. Finance audit trails.

Lead with the selective-forgetting / GDPR story. Contexta treats erasure as a graph operation: tombstone the subject, propagate to every derived Packet, return a signed proof of deletion.

  • Legal — contradiction detection between MOU drafts, with the exact clause-span surfaced.
  • Healthcare — confidence-weighted retrieval; below-threshold claims surface as 'insufficient evidence', never as fact.
  • Finance — append-only audit log with 7-year retention, BYOK encryption, per-region residency.
  • Selective forgetting — GDPR-class subject deletion in <60s, with a verifiable receipt.
GDPR · subject deletion · receipt
Context Packet
subjectuser://acme/marcus.lee@acme
scopeall derived packets · all hop_chains
affected_nodes1,284
affected_packets47
elapsed38.2s
proofed25519:7b1c…f4a2 · signed by ops-key-04

# write-ahead-log entry + signed merkle inclusion proof; auditable forever.

§ 07 / Long-horizon coding agents
Long-horizon coding agents

Cross-session goals. Codebase-wide provenance. Reflex on cycles.

Coding agents lose track of intent across sessions, conflate yesterday's plan with today's, and trip on dependency cycles. Contexta keeps goals as durable graph nodes with status edges.

  • Cross-session goal graph — subgoal status survives compaction; nothing drifts silently.
  • File-, symbol-, and PR-level provenance for every claim the agent makes about your codebase.
  • Reflex on dependency-graph cycles, on test-flake clusters, on README/code drift.
  • Repo-scoped temporal windows — claims about a file expire when the file changes.
goal-graph · cross-session · acme/api
goal/q2-migration  ⟶ owner: agent#prod-7
  ├ subgoal/dep-graph-acyclic    ◔ ⨯ 4 cycles
  ├ subgoal/test-coverage-≥85    ● 87.2%
  ├ subgoal/api-contract-stable  ◐ 1 PR drift
  └ subgoal/migration-rollback   ○ pending

reflex#dep-cycle  ⟶ FIRED 12m ago
  → context_packet#9a1f
  → notified agent#prod-7
  → blocked merge of PR #2188
§ 08 / Customer-facing support agents
Customer-facing support agents

Adversarial provenance. Cascading updates. Zero fabricated quotes.

Support agents must never mis-quote a customer or paraphrase a vendor's SLA. Contexta forces every quote to carry an exact-span pointer — fabrication becomes structurally impossible.

  • Adversarial provenance — agents physically cannot synthesize a citation; the field is present or absent.
  • Cascading updates — vendor SLA changes invalidate every Packet that referenced the old version.
  • Stale-fact firewall — replies blocked when underlying claim's confidence drops below threshold.
  • Receipts surfaced in-product — customers see why the agent said what it said.
quote receipt · adversarial provenance
Context Packet
quoted"renewal terms are 30 days net from invoice"
sourcenotion://acme/contracts/v3 § 4.2
spanoffset:1284–1331 · line 47
verifiedexact-match · sha256 ok
windowvalid through 2026-08-12

# paraphrase attempted → blocked: no span match. agent fell back to verbatim.

§ 09 / Architecture

Contexta is the context box. The rest of your harness keeps its job.

A single replacement inside an existing harness, not a rewrite. Plug in next to your evals, your observability, your tool-execution layer.

§ 10 / Distribution & Access

Two transports. One contract.

Same primitives over REST or MCP — and the SDK, DSL, CLI, and local test harness are open source. Hosted infra is the part we operate.

REST + MCP

same API · two transports

Recall a Context Packet over the REST transport.
# recall a Context Packet over REST
curl https://api.contexta.dev/v1/recall \
  -H "authorization: bearer $CTX_KEY" \
  -H "content-type: application/json" \
  -d '{
    "query": "who owns acme renewal",
    "as_of": "2026-05-15",
    "min_conf": 0.85
  }'

Open-core

stated explicitly · buyers ask

Open source · MIT

  • @contexta/sdk
  • Reflex DSL · parser + runtime
  • contexta-cli
  • Local test harness
  • MCP transport adapter
  • Reference graph driver

Proprietary · hosted plane

  • Synapta inference engine
  • Event processing pipeline
  • Provenance & audit ledger
  • Multi-tenant infrastructure
  • Replication & residency mesh
  • Enterprise RBAC + SSO
§ 11 / Comparison

A 2×2, not a 12-row table.

Two axes that actually matter to agent teams: how much provenance the system exposes, and how reactive it is to graph state.

Vector RAG (top-k)
Memory libs
Graph DBs
Workflow tools
Agent frameworks
Contexta
  • vs. naive RAG (vector + top-k)
    Top-k vector retrieval is a starting point, not a finished product. Naive RAG has no concept of confidence, no temporal reasoning, no contradiction surfacing, no hop chain. Contexta keeps embeddings as one signal among many — fused with graph traversal, calibrated belief, and explicit time.
  • vs. memory libraries (mem0, zep, letta, …)
    Memory libraries solve one half: 'remember user preferences across sessions.' They don't solve provenance, multi-hop, contradiction, or reactivity. Contexta is the memory layer plus the receipt layer plus the trigger layer — and treats them as the same primitive.
  • vs. graph databases (neo4j, dgraph, kuzu, …)
    A graph DB gives you nodes and edges. It does not give you confidence fusion, temporal windows, calibrated retrieval, a Reflex DSL, or MCP-native packet shapes. Bring your own graph and we'll layer; or use ours and skip the integration.
  • vs. workflow automation (zapier, n8n, temporal, …)
    Workflow tools fire on simple webhooks. They flatten at conjunctions, miss temporal predicates, and have no notion of belief. Reflex DSL is a small declarative language for graph-shape triggers — Zaps in ten lines, with receipts.
  • vs. agent frameworks (LangGraph, CrewAI, Claude Agent SDK, …)
    We're a layer inside the harness, not a replacement for it. Frameworks orchestrate the loop; Contexta supplies the context box, with receipts, that the loop reads from. Same harness, sharper context.
§ 12 / Quickstart

From zero to a verified Context Packet in fifteen lines.

No abbreviation, no marketing JSON. The output below is the real shape your agent receives.

Install

node ≥ 18 · python ≥ 3.10 · go ≥ 1.21

$npm i @contexta/sdkcopy
import { Contexta } from "@contexta/sdk";

const ctx = new Contexta({ workspace: "acme" });

// 1. ingest a document
await ctx.ingest({
  source: "notion://acme/contracts/v3",
  body:   contractText,
  tags:   ["contract", "renewal"]
});

// 2. ask
const packet = await ctx.recall({
  query: "what are acme's renewal terms",
  min_conf: 0.85
});

// 3. inspect the receipt
console.log(packet.verify());

Output · ContextPacket

unabridged · paste-able into your agent loop

{
  "packet_id": "ctx_4f2a91c7b3",
  "claim_type": "contract.renewal_terms",
  "claim": "renewal terms are 30 days net from invoice, auto-renew unless 60d notice",
  "source_uri": "notion://acme/contracts/v3",
  "source_span": { "offset": 1284, "length": 47, "line": 47 },
  "observed_at": "2026-05-13T09:42:11Z",
  "ingested_at": "2026-05-13T09:42:13Z",
  "temporal_window": { "valid_until": "2026-08-12T00:00:00Z" },
  "confidence": 0.94,
  "corroboration": {
    "supporting": 3, "contradicting": 0,
    "sources": ["slack://acme/#renewals/01HFL", "sfdc:opp:9912", "docusign:env:bb1"]
  },
  "hop_chain": ["notion → docusign → sfdc"],
  "actions": ["quote", "escalate", "notify_owner"],
  "constraints": {
    "rbac": "cs-team", "pii": "masked", "residency": "us-east"
  },
  "signature": "ed25519:7b1c…f4a2"
}
§ 13 / Reflex DSL

One Reflex definition. Replace your 20-step Zap.

Reflexes are declarative. They watch your graph for a shape-and-time condition, and when the world matches they emit a Context Packet — once, with corroboration, signed.

# fires when a key contact leaves, a customer has an open ticket,
# AND renewal is within 60 days — pushed as a Context Packet
reflex: renewal-at-risk
version: 1

when:
  all_of:
    - event: contact.left
      where: contact.role == "renewal_owner"

    - graph_shape:
        subject: customer
        has: { ticket: open, support_tier: ≥ silver }

    - temporal: renewal.date within 60d

  unless:
    - customer.churned == true
    - renewal.paused == true

emit:
  packet: renewal-at-risk
  confidence: fused(contact, ticket, renewal)
  notify: [agent#cs-prod, slack://#renewals]
  debounce: 24h
  • lines 1–4Identity

    A header comment captures intent, then `reflex` + `version` name and version the rule for safe rollouts.

  • lines 6–9When · event

    First trigger condition: a `contact.left` event filtered to the workspace role that actually owns renewals.

  • lines 11–13When · graph shape

    Second condition is a structural query against the live graph — the customer must have an open ticket on Silver tier or above.

  • line 15When · temporal

    Third condition binds to time: renewal is within a rolling 60-day window. All three must hold for the reflex to fire.

  • lines 17–19Unless · guard rails

    Explicit suppression list. Churned or paused renewals short-circuit before any Packet is emitted.

  • lines 21–25Emit

    When the conditions match, emit a named Packet with a fused confidence, notify the configured agent and Slack channel, and debounce to once per 24h.

This is one Reflex definition. Replace your 20-step Zap.→ full DSL reference

§ 14 / Trust & security

Compliance is a graph operation, not a checklist.

Selective forgetting, audit-log retention, residency, and RBAC are first-class primitives — not bolt-ons.

  • Compliance

    SOC 2 Type II audit in progress, complete Q3 2026. HIPAA-ready BAA available on the Enterprise tier.

    • SOC 2 Type II
    • HIPAA-ready
    • ISO 27001 roadmap
  • Deployment

    Multi-tenant SaaS by default. Single-tenant, BYOC (AWS / GCP / Azure), and on-prem available on Enterprise.

    • SaaS
    • BYOC
    • On-prem
    • Air-gapped
  • Data residency

    Per-workspace pinning. Data never leaves your region; replication is opt-in and per-class.

    • us-east
    • us-west
    • eu-west
    • eu-central
    • ap-northeast
  • Encryption

    AES-256 at rest. TLS 1.3 in transit. BYOK via AWS KMS / HSM-backed. Field-level encryption for PII.

    • AES-256
    • TLS 1.3
    • BYOK
    • HSM
  • Selective forgetting · GDPR

    The hardest line item in agent infra. Contexta tombstones the subject node, propagates erasure through every derived Packet and hop chain, and emits a signed proof of deletion — verifiable forever. SLA: under 60 seconds for a typical workspace, under 24 hours for the largest tier.

    • GDPR Art. 17
    • CCPA
    • Signed proof-of-deletion
    • Append-only audit ledger
  • Access & audit

    Workspace-scoped RBAC with role inheritance, SCIM provisioning, SSO via SAML / OIDC, and a 7-year append-only audit log on the Enterprise tier. Every recall, ingest, and Reflex firing is logged with the actor identity and the packet hash.

    • RBAC
    • SCIM
    • SAML / OIDC
    • 7-year audit retention
§ 15 / Pricing

Pay for what your agent actually does.

Metered on ingest events, recall queries, and active Reflex triggers. The SDK is free forever — only the hosted plane meters.

  • Free

    Build, prototype, run the SDK locally. Open-source SDK is free forever; metering applies only to the hosted plane.

    $0

    / forever · dev

    • 1 workspace · 1 seat
    • 10K ingest events / mo
    • 5K recall queries / mo
    • 5 active Reflex triggers
    • Community Discord support
    Start free
  • Most teams start here

    Pro

    For startup teams shipping production agents. Pay only for what the agent actually does.

    $0.40

    / 1K ingest events · usage-metered

    • Unlimited workspaces · 10 seats
    • Metered ingest, recall, Reflex
    • SOC 2 (Type II in progress)
    • Email + chat support · 24h
    • BYOK encryption available
    • REST + MCP transports
    Start Pro trial
  • Enterprise

    For regulated and high-volume deployments. Single-tenant, on-prem, or BYOC; residency pinning; signed audit ledger.

    Volume

    · SLA · compliance

    • Unlimited everything
    • 99.95% SLA · 24/7 paging
    • Single-tenant · BYOC · on-prem
    • HIPAA BAA · GDPR DPA
    • Dedicated solutions engineer
    • Custom retention & residency
    Talk to an engineer
§ 16 / Social proof

Design partners across three buyer scales.

Indie hackers, platform teams, regulated enterprises. We didn't ship until each one had a Context Packet they could defend in a meeting.

  • We had a 12-hop reasoning bug we'd been chasing for months. The first Contexta recall returned the hop chain inline — we found the contradicting source in twenty minutes.
    Priya K.Platform lead · series-B fintech
    • 11.4kGitHub stars
      + 240 / wk
    • 3,820Discord members
      active
    • 812Weekly active workspaces
      + 18% MoM
  • Selective forgetting was the line item that killed three other vendors for us. Contexta returns a signed proof and we drop it straight into the DPIA.
    Sasha L.Privacy counsel · regulated enterprise
  • Replaced an 18-step Zap with eleven lines of Reflex DSL on the first try. The "and a third condition within 60 days" part used to be a Python service nobody owned.
    Marcus T.Indie · shipping a CS agent solo
  • The packet shape became our internal lingua franca. Eval team, prod team, and the agent itself all speak the same object.
    Lin H.Staff eng · platform-team buyer