Skip to content
Automation
Agent

observation-log-storage

Observational memory requires a `BuiltObservationLogStore` backend. The backend must implement `commitObservationLogBatch`. The observer does not fall back to separate observation and cursor writes.

GuideBOOST
From plugin
n8n
208k9 skills9 agents2 commands
Install
$ npx -y skills add n8n-io/n8n --agent claude-code

How it fires

How this agent gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.

Context preview

The summary Claude sees to decide when to auto-load this agent.

Observational memory requires a `BuiltObservationLogStore` backend. The backend must implement `commitObservationLogBatch`. The observer does not fall back to separate observation and cursor writes.

Agent definition

observation-log-storage.md

Observation log storage

Observational memory requires a `BuiltObservationLogStore` backend. The backend must implement `commitObservationLogBatch`. The observer does not fall back to separate observation and cursor writes.

Batch contract

`ObservationLogBatch` contains these fields:

  • `observationScopeId`: The source history stream.
  • `expectedCursor`: The complete stored cursor, or `null` if none exists.
  • `nextCursor`: The proposed history boundary. Its `updatedAt` is the batch time.
  • `entries`: Prepared observations with a marker, redacted text, token count,

creation time, and `parentIndex`. A parent index must reference an earlier entry in the same batch. Use `null` for a root entry.

The backend compares all expected cursor fields, including `updatedAt`. It must not move the message boundary backwards. Compare message timestamps first, then message IDs. An unchanged message boundary is valid when observations need to be rebuilt.

On success, the backend writes every entry and the next cursor atomically. It sets the cursor's `updatedAt` to the greater of the batch time and the previous value plus one millisecond. This revision prevents a successful rebuild from being replayed under a fixed clock.

Return `committed` after the complete batch is saved. Return `stale` without writes when the expected cursor does not match or the message boundary moves backwards. Propagate other persistence errors. A failed write must leave both observations and the cursor unchanged. A valid empty batch can advance the cursor without adding entries.

The observer reports a stale batch as a completed model call with no observations written and no cursor advance. It reports model usage even if persistence fails. It does not retry a prepared batch or repeat its model call automatically.

The append and cursor-setter APIs remain available for other callers. They do not provide this atomic guarantee. Older observer runners also use separate writes.

Read more
Ships withn8n

Fair-code platform to build and deploy AI agents and workflows. Combine a visual canvas with custom code, run it self-hosted or in the cloud, and connect to 1500+ integrations. AI automation you can trust with real work, from prototype to production.

Get the whole plugin

Other agents on n8n.

developer
Agent

developer

Use this agent for any n8n development task - frontend (Vue 3), backend (Node.js/TypeScript), workflow engine, node creation, or…

@n8n-io@n8n-ioInstall Agent
prompt-caching
Agent

prompt-caching

`Agent.promptCaching()` generates provider-specific `providerOptions` for Anthropic, Claude on OpenRouter and Vertex, and OpenAI.…

@n8n-io@n8n-ioInstall Agent
BUILT_IN_TOOLS
Agent

BUILT_IN_TOOLS

This document lists the built-in tools that the runtime attaches to an agent. It explains what each tool does and when the…

@n8n-io@n8n-ioInstall Agent