@adonis-agora/agent
Version:
Governed, durable-backed AI agent (chat + tool-calling + governance) for AdonisJS — part of the Agora ecosystem.
12 lines • 811 B
TypeScript
import { AgentClient, type AgentClientOptions } from './core/client.js';
export type HeaderSource = AgentClientOptions['getHeaders'];
/** The CSRF header first, then the caller's own — so an app can still override it. */
export declare function withCsrf(own: HeaderSource): Promise<Record<string, string>>;
/**
* An {@link AgentClient} on this package's routes: the session cookie rides every request
* (`credentials: 'same-origin'`, or whatever you pass for an API on another origin) and the CSRF
* header is read from the page per request. For code outside React, or to hand one hook a
* connection of its own (`useAgentChat({ backend })`). Under React prefer `AgentProvider`.
*/
export declare function createAgentClient(options?: AgentClientOptions): AgentClient;
//# sourceMappingURL=client.d.ts.map