FakeAgent
In-process AG-UI agent that emits a canned streaming response.
Use for offline demos and tests where a real backend isn't available. Echoes a fixed assistant reply token-by-token with realistic timing.
NOT for production use.
import { FakeAgent } from '@threadplane/ag-ui';Declaration
export declare class FakeAgent extends AbstractAgent {
constructor(opts?: {
tokens?: string[];
reasoningTokens?: string[];
delayMs?: number;
script?: FakeAgentScript;
});
run(input: RunAgentInput): Observable<BaseEvent>;
}Members
Constructor · overload 1
Constructs a new instance of the FakeAgent class
constructor(opts?: {
tokens?: string[];
reasoningTokens?: string[];
delayMs?: number;
script?: FakeAgentScript;
});Parameters
opts· optional{ tokens?: string[]; reasoningTokens?: string[]; delayMs?: number; script?: FakeAgentScript; }
run · overload 1
run(input: RunAgentInput): Observable<BaseEvent>;Parameters
input· requiredRunAgentInput
Returns
Observable<BaseEvent>