Client
Use agents from TypeScript clients, scripts, CLIs, and apps.
The client API is built around durable threads.
const paiClient = createPaiHttpClient({ url: "http://localhost:3001/api/pai" });
const assistant = paiClient.agent("main");
const thread = assistant.thread(threadId);
const run = await thread.send("Summarize this");
await run.waitUntilIdle();Read: