Skip to content

GetCodeInterpreterSession

Source: src/AWS/BedrockAgentCore/GetCodeInterpreterSession.ts

Reads a code interpreter session’s configuration and status.

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

// init
const getCodeInterpreterSession = yield* AgentCore.GetCodeInterpreterSession(codeInterpreter);
return {
fetch: Effect.gen(function* () {
// runtime
const result = yield* getCodeInterpreterSession({ sessionId });
return HttpServerResponse.json({ status: result.status });
}),
};