Skip to main content

teardownExampleAgents

Agent Runtimes


Agent Runtimes / examples/utils/teardownAgents / teardownExampleAgents

Function: teardownExampleAgents()

teardownExampleAgents(agentBaseUrl, token, agentId?): Promise<void>

Defined in: src/examples/utils/teardownAgents.ts:24

Tear down server-side agents created by examples and wipe in-process agent state so a fresh example / runtime target boots with a clean slate.

Deletes agents cached in sessionStorage under agent-runtimes:agentId:<base> (all of them, or only the given agentId when provided), then resets the chat, conversation and runtime stores and drops the persisted slice.

Parameters

agentBaseUrl

string

Base URL of the agent-runtimes server the agents live on.

token

string | undefined

Optional bearer token for authenticated deletes.

agentId?

string

Optional specific agent id to tear down (defaults to all cached).

Returns

Promise<void>