You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: "Base agent implementation with core event handling (Java)"
4
+
---
5
+
6
+
# AbstractAgent
7
+
8
+
The `AbstractAgent` class provides the foundation for agent implementations. It handles event stream processing, state management, and message history. Extend it and implement `protected void run(RunAgentInput input, IEventStream<BaseEvent> stream)`.
9
+
10
+
## Example Implementation
11
+
12
+
```java
13
+
publicclassMyAgentextendsAbstractAgent {
14
+
publicMyAgent() {
15
+
super("my-agent", "A custom agent", "thread-123", List.of(), newState(), false);
`handleTextMessageStart`, `handleTextMessageContent`, `handleTextMessageChunk`, `handleTextMessageEnd` integrate with `MessageFactory` to assemble streamed messages and notify subscribers.
description: "HTTP-based agent for connecting to remote AI agents (Java)"
4
+
---
5
+
6
+
# HttpAgent
7
+
8
+
`HttpAgent` extends `AbstractAgent` to provide HTTP-based connectivity to remote AI agents. It delegates streaming to a `BaseHttpClient` implementation and forwards incoming events to subscribers.
description: "Client package overview for the Java SDK"
4
+
---
5
+
6
+
# ag-ui-client
7
+
8
+
The Java Client SDK provides agent connectivity options for AI systems. It builds on the core types and events to deliver flexible connection methods to agent implementations.
9
+
10
+
## AbstractAgent
11
+
12
+
`AbstractAgent` is the base agent class for implementing custom agent connectivity. Extend this class and implement `run` to bridge your service to AG-UI.
0 commit comments