Documentation, Quickstart

From zero to verified record.

Sign up, get your API key, make your first commit. No agent creation step. Your API key maps directly to your account, you start recording immediately.

Fastest path: under 2 minutes

Pick your path

Path 0

No signup

30 seconds

See DarkMatter work locally before creating an account.

Path 1

CLI

Under 2 minutes

Sign up, install, and record your first commit from the terminal.

Path 2

SDK integration

Under 5 minutes

Add DarkMatter to an existing agent pipeline in Python or TypeScript.

Path 0, See it work first

No account needed. Run the demo locally and see a full three-agent chain commit, replay, fork, and verify in your terminal.

bash
pip install darkmatter-sdk
darkmatter demo

You will see a researcher agent commit findings, a writer agent inherit that context, and a reviewer fork a branch, all with cryptographic integrity proofs. The whole chain is verifiable offline with the exported bundle.

When you're ready to record your own agents, come back and follow Path 1 or 2. Everything you saw in the demo is what your agents will produce.

Path 1, CLI quickstart

01

Sign up and get your API key

Go to darkmatterhub.ai/signup. Create your account. Your API key is on the dashboard, it starts with dm_sk_. Copy it. That's it. No agent creation step, no additional IDs to configure.

02

Install the SDK

bash
pip install darkmatter-sdk
03

Set your API key

bash
export DARKMATTER_API_KEY=dm_sk_your_key_here

Or add it to a .env file, the SDK reads it automatically.

04

Make your first commit

python
import darkmatter as dm

ctx = dm.commit(payload={
    "input":  "Analyze Q1 earnings",
    "output": "Revenue up 34% YoY, driven by enterprise.",
    "model":  "claude-sonnet-4-6",
})

print(ctx["id"])            # ctx_7f3a9b...
print(ctx["integrity"])     # {"payload_hash": "sha256:...", "verification_status": "valid"}
print(ctx["verify_url"])    # darkmatterhub.ai/r/ctx_7f3a9b
No agent ID required. Your API key identifies you. DarkMatter auto-provisions your account identity on first commit. Share the verify_url with anyone, they can verify the record without logging in.
05

Open your verify URL, this is your record

python
print(ctx["verify_url"])
# → https://darkmatterhub.ai/r/ctx_7f3a9b...
#
# Open that URL. Your record is there, sealed, hash-chained,
# independently verifiable. Share it with anyone.
# They can verify it without a DarkMatter account.
# That URL is the product.
This is the aha moment. You just created an independent, tamper-evident record of what your agent decided. Open the URL, share it, or pass it to an auditor. Anyone can verify it, no login, no account, no asking you to vouch.
06

Replay, fork, and export

python
# Verify chain integrity
proof = dm.verify(ctx["id"])
print(proof["chain_intact"])  # True

# Export a self-contained proof bundle, verifiable offline
bundle = dm.bundle(ctx["id"])
# → darkmatter_proof_bundle.json
# → python verify_darkmatter_chain.py bundle.json
# No DarkMatter dependency. No internet. No account.

Path 2, SDK integration

Add DarkMatter to an existing pipeline. Follow steps 1,3 from Path 1 to get your API key, then drop in one of these patterns.

Python, record a chain

python
import darkmatter as dm

parent_id = None

# Each step links to the previous, builds a verifiable chain
for step_input, step_output in pipeline_steps:
    ctx = dm.commit(
        payload={"input": step_input, "output": step_output},
        parent_id=parent_id,
    )
    parent_id = ctx["id"]

# Replay the full chain root to tip
chain = dm.replay(parent_id)
for step in chain["replay"]:
    print(step["step"], step["payload"]["output"])

TypeScript, same pattern

typescript
import { commit, replay, verify, bundle } from 'darkmatter-js';
// DARKMATTER_API_KEY read from process.env automatically

let parentId: string | undefined;

for (const { input, output } of pipelineSteps) {
  const ctx = await commit({ payload: { input, output }, parentId });
  parentId = ctx.id;
}

const chain = await replay(parentId!);
const proof = await verify(parentId!);
console.log(proof.chain_intact); // true

Plain HTTP, no SDK required

bash
curl -X POST https://darkmatterhub.ai/api/commit \
  -H "Authorization: Bearer dm_sk_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "payload": {
      "input":  "Analyze contract clause 4.2",
      "output": "Clause 4.2 contains non-standard indemnity terms.",
      "model":  "claude-sonnet-4-6"
    }
  }'

# Returns: {"id": "ctx_...", "integrity": {...}, "verify_url": "..."}
Existing code using agent IDs. If you previously used to_agent_id or DARKMATTER_AGENT_ID, those still work, they're now optional. Your API key is the identity. Drop the agent ID requirement from new code.

Next steps