Interfaces

SlidingWindowOptions

Interface: SlidingWindowOptions

Defined in: src/core/agent/window/types.ts:368

What slidingWindow({...}) accepts.

Example

const agent = Agent.create({ provider: anthropic(), model: 'claude-sonnet-4-5' })
  .window(slidingWindow({ keepRecentTurns: 12 }))
  .build();

Properties

keepRecentTurns

readonly keepRecentTurns: number

Defined in: src/core/agent/window/types.ts:376

How many of the most recent turns stay in the window. Everything older is dropped — unless it refuses by name.

REQUIRED, with no default. It is the policy: how much past this agent needs is a fact about your agent, not about this library.

On this page