Package com.google.genkit.client
Class RemoteAgent
java.lang.Object
com.google.genkit.client.RemoteAgent
Factory for creating a remote agent chat client.
Use chat(RemoteAgentOptions) to connect to an agent served by the Jetty plugin (or
any compatible server that speaks the Genkit agent wire format):
AgentChat<Map<String,Object>> chat = RemoteAgent.<Map<String,Object>>chat(
RemoteAgentOptions.builder()
.url("http://localhost:8080/myAgent")
.build());
AgentResponse<Map<String,Object>> resp = chat.send("hello");
-
Method Summary
-
Method Details
-
chat
- Type Parameters:
S- the type of custom session state- Parameters:
opts- the remote agent options (URL, headers, serverManaged flag)- Returns:
- a fresh
AgentChatready to send turns
-