Skip to main content

Developers

Evaluate the State add-on for Amazon Bedrock AgentCore.

Kam State is an add-on for Amazon Bedrock AgentCore, planned for AWS Marketplace. Review the private SDK’s exact-version reads, supported retries, and declared State dependencies. Compare the engineering effort and cost with building equivalent controls yourself.

Explore without setup

Inspect captured NFL scores, sportsbook-specific closing spreads and recorded source evidence.

Dated public NFL captures from October 26, 2026. Not a live feed.

Review the contract

Read request shapes, exact-version behavior, access rules, and limits before adding a dependency.

Documentation · no endpoint required

Request evaluation access

Agree the workflow, then obtain the reviewed private SDK artifact and the requirements for access to an authorized endpoint.

Evaluation only · no public npm release

On this page

Public examples require no credentials. SDK calls require authorized evaluation access.

SDK and toolkit access requirements

Before you start

These tools require evaluation access.

Private SDK
Obtain the reviewed package or authorized source checkout. Package imports use the supplied artifact; repository-local imports require that checkout. Neither is a public install command.
History calls
Need an approved endpoint, principal, and server-side tenant binding. Configure these in your backend; the browser example needs none of them.
Local toolkit
Use an approved Linux x64 artifact. Runs locally without AWS; no public binary is distributed.
Reviewed source and package identities

Record, retry, correct, and read both revisions

Record a result, resend it, add a correction, then read both exact versions.

Implemented in source
Assert an exact retry, then read both revisions
// Private SDK 0.40.0. Not published to npm. Methods checked against the pinned typings.
// Run in Node 22 with the supplied evaluation package and an authorized endpoint, tenant and token.
import assert from 'node:assert/strict';
import { createKamClient } from '@kam-ai/agentcore-history-sdk';
const kam = createKamClient({
  baseUrl: process.env.KAM_API_URL,
  tenantId: process.env.KAM_TENANT_ID,
  accessToken: () => process.env.KAM_ACCESS_TOKEN,
});
const checks = kam.scope({ subjectId: 'checkout', type: 'deployment' });

// 1. Record revision 1, then resend the identical payload while its evidence is retained.
const original = { id: 'deploy-0412', occurredAt: '2026-10-06T17:00:00.000Z', status: 'success' };
const first = await checks.outcome(original);
const retry = await checks.outcome(original);
assert.equal(retry.status, 'duplicate');
assert.equal(retry.acceptedSequence, first.acceptedSequence);
assert.equal(retry.revision, first.revision); // No new accepted revision.

// 2. Correct it: the next revision, same id and occurredAt. Revision 1 is kept while retained.
const second = await checks.outcome({ id: 'deploy-0412', revision: 2, occurredAt: '2026-10-06T17:00:00.000Z', status: 'failure' });
console.log(first.acceptedSequence, second.acceptedSequence); // per-scope order

// 3. Read both exact revisions. Direct mode makes no day-membership claim.
const exact = await checks.byIds({ refs: [{ id: 'deploy-0412', revision: 1 }, { id: 'deploy-0412', revision: 2 }] });
for (const record of exact.records) console.log(record.ref.revision, record.status);

Boundaries. Acceptance is not publication. configure() is a bounded, non-atomic sequence that returns currentState: 'not_checked'; configuration is not convergence. Exact retrieval does not prove a model used the record.

Read a pinned collection

Use allIds() to list one fixed generation, then byIds() to read those exact versions. Set the scope once. SDK access currently comes through an evaluation.

Implemented in source
Scoped, generation-bound History read
// Save as a .mjs file in an authorized backend source checkout. SDK candidate 0.40.0.
// This is a read-only example, not code executed by the website.
import { createKamClient } from './server/trajectory/sdk/index.mjs';
const kam = createKamClient({
  baseUrl: process.env.KAM_API_URL,
  tenantId: process.env.KAM_TENANT_ID,
  accessToken: () => process.env.KAM_ACCESS_TOKEN,
});
const deployments = kam.scope({ subjectId: 'checkout', type: 'deployment' });
const page = await deployments.allIds({ day: '2026-10-06', limit: 16 });
if (page.status === 'ready' && page.items.length > 0) {
  const exact = await deployments.byIds({
    day: page.day,
    generation: page.generation,
    refs: page.items,
  });
  console.log(exact.records); // Keep every position and result status.
}
// A short page is not the end when nextCursor is present.
// Continue with the SAME generation and returned cursor.

