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
{{ message }}
Repository navigation
Commit c0569cb
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/content/dev/client.md
+29Lines changed: 29 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -185,6 +185,35 @@ Client client = Client
185
185
.build();
186
186
```
187
187
188
+
### SSE Parser Configuration
189
+
190
+
The client uses a Server-Sent Events (SSE) parser for streaming responses. You can tune its limits via `SSEParserConfig` to handle agents that return large payloads (e.g., large artifacts or tool results):
|`maxLineLength`| Max characters per raw SSE line (`0` = disabled) | 1 MB |
195
+
|`maxBufferLines`| Max `data:` lines per event block | 1 000 |
196
+
|`maxBufferChars`| Max total characters across all `data:` values per event | 1 MB |
197
+
198
+
The defaults are suitable for most deployments. To override them, build a custom `SSEParserConfig` and pass it to the HTTP client.
199
+
200
+
> **Security note:** setting `maxLineLength` to `0` disables the per-line length check, relying on `maxBufferChars` alone to bound memory. Only disable it when you trust the remote agent or have other safeguards (e.g. a reverse proxy with its own line-length limit).
Copy file name to clipboardExpand all lines: extras/http-client-android/src/main/java/org/a2aproject/sdk/client/http/android/AndroidA2AHttpClientProvider.java
Copy file name to clipboardExpand all lines: extras/http-client-android/src/test/java/org/a2aproject/sdk/client/http/android/AndroidA2AHttpClientSSETest.java
Copy file name to clipboardExpand all lines: extras/http-client-android/src/test/java/org/a2aproject/sdk/client/http/android/OkHttpA2AHttpClientSSETest.java
0 commit comments