Reference

Routes, events, exports, keys

Every contract on one page, built for looking things up. If this page and the shipped package ever disagree, trust the package README and the code.

HTTP API

CoreApi · Cognito JWT · base URL in SSM at /readysetcloud/api-url
Method & pathBodyReturns
POST /agent/sessions{ systemPrompt?, modelId?, temperature?, maxTokens?, title?, tools?, mcpServers? }{ sessionId }; the caller is the owner
POST /agent/connect{ sessionId }{ wsUrl }; auth is the bearer subprotocol on the socket
POST /agent/tasks{ request, sessionId?, wait?, system? }200 result envelope, or 202 { taskId, status }
GET /agent/tasks/{taskId}The result envelope; owner (or createdBy) only

Events

Default bus · sources and detail types as exported
Detail typeSourceDirectionDetail
Run Agent Taskreadysetcloud.agentApp → agent{ taskId, principal, request, sessionId?, trigger?, systemPrompt?, modelId?, temperature?, maxTokens?, tools?, mcpServers? }
Agent Task Completedreadysetcloud.agentAgent → apps{ taskId, status, output?, error?, principal }
Run Agent Task, Agent Task Completedagency.<name>Within your stackA persistent agent’s tasks and results. The trigger carries agentId; completions add agentType, agentId, kind. Never consumed by rsc-core.
Agent Check-Inagency.<name>Your cron → your router{ agentType, date, slot, at, nextAt }
Create Agent Sessionreadysetcloud.agentApp → agentA session request from another stack; consumed by create-session-from-event
Schedule Event / Cancel Scheduled EventanyApp → core{ at | delay, timezone?, name?, whenPast?, event }; the deferred-event primitive delayed tasks ride
Diagram
Event contract on the default bus Your appsfirst-party Lambdasworkflows · routersDefault event busaccount-internalAgent stackcreate-session-from-eventRunAgentTaskFunctionScheduleEventFunctionRun Agent TaskRun Agent TaskCreate Agent SessionCreate Agent SessionSchedule EventAgent Task CompletedAgent Task Completedrepublish at runAt
Apps never read the agent table. Requests go in as events, results come out as events, and a delayed request rides Schedule Event, which republishes it on the same bus when the time comes.

Package exports

@readysetcloud/agent · Node 22+
EntryLoads Strands?Exports
@readysetcloud/agentYescreateAssistant, handleUserMessage, handleTask, runAgentTask, runAgent, tool, McpClient, builtinTools, resolveTools, streamTurn, wire types, config constants, plus everything on ./memory
@readysetcloud/agent/memoryNoDynamoSnapshotStorage, createSession / getSessionConfig, requestSession, createTask / startTask / finishTask / getTask, requestAgentTask / emitTaskCompleted, TaskResultCache, resolveMcpServerConfigs
@readysetcloud/agent/agencyNodefinePersistentAgent, isRetryableError, DEFAULT_TASK_CAP, dynamoAgentStore, memoryAgentStore, routeTrigger, humanDelay, dynamoTriggerGates, memoryTriggerGates, eventBridgeDispatcher, taskIdFor, responseDelay, reconcileAgenda, agendaLines, agendaPriority, openCommitment, advanceCommitment, expireCommitments, dueCommitments, checkInMoment, nextCheckIn, readAgentState, updateAgentState, seededRandom, seededRoll

Dependencies: the AWS SDK v3 DynamoDB and EventBridge clients, the Strands SDK pinned exact at 1.9.0, and zod. src/stream.ts is the one SDK coupling point, and a contract test guards it.

Environment

Read at module scope
VariableRequiredDefaultUsed by
TABLE_NAMEYesSnapshots, session config, task rows, agent state, trigger gates. Every data-plane call also takes an explicit tableName.
BEDROCK_MODEL_IDNous.amazon.nova-lite-v1:0Default chat and task model
BEDROCK_REGION / AWS_REGIONNous-east-1Bedrock region
BEDROCK_MAX_TOKENS, BEDROCK_TEMPERATURENo4096, 0.7Sampling defaults
AGENT_MEMORY_IDRuntime onlyThe AgentCore Memory resource the chat runtime builds its memory manager from
MCP_ALLOWED_HOSTSHostempty (rejects all)From the McpAllowedHosts parameter; checked by create-session
SYSTEM_TASK_PRINCIPALSHostempty (rejects all)From the SystemTaskPrincipals parameter; checked by create-task

Storage

One table · pk/sk · TTL on expiresAt
ItempkskNotes
SnapshotsSESSION#{sessionId}SNAPSHOT#…, LATEST#…, MANIFEST#…Strands conversation state; 30-day TTL
Session configSESSION#{sessionId}CONFIGOwner, prompt, model, tools, MCP specs
Task recordTASK#{taskId}STATUSStatus and result; 24-hour TTL
Agent stateAGENT#{agentId}STATE#{name}[#{scope}]Revision-checked documents; definePersistentAgent uses <type>.agenda, <type>.commitments, and <type>.usage (the task cap). In your table, for persistent agents.
Trigger gateTRIGGER#{[prefix#]slot}GATEowner, lastTriggeredAt; 30-day TTL

Nobody reads this table from another stack. Results cross as Agent Task Completed events and session requests cross as Create Agent Session.

Diagram
Single-table key map PARTITIONSESSION#{sessionId}CONFIGowner · prompt · tools · MCPSNAPSHOT#…conversation stateLATEST#… · MANIFEST#…resume pointerswritten bycreateSession · runtimePARTITIONTASK#{taskId}STATUSstatus · output · error · 24h TTLwritten bycreateTask · runAgentTaskPARTITIONAGENT#{agentId}STATE#{type}.agendagoals · revisionSTATE#{type}.commitmentspromises · revision…#{scope}a tenure or seasonwritten byupdateAgentStatePARTITIONTRIGGER#{slot}GATEowner · lastTriggeredAt · TTLwritten byrouteTrigger gates
One table, five item families, four partitions. Each family has exactly one writer, and nothing outside its stack reads it.

Repository

Where each piece lives
PiecePath
Portable agent coreagent/ (@readysetcloud/agent)
AgentCore Runtime artifact (NODE_22 WebSocket host, memory wiring)agent-runtime/
Session and connect Lambdasfunctions/create-session.mjs, functions/create-session-from-event.mjs, functions/websocket-connect.mjs
Task Lambdasfunctions/create-task.mjs, functions/get-task.mjs, functions/run-agent-task.mjs
Deferred eventsfunctions/schedule-event.mjs
Infrastructuretemplate.yaml
React chat surfaceui/src/chat/ (@readysetcloud/ui/chat)
Persistent agentsNot in this repo: each app deploys its own router and task Lambdas from definePersistentAgent
These pagesdesign-system/agent/, published with the design-system guide