Query current State

Filter evidence references, choose fields, sort, and limit results from one Active State. Inspect the work limits before running the query.

Implemented in source
Implemented in source
Bounded State query
// Private SDK 0.40.0 · implemented in source · not on npm or production-qualified
const deployment = kam.state({ subjectId: 'checkout', type: 'deployment' });
const history = deployment.component('trajectory-current');

const required = history.query()
  .where('required', 'eq', true)
  .orderBy('key', 'asc')
  .pick(['key', 'revision', 'source.id'])
  .take(5);

// Inspect the plan before it runs.
const plan = await required.explain();

// Execute over the admitted Active State's evidence references.
const result = await required.value();
if (result.status === 'current') console.log(result.items);
// absent, blocked and stale results carry no usable items.

Inspect the bounded plan and operators
explain() plan fields · SDK typings
explain() → kam.state-query-plan.v1     (fields from the SDK 0.40.0 typings)
  storageAccess        tenant_bound_verified_active_state_read
  maxStorageReads      36
  tableScan            false
  crossTenant          false
  limits               16 stages · 32 pick paths · take ≤ 32
  executionAvailable   true

  • SelectwherepickorderBytakeFilter, project, and bound one Active State's evidence. In private SDK 0.40.0.
  • Plan & runexplainvalueSee the bounded plan, then execute it. In private SDK 0.40.0.
  • CombinegroupuniondiffexpandhydrateRelate collections and resolve references to exact revisions. Planned.
  • AggregatecountsummeanreduceDerive metrics that update incrementally as inputs change. Planned.
  • OperatematerializewatchKeep a result current and react when it changes. Planned.

SDK 0.40.0 · PR #220. Merged in PR #220, not published to npm. Introduced in SDK 0.37.0; included in the reviewed private SDK 0.40.0. These operators run only over one verified Active State's selected evidence-reference collection. They do not query arbitrary customer payloads, establish external completeness, provide a managed metrics service, or add automatic AgentCore lifecycle integration.

Planned State API designsPlanned · not available
Design preview — materialize and watch are not available
// DESIGN PREVIEW · collection sources, materialize and watch are not available in any SDK
const atRiskCustomers = kam
  .state('customers')
  .where(lt('health', 0.6))
  .pick(['id', 'mrr', 'health', 'renewalDate'])
  .orderBy('mrr', 'desc')
  .take(100)
  .materialize('atRiskCustomers');

// Run your agent only when this view changes.
atRiskCustomers.watch(change => startCustomerSuccessAgent(change));

// Ask how Kam will execute it before it runs.
atRiskCustomers.explain();

Private SDK 0.40.0 implements scoped State, Components, bounded evidence-reference queries, composition, and exact Context APIs (OpenAPI 1.31.0). Its clean offline artifact round trip passed on reviewed main. The SDK is not published to npm or qualified for customer production. Queries operate on admitted evidence references; general source-payload queries, managed metrics, materialize(), watch(), and managed lifecycle integration remain planned capabilities. Read the State query guide →

Inspect locally with the toolkit

