getInterrupt
Read the agent's current human-in-the-loop interrupt, if any.
import { getInterrupt } from '@threadplane/chat';Declaration · overload 1
export declare function getInterrupt(agent: Agent): AgentInterrupt | undefined;Parameters
agent· requiredAgentThe agent to inspect.
Returns
AgentInterrupt | undefinedThe pending AgentInterrupt, or undefined when the agent is
not currently waiting on an interrupt.
Examples
const interrupt = getInterrupt(agent);
if (interrupt) agent.submit({ resume: 'approved' });