Skip to content
Contexta
Docs

Quickstart and concepts

Install the SDK, ingest your first context, and fire your first Reflex in minutes. The full developer reference — API surface, CLI, SDKs, Reflex DSL — lives on the docs subdomain.

Quickstart

Four steps from cold install to your first reactive firing.

  1. Install the SDK

    Add the Contexta SDK to your TypeScript or Node service. A Python SDK ships alongside the TS one.

    npm install @contexta/sdk
  2. Initialise the workspace

    Scaffold a `contexta.config.ts` and pick a namespace. The CLI walks you through API key + region.

    npx contexta init
  3. Ingest your first context

    Send a document, conversation, or event. Contexta extracts entities, embeds, and writes provenance edges.

    import { Contexta } from '@contexta/sdk';
    
    const ctx = new Contexta({ apiKey: process.env.CONTEXTA_API_KEY });
    
    await ctx.ingest({
      content: 'Alice prefers async standups and dark-mode dashboards.',
      userId: 'alice',
      tags: ['onboarding'],
      namespace: 'org_acme',
    });
  4. Fire your first Reflex

    Declare a reactive trigger in CX. Reflexes fire with full provenance — what matched, why, and where it came from.

    reflex:
      name: supplier_alert
      description: Alert when a supplier flips to bankrupt.
      trigger:
        cx: (c:company) -[:supplies]-> (us) AND (c @status: * -> "bankrupt")
        on: node(company:updated)
      action:
        url: https://hooks.example.com/supplier
      cooldown: 1h

Concepts

The vocabulary you need to read the rest of the docs. Each tile links to a glossary entry or feature leaf.

Context Graph

The unified graph of entities, embeddings, and provenance edges — the substrate every recall reads from.

Read more →

Context Packet

The structured, provenance-tracked output primitive returned by Recall and Reflex firings.

Read more →

Reflex

A declarative reactive trigger expressed in CX. Compiles into Graphlets and StateWatches.

Read more →

Synapta

The proprietary graph memory engine that owns the Context Graph and reactive pipeline.

Read more →

Time Travel

Bi-temporal recall via `valid_at` + `learned_at`. Ask what was known on a given day.

Read more →

Forget

Surgical, GDPR-shaped right-to-be-forgotten with provenance-preserving tombstones.

Read more →

Examples

The three calls every Contexta integration ends up making.

Ingest a conversation

await ctx.ingest({
  content,
  userId: 'alice',
  tags: ['support', 'thread:42'],
  namespace: 'org_acme',
  ttl: '90d',
});

Recall with provenance

const result = await ctx.recall({
  query: 'Where did Alice work?',
  userId: 'alice',
  asOf: '2025-03-15T00:00:00Z',
  minConfidence: 0.85,
});

// returns what was known *at that time*, with full source attribution
console.log(result.citations);

Register a reactive Reflex

await ctx.signals.create({
  name: 'supplier_alert',
  condition: { pattern: 'a company that supplies to us changes status' },
  action: { type: 'webhook', webhookUrl: 'https://hooks.example.com/supplier' },
});

Ready to wire it into your agent?

Spin up a workspace, or read the full developer reference on the docs subdomain.