import { BedrockAgentCoreClient } from '@aws-sdk/client-bedrock-agentcore'; import type { AwsCredentialIdentityProvider } from '@aws-sdk/types'; import type { ExtractionTrigger, MemoryMessageFilter } from '@strands-agents/sdk'; import { AgentCoreMemoryStore } from './store.js'; import { type MetadataProvider } from './types.js'; /** Per-namespace read configuration. */ export interface AgentCoreNamespaceConfig { /** Namespace template, e.g. `/strategy/{id}/actor/{actorId}/preferences`. */ namespace: string; /** Store name; defaults to a slug derived from the namespace. */ name?: string; description?: string; maxSearchResults?: number; minScore?: number; /** Over-fetch multiplier when `minScore` is set (see {@link AgentCoreMemoryStoreConfig.overFetchFactor}). */ overFetchFactor?: number; /** Marks this the single write sink. Defaults to the first namespace when extraction is enabled; see {@link assertWritableTopology}. */ writable?: boolean; } /** * Object form of the {@link CreateAgentCoreMemoryStoresInput.extraction} switch: writable, with optional * control over write cadence and which message content is written. */ export interface AgentCoreExtractionConfig { /** * When buffered turns are flushed to `createEvent`. Omit for the MemoryManager's default * (`IntervalTrigger`); pass any Strands {@link ExtractionTrigger} or an array. A trigger only sets * cadence (fire-and-forget) — `MemoryManager.flush()` is what guarantees durability. */ cadence?: ExtractionTrigger | ExtractionTrigger[]; /** * Which message content blocks to exclude before writing (the extraction `filter`). Omit to use the * framework default (drops tool use/result). Forwarded to the store's `ExtractionConfig.filter`. */ filter?: MemoryMessageFilter; } export interface CreateAgentCoreMemoryStoresInput { memoryId: string; actorId: string; sessionId: string; /** * Read namespaces — one store is built per entry, each reading its own exact namespace prefix. To read a * whole subtree instead, that is a single store: construct it directly with * `new AgentCoreMemoryStore({ ...identity, namespacePath })`. */ namespaces: AgentCoreNamespaceConfig[]; /** * The single write switch: omit/`false` = recall-only; `true` = writable with the default cadence; * `{ cadence?, filter? }` = writable with a custom cadence/filter. The writer namespace is chosen by * the per-namespace `writable` flag (else the first). */ extraction?: boolean | AgentCoreExtractionConfig; metadataProvider?: MetadataProvider; /** * Max conversational turns packed into one `createEvent` write (default * {@link DEFAULT_MAX_TURNS_PER_EVENT}). Combined with the extraction trigger cadence, this controls * write API-call volume: a flush of N turns is sent as `ceil(n / maxTurnsPerEvent)` events. */ maxTurnsPerEvent?: number; region?: string; credentialsProvider?: AwsCredentialIdentityProvider; /** Shared client; one is constructed (and reused across the returned stores) if omitted. */ client?: BedrockAgentCoreClient; } /** * At most one store may be writable. `createEvent` is namespace-free (it writes the whole conversation to * the `(memoryId, actorId, sessionId)` stream), so two writers would emit duplicate events that nothing * upstream dedupes — and a store can't see its siblings, so the rule can only be enforced here, at * construction. Exported so hand-built (`new`) multi-store setups can guard themselves. With * `expectExtraction`, a writer is required (0 writers throws). */ export declare function assertWritableTopology(stores: readonly AgentCoreMemoryStore[], expectExtraction?: boolean): void; /** * Build the stores for one `(actorId, sessionId)` — one shared client, one writer — ready to spread into * `MemoryManagerConfig.stores`. Called once per `(actorId, sessionId)` by a multi-actor server. */ export declare function createAgentCoreMemoryStores(input: CreateAgentCoreMemoryStoresInput): AgentCoreMemoryStore[]; //# sourceMappingURL=factory.d.ts.map