Creates a typed client for talking to a Genkit agent over HTTP.
import { remoteAgent } from 'genkit/beta/client';const agent = remoteAgent<WeatherState>({ url: '/api/weatherAgent',});const chat = agent.chat();const res = await chat.send('Weather in Tokyo?').response;console.log(res.text); Copy
import { remoteAgent } from 'genkit/beta/client';const agent = remoteAgent<WeatherState>({ url: '/api/weatherAgent',});const chat = agent.chat();const res = await chat.send('Weather in Tokyo?').response;console.log(res.text);
Creates a typed client for talking to a Genkit agent over HTTP.