Skip to content

GetEvent

Source: src/AWS/BedrockAgentCore/GetEvent.ts

Fetches a single short-term event from an actor’s session.

Bind a Memory inside a function runtime to call the AgentCore data-plane API against it. Provide AgentCore.GetEventHttp on the Function effect to implement the binding.

// init
const getEvent = yield* AgentCore.GetEvent(memory);
return {
fetch: Effect.gen(function* () {
// runtime
const result = yield* getEvent({
actorId: "user-1",
sessionId: "session-1",
eventId,
});
return HttpServerResponse.json({ event: result.event });
}),
};