java-client
java-client lets you call a remote AG-UI endpoint as an ordinary Agent. It uses only the JDK HttpClient and the Serializer you inject.
What’s inside
The client keeps no state. It does not store messages or state between runs. Each call to
run sends the RunAgentInput you give it, so your application decides how to keep the conversation history. One approach is to collect TEXT_MESSAGE_* events into an AssistantMessage and append it to the list for the next run.
Example
This example uses a pattern-matchingswitch, which needs Java 21. On Java 17, use instanceof checks instead.