Skip to content

Add realtime config updates via SSE - #326

Merged
hansott merged 1 commit into
mainfrom
feature/realtime-sse-config-updates
Jul 30, 2026
Merged

Add realtime config updates via SSE#326
hansott merged 1 commit into
mainfrom
feature/realtime-sse-config-updates

Conversation

@Mishenevd

Copy link
Copy Markdown
Collaborator

Agent subscribes to a Server-Sent Events stream and applies config changes on push instead of waiting for the next 60s poll (spec: zen-specs/realtime-config-updates.md). Existing RealtimeTask poll is unchanged and stays running as fallback.

Behind AIKIDO_FEATURE_SSE (off by default), matching the Node/Python ports.

Testing:

  • Unit tests: parser (9), SSE client reconnect/backoff/timeout/headers/callback-safety (9), task payload parsing + dedup (6)
  • Full agent_api:test suite: no regressions
  • Live e2e: deployed to zen-demo-java on Fly.io with the flag on, connected to the real runtime.aikido.dev backend, received and applied a real config-updated event, no errors, old poll task ran unaffected in parallel

@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

@Mishenevd
Mishenevd force-pushed the feature/realtime-sse-config-updates branch from b7e2ab2 to ea545a3 Compare July 28, 2026 00:14
Comment thread agent_api/src/main/java/dev/aikido/agent_api/background/cloud/RealtimeSSEAPI.java Outdated
Agent subscribes to a Server-Sent Events stream and applies config
changes as soon as the cloud pushes a config-updated event, instead
of waiting for the next 60s poll. The existing RealtimeTask poll
stays untouched and keeps running as a fallback.

Gated behind AIKIDO_FEATURE_SSE (off by default), matching the
firewall-node and firewall-python ports of this feature. Uses
HttpURLConnection for the stream connection since its read timeout
is a true idle timeout, unlike java.net.http.HttpClient's
whole-exchange timeout.
@Mishenevd
Mishenevd force-pushed the feature/realtime-sse-config-updates branch from ea545a3 to 1654765 Compare July 30, 2026 10:29
@hansott
hansott merged commit 129501f into main Jul 30, 2026
273 of 274 checks passed
@hansott
hansott deleted the feature/realtime-sse-config-updates branch July 30, 2026 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants