Akashik Protocol
Reference

register / deregister

Establish and remove agent sessions in the Field.

register()

Registers an agent with the Field, establishing a session with a declared role. Registration unlocks role-based relevance scoring in attune() and reckon().

Signature

field.register(input: RegisterInput): Promise<RegisterResult>

type RegisterInput = {
  id: string
  role: string
  capabilities?: string[]
}

type RegisterResult = {
  field_capabilities: string[]
  field_protocol_version: string  // always "0.2" in this release
  session_id?: string
}

Parameters

ParameterRequiredDescription
idUnique agent identifier. Must be non-empty and non-whitespace.
roleThe agent's declared role (e.g. 'researcher', 'strategist'). Used for relevance scoring.
capabilitiesAdvisory list of what the agent can do. The Field records it but does not enforce it in v0.2.

Behavior

  • Re-registering an existing id replaces the previous session.
  • Registration is not required to call write() or read(), but it enables role-based scoring and the ability to set agent on writes in a way the Field recognises.
  • field_capabilities in the response lists operations the Field supports. In v0.2 this is the full operation set.

Errors

CodeWhen
AGENT_REQUIREDid or role is missing, empty, whitespace-only, or not a string
INVALID_ENTRYcapabilities is provided but is not an array of strings

Example

const result = await field.register({
  id: 'researcher',
  role: 'researcher',
  capabilities: ['web-search', 'document-analysis'],
})

console.log(result.field_protocol_version) // '0.2'
console.log(result.field_capabilities)
// ['register', 'deregister', 'write', 'read', 'attune', 'reckon',
//  'draft', 'commit', 'discard', 'retract', 'supersede']

deregister()

Removes an agent's session from the Field.

Signature

field.deregister(input: { id: string }): Promise<void>

Behavior

  • Idempotent — deregistering an unknown id succeeds silently.
  • The agent's previously written entries remain in the Field after deregistration. They are not deleted or modified.
  • After deregistration, attune() and reckon() calls from that agent id will no longer benefit from registered role matching.

Example

await field.deregister({ id: 'researcher' })
// No error if 'researcher' was already removed