Normalized objects and versioned collections
Plan shared State for AgentCore tasks using exact identities and fixed, versioned collections. General collections remain proposed.
Guide context
The proposed collection architecture for AgentCore workloads: exact identities, ordered membership and bounded Views, with the existing History contract kept intact.
Plan how an AgentCore workload could share exact objects through scoped, versioned collections. The proposed generalization builds on History's identities and pinned membership. It does not turn today's History methods into a public general collection API.
On this page · 7 sections
Existing contract and proposed direction
Start with History
Use exact revisions and fixed UTC-day membership for an AgentCore workload.
Add scoped State
State and Components use declared, bounded evidence references.
Keep the proposal separate
General collection adapters and managed integration remain future work.
One Rust State engine; many typed collections#
The foundational distinction is identity versus membership. Exact identity answers which retained object revision is requested. Collection membership answers which exact references belong to a particular ordered, pinned generation. A consumer can enumerate references and hydrate only selected records.
The existing History adapter scopes records by tenant, subject, and type, and pins UTC-day collection membership to a generation. This date-based History contract does not require every proposed collection to be date-based. General collection adapters, including project builds, documents, and tasks, are architectural direction only.
Knowledge is information represented as typed State, with provenance and review status where applicable. Context is a consumer-specific View selecting authorized references. Neither needs a second State engine.
Exact object
Stable identity plus exact revision and declared availability. A stored build record is not proof that the artifact is safe to reuse.
Versioned membership
An ordered collection of exact references with a pinned generation. Membership can change without duplicating objects.
Materialized View
A derived result with exact source/definition references, applicability, and its own publication boundary.
Consumer Context View
A task-scoped selection of eligible State/evidence references; permission is rechecked when serving.
What the current History API actually guarantees#
allIds() pages one bounded UTC-day generation. Generation-bound byIds() verifies exact membership; direct byIds() resolves known exact revisions without a membership claim. Missing, unresolved and expired evidence stays explicit; neither API silently follows the latest revision.
The existing Rust State engine already supports versioned Views, dependency membership, change detection and bounded reconciliation. The generalized collection contract described here must reuse those mechanisms rather than create parallel reducers or dirty-propagation loops.
Adapter boundaries, not a different engine per vertical#
History adapter — implemented scope
UTC-day ordered outcomes, specific revisions, retention and correction rules.
Project collection — proposed
Enumerate exact build, test, and task references by project instead of date; no build-specific inference or compiler required.
Temporal collection — proposed
Use explicit time and versioned rules as View inputs, so durable source facts may drive new bounded projections without being rewritten each year.
Context collection — proposed
Select exact evidence references for one consumer and budget; representation is separate from the original payload.
Keep the existing dependency DAG#
A changed source makes its affected dependent Views dirty. The existing reconciliation lifecycle evaluates bounded affected work and conditionally publishes. Within one traversal, a visited set avoids duplicate work. For supported Views, unchanged results can be reused when the required version, freshness, and authority checks still hold. General calculation caching remains planned.
A future nested collection may reference exact child generations, but the parent must pin each child version; old parents must not silently retrieve newer children. Traversal requires total depth, node, edge, byte, and read limits. A trie or Merkle DAG is an optional measured indexing optimization, not a prerequisite.
Hot State and durable snapshots have different jobs#
The target storage architecture uses DynamoDB for operational pointers, indexed membership and durable work. Immutable evidence and snapshots may live in an approved S3 store. Kam-managed and customer-owned S3 are proposed storage-ownership modes, not existing product offerings.
Retention, snapshot interval, application validity and hot working-set policy are distinct. Customers might select multi-year retention while only occasionally changing State. The current 365-UTC-date working History window is a real existing contract; generalizing future lifecycles must preserve it until separately migrated and qualified.
Snapshot publication must verify the exact durable object before advancing a conditional hot-State pointer. DynamoDB and S3 do not share a transaction. An absent or inaccessible archived object must not silently resolve to latest.
Illustrative: three agents share one build record#
Agent A submits a build result under a stable application-supplied ID. Agents B and C can retrieve the same authorized record or see it in different project collections without copying its payload. A new build gets a distinct exact identity or revision according to the declared producer contract.
Reusing the compiled artifact still depends on an external build cache and its compatibility checks. Kam does not compile Rust, certify arbitrary toolchains, infer build equivalence, or grant access because an agent knows an ID.
Implementation boundary and next experiment#
This document describes the intended generalization of existing primitives, not a shipped universal byIds/allIds service. Start by preserving the existing History adapter and qualifying one non-date, bounded collection through the real Rust engine, authorized reads, conditional publication, and recovery.
Only after that source-backed happy path should the website describe generic collections, customer-owned S3, generalized durable Context collections or managed multiagent artifact reuse as available.