Akashik Protocol
Docs

Quickstart

Get two agents sharing memory in under five minutes.

Install

npm install @akashikprotocol/core
@akashikprotocol/core v0.2.0 is live on npm. Full Level 0 conformance plus selected Level 1 operations: DEREGISTER, RETRACT, SUPERSEDE, and conflict detection via reckon.

Level 0 — Two agents, shared memory

import { createField } from '@akashikprotocol/core'

const field = createField()

// Register agents with roles
await field.register({ id: 'researcher', role: 'researcher' })
await field.register({ id: 'strategist', role: 'strategist' })

// Write with mandatory intent — the why, not just the what
await field.write({
  entry: { topic: 'market-size', content: 'European SaaS growing at 23% CAGR' },
  intent: 'validate market size assumption for go-to-market strategy',
  agent: 'researcher',
})

// Reckon: relevant entries + conflict detection in one call
const result = await field.reckon({ agent: 'strategist', topic: 'market-size' })

console.log(result.entries[0].entry.content)
// → 'European SaaS growing at 23% CAGR'

console.log(result.entries[0].relevance_score)
// → 0.85

console.log(result.conflicts)
// → [] — no conflict yet

That's Level 0. Two registered agents, one write, one reckon. The Field handles scoring and delivery.

Conflict detection

reckon surfaces mechanical conflicts — entries from different agents with the same topic but mismatched values on shared keys:

await field.write({
  entry: { topic: 'market-size', cagr: '23%' },
  intent: 'market size from three analyst reports',
  agent: 'researcher',
})

await field.write({
  entry: { topic: 'market-size', cagr: '14%' },
  intent: 'revised projection after reviewing Q4 earnings directly',
  agent: 'fact-checker',
})

const result = await field.reckon({ agent: 'writer', topic: 'market-size' })

console.log(result.conflicts)
// [{ keys: ['cagr'], a: researcher entry, b: fact-checker entry }]
// The protocol surfaces the disagreement. You decide what to do.

Draft mode

Write to a private scratchpad before publishing to the shared field:

// Draft is only visible to its author
const draft = await field.draft({
  entry: { topic: 'competitor', price: '$39/mo' },
  intent: 'preliminary pricing — needs verification',
  agent: 'researcher',
})

// Publish when ready
await field.commit({ id: draft.id, agent: 'researcher' })

// Or discard
// await field.discard({ id: draft.id, agent: 'researcher' })

Retract and supersede

// Retract: withdraw an entry (author only, idempotent)
await field.retract({ id: 'entry-id', agent: 'researcher' })

// Supersede: replace with a newer entry (any agent)
await field.supersede({
  id: 'entry-id',
  entry: { topic: 'market-size', cagr: '19%' },
  intent: 'updated with revised methodology from full-year dataset',
  agent: 'fact-checker',
})

Retracted and superseded entries are excluded from attune and reckon results automatically.

What's coming

v0.2 is in-memory only. Upcoming releases add:

VersionWhat it adds
v0.3Persistent storage, append-only event log, Lamport clocks, confidence on writes
v0.4Vector embeddings, semantic relevance scoring (Level 2)
v0.5Transport bindings: MCP server, HTTP REST (Level 3)

Next

The Field

The shared memory space all agents operate within.

Writing with Intent

Entries, topic conventions, and why intent is mandatory.

Attunement

How agents receive relevant context without querying.

Conformance Levels

Adopt as little or as much as you need.