Native toolkit 0.1.0 is merged into the backend (PR #176) and qualified in CI as a network-disabled Linux x64 artifact. No public binary release, macOS/Windows distribution, or live AWS connection is offered here.

Merged · local only
Run the local toolkit
# Merged toolkit, no public binary. Use an approved Linux x64 artifact.
# No public installer is available. These commands run locally.
kam init --template deployment-agent
kam init --template deployment-agent --write
kam doctor --json
kam generate --check
kam dev --json
kam replay --scenario invalidated --json
kam atlas --scenario corrected --json
kam qualify --json

The toolkit uses Kam’s Rust code to prepare local Turn Frames without AWS or a model. Your AgentCore runtime owns model and tool calls; preparing a frame grants no permission. Turn Lifecycle boundary →

How exact reads and fixed lists work

Two primitives

What exactly is this? What belongs together?

allIds fixes ordered membership; byIds reads exact revisions.

Exact record

byIds

What exactly is this?

Read the requested (id, revision) in its authorized scope. Verify its identity and integrity; never substitute the latest revision.

Ordered list

allIds

What belongs together?

Browse exact references in a fixed generation. Keep that generation while paging, with coverage and completeness stated explicitly.

One foundation. Three experiences.

Timeline
Browse references within one fixed generation.
History
Compare retained revisions with their corrections.
Replay and inspection
Local toolkit: synthetic replay. Web console: read-only.

What stays exact

Every returned record matches its requested exact identity in its authorized scope. In generation mode, the read also verifies membership in the supplied day and generation. Unavailable, unresolved, expired, denied, or incomplete results stay explicit and are never replaced with a newer revision or presented as complete success.

The guarantees behind each read
GuaranteebyIdsallIds
IdentityExact (id, revision) in one scopeExact generation of one collection
ConsistencyNo fallback to the latest revisionMembership stays pinned while paging
IntegrityContent hash recomputed on readOrdered membership checked against its generation
AuthorizationEvery read authorized for its scopeEnumeration authorized for its scope
HistoryRetained earlier revisionsRetained earlier generations
BoundsBatched point reads, up to 32 per callIndexed pages, up to 32 references
RecoveryUnavailable, expired, and unresolved stated explicitlyCursor continuation on the same generation
LifecycleRetention deadlines; export-bound deletionCorrections publish a successor generation
Implemented in source

Implemented in source for the History contract: outcome revisions and their UTC-day membership. Generalized objects and collections over the same guarantees are planned.

List fixed references, then read exact versions
// Save as a .mjs file in an authorized backend source checkout. SDK candidate 0.40.0.
// This is a read-only example, not code executed by the website.
import { createKamClient } from './server/trajectory/sdk/index.mjs';
const kam = createKamClient({
  baseUrl: process.env.KAM_API_URL,
  tenantId: process.env.KAM_TENANT_ID,
  accessToken: () => process.env.KAM_ACCESS_TOKEN,
});
const deployments = kam.scope({ subjectId: 'checkout', type: 'deployment' });
const page = await deployments.allIds({ day: '2026-10-06', limit: 16 });
if (page.status === 'ready' && page.items.length > 0) {
  const exact = await deployments.byIds({
    day: page.day,
    generation: page.generation,
    refs: page.items,
  });
  console.log(exact.records); // Keep every position and result status.
}
// A short page is not the end when nextCursor is present.
// Continue with the SAME generation and returned cursor.

Two primitives. Many compositions. One deterministic State engine.

Compare the available reads

Decision matrix

Which read should I use?

Start with the question your agent is asking. All calls below except watch() are included in the reviewed private SDK 0.40.0; evaluation access is required. watch() remains planned.

QuestionCallReturns
I know the record and revision. What exactly is it?byIds({ refs: [{ id, revision }] })The exact revision, or found / unresolved / unavailable / expired
Which records belong to this day, as published?allIds({ day }) → byIds({ day, generation, refs })One ordered, fixed list of exact versions, followed by records checked against that list
What was accepted, in order, after sequence N?history({ generation, afterSequence })Accepted revisions with the prior revision each one corrected
What is the current rolling comparison?trajectory()Last-10 and 30/90-day comparisons with accepted and applied sequence
What does the current View say, and is it usable?component('id').read()current, absent, blocked, or stale; only current carries a payload
Which current evidence matches a filter?query().where(…).take(n).value()A query with a fixed work limit over one Active State
What did Kam consider current at version N?observation({ activeStateVersion })The exact retained assessment, never the latest substitute
Tell me when this View changeswatch() Planned · not availableNothing yet. No customer subscription exists

Fasting Free · First-party case study

A free timer. A real state workflow.

Fasting Free starts in the browser and adds account saving when the user chooses. The app uses a pinned Kam Rust kernel to check proposed state. The hosted History service is a separate product.

Read the Fasting Free case study

Read with a coding assistant

Give your coding assistant the same guides.

Choose a State question

Find the State contract for your problem.

Progressive adoption

Start with one workflow.

  1. Start with one application and one workflow

    Choose one result to record, retry, and correct. Keep business meaning and external action permissions in your application.

  2. Inspect a candidate locally

    Use an approved native artifact to plan setup and exercise synthetic fixtures in the real Rust engine. Nothing in this website executes it.

  3. Integrate the evaluation History SDK

    Call Kam explicitly from your AgentCore application: bind subject and type, record a result, and preserve the returned generation through exact reads. An authorized endpoint is a separate prerequisite.

  4. List the remaining deployment requirements

    Review identity, effective permissions, retries, corrections, lifecycle, export, and customer exit before any live production commitment.

One application. One workflow.

Evaluate Kam State for your AgentCore application.

Bring one workflow with a correction or retry. Agree the baseline, scope, and success checks before starting.