Skip to main content

Primitive types

All fields in the API use these core primitive types:
TypeDescriptionFormatExample
EventIdUnique event identifieru128 (UUID as 128-bit integer)123456789012345678901234567890
TimestampHigh-precision timestampu64 (nanoseconds since Unix epoch)1738425600000000000
AgentIdAgent identifieru641
AgentTypeAgent classificationString"movie-bot"
SessionIdSession identifieru645001
GoalIdGoal identifieru64101
ContextHashContext fingerprintu64 (computed hash)12345678901234
NodeIdGraph node identifieru6442
MemoryIdMemory identifieru64789
Timestamps are nanoseconds since Unix epoch. In JavaScript: Date.now() * 1_000_000.

Event structure

The Event object is the core data structure. Every interaction enters Minns Memory Layer as an event.
{
  "id": 123456789012345678901234567890,
  "timestamp": 1738425600000000000,
  "agent_id": 1,
  "agent_type": "movie-bot",
  "session_id": 5001,
  "event_type": { "..." : "..." },
  "causality_chain": [],
  "context": { "..." : "..." },
  "metadata": {},
  "context_size_bytes": 0,
  "segment_pointer": null
}
FieldTypeRequiredDefaultDescription
idu128⚙️ AutoAuto-generatedUnique event identifier
timestampu64⚙️ AutoAuto-generatedNanoseconds since Unix epoch
agent_idu64✅ YesAgent that generated this event
agent_typeString✅ YesAgent classification
session_idu64✅ YesSession identifier
event_typeEventType✅ YesType and payload (see event types)
causality_chainEventId[]No[]Parent event IDs
contextEventContext✅ YesEnvironmental context (see below)
metadataMap<String, MetadataValue>No{}Additional metadata
context_size_bytesusizeNo0Size of context in bytes
segment_pointerString | nullNonullPointer to segment storage

EventContext structure

Every event carries a context object describing the environment at the time of the event.
{
  "environment": {
    "variables": { "user_id": "user_99" },
    "spatial": null,
    "temporal": {
      "time_of_day": null,
      "deadlines": [],
      "patterns": []
    }
  },
  "active_goals": [
    {
      "id": 101,
      "description": "book_movie",
      "priority": 0.9,
      "progress": 0.5,
      "deadline": null,
      "subgoals": []
    }
  ],
  "resources": {
    "computational": {
      "cpu_percent": 10.0,
      "memory_bytes": 1024,
      "storage_bytes": 1024,
      "network_bandwidth": 100
    },
    "external": {}
  },
  "fingerprint": 0,
  "embeddings": null
}
FieldTypeRequiredDefaultDescription
environmentEnvironmentState✅ YesEnvironment state
active_goalsGoal[]✅ YesActive goals (can be [])
resourcesResourceState✅ YesResource availability
fingerprintu64⚙️ Auto0Server auto-computes if 0
embeddingsf32[] | nullNonullContext embeddings

EnvironmentState

FieldTypeRequiredDescription
variablesMap<String, JSON>✅ YesKey-value pairs
spatialSpatialContext | nullNoSpatial information
temporalTemporalContext✅ YesTemporal information

TemporalContext

FieldTypeRequiredDescription
time_of_dayTimeOfDay | nullNoCurrent time
deadlinesDeadline[]✅ YesActive deadlines (can be [])
patternsTemporalPattern[]✅ YesRecurring patterns (can be [])

Goal

FieldTypeRequiredRangeDescription
idu64✅ YesAnyGoal identifier
descriptionString✅ YesHuman-readable description
priorityf32✅ Yes0.01.0Priority level
progressf32✅ Yes0.01.0Completion progress
deadlineu64 | nullNoTimestampOptional deadline
subgoalsu64[]✅ YesChild goal IDs (can be [])

ComputationalResources

FieldTypeRequiredRangeUnit
cpu_percentf32✅ Yes0.0100.0Percentage
memory_bytesu64✅ YesAnyBytes
storage_bytesu64✅ YesAnyBytes
network_bandwidthu64✅ YesAnyBytes/sec

MetadataValue

Metadata values are typed wrappers:
{ "String": "text value" }
{ "Integer": 123 }
{ "Float": 45.67 }
{ "Boolean": true }
{ "Json": { "any": "json" } }
Store fields you need to filter by (like user_id) in the metadata object. This makes them searchable in the graph layer.

Value constraints

Numeric ranges:
  • priority, progress, confidence: 0.0 to 1.0
  • cpu_percent: 0.0 to 100.0
  • hour: 0 to 23
  • minute: 0 to 59
ID fields:
  • EventId is a u128 (128-bit integer)
  • All other IDs are u64 (64-bit integers)
String fields:
  • Cannot be empty unless explicitly noted
  • agent_type, action_name, description must be non-empty
Array fields:
  • Can be empty [] unless explicitly required to have elements