@threadplane/chatFunctionv0.3.4

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 · required
Agent

The agent to inspect.

Returns

AgentInterrupt | undefined

The 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' });