Skip to content

ContextManager

reference
1 min readUpdated

Kind: Class

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

Methods

MethodSignatureReturns
add`add(item: Omit<ContextItem, 'turn''tokenEstimate'> & { tokenEstimate?: number })`
nextTurnnextTurn()void
getItemsgetItems()ReadonlyArray<ContextItem>
getTurngetTurn()number
getTotalTokensgetTotalTokens()number
shouldCompactshouldCompact()boolean
compactcompact()Promise<void>
clearclear()void

Where it refuses work

  • ContextManager stops the work with an early return when this.items.length <= minKeep.

Was this page helpful?

Download as PDF