Skip to content

LastNObservationsProcessor

reference
1 min readUpdated

Kind: Class

Source: atloria-monorepo/libs/agent-core/src/context/history-processors.ts

Keeps the last N tool outputs in full detail. Older ones are replaced with extractive summaries.

Directly extracted from the existing elideOldObservations() function in autonomous-loop.ts — same logic, now composable.

SWE-agent default: n=5.

Implements: HistoryProcessor

Methods

MethodSignatureReturns
processprocess(items: AgentInputItem[])AgentInputItem[]

Properties

PropertyType
nameany

Where it refuses work

  • LastNObservationsProcessor stops the work with an early return when outputIndices.length <= this.n.
  • LastNObservationsProcessor stops the work with an early return when !indicesToElide.has(i).

Was this page helpful?

Download as PDF