Kam State documentation
Kam State adds versioned application state to Amazon Bedrock AgentCore.
Use Kam State to retain the exact results and input references your AgentCore application needs beyond the current AG-UI interaction.
Run these examples in an authorized backend with the supplied private package, endpoint and tenant binding. SDK 0.49.0 is not published to npm; these pages execute no SDK or AgentCore calls.
// Private SDK 0.49.0. Not published to npm. Methods checked against the bundled 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.state({ 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.record(original);
const retry = await checks.record(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.record({ 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);Use these guides with a coding assistant
Ask your coding agent
Read https://kam-ai.com/docs/ag-ui-agentcore and https://kam-ai.com/docs/integrate. Help me connect one AG-UI interface and Amazon Bedrock AgentCore workflow to Kam State. Separate interface events, runtime execution, State acceptance, and external effects. Check SDK access and qualification before suggesting code; preserve exact references and retry identities.
AG-UI + AgentCore
Connect the interface, runtime, and recorded State through your own authorized adapter.
SDK quickstart
Record one result, retry it, add a correction, and read the exact retained versions.
Retry after a timeout
Preserve the original request and check acceptance without rerunning a tool effect.
Handle a changed input
Inspect which input a result covers and decide what the application must refresh.
Engineering review
Review storage authority, exact reads, recovery, and qualification before integration.
Glossary
Separate State, History and recall from runtime execution and application decisions.
Guide context
Build an agentic app with AG-UI, Amazon Bedrock AgentCore, and Kam State. Start with the integration boundary, record one result, and read its exact retained revision.
AG-UI carries the interface interaction, Amazon Bedrock AgentCore hosts your agent, and Kam State keeps accepted results with exact revisions and recorded references. Start with one application-owned SDK integration. Record a result, inspect its retained version, and define the retry and changed-input behavior before adding more workflows.
On this page · 5 sections
Start with one agent workflow#
Understand the integration
AG-UI carries interface events. AgentCore hosts your agent. Your backend explicitly records results and reads State through Kam.
Record and retrieve one result
Use the private SDK with an authorized endpoint. Keep the accepted ID and revision, then read that exact retained evidence.
Exercise the failures
Retry an identical record after a lost response, add a correction, and check unavailable evidence. Keep tool execution and external effects separate.
What Kam adds#
Kam keeps the accepted revisions your application records, returns exact retained versions, and preserves fixed History membership. Supported retries return retained acceptance evidence. Declared Views and bounded State reconciliation build on that foundation.
What your application owns#
Your application owns domain meaning, authentication, model and tool execution, and external-action verification. AgentCore Memory provides separately configured recall. General collections, watch(), and managed runtime wiring remain planned.
SDK access and evidence#
The website bundles private SDK 0.49.0 (@kam-ai/agentcore-history-sdk). Its offline artifact verification is separate from the broader backend review pinned to SDK 0.40.0. Neither establishes a hosted service or live AgentCore qualification.
Obtain the approved artifact, endpoint, principal and tenant binding through an evaluation. Public documentation and examples need no credentials. There is no public npm release or one-click AgentCore attachment.
Plan what must remain inspectable#
Working History covers a bounded window of 365 UTC dates. Supporting evidence has separate retention limits, and every read still needs authority. A missing exact version stays explicit.