Agentic Bridge Core¶
Invoke remote agents over REST, SSE, or WebSocket and publish queue invocations through a typed Java client.
Build AgenticClient with a named client and absolute base URL, then call invoke, stream, or conversations. Reuse and close the client with the application lifecycle. Queue publishers are explicit resources and do not imply that a remote worker has completed the invocation.
| Maven artifact | Packaging | Source project |
|---|---|---|
org.fireflyframework:fireflyframework-agentic-bridge-core |
jar |
modules/agentic-bridge/fireflyframework-agentic-bridge-core |
Part of External services.
In the onboarding service¶
Call a remote agent from the onboarding service when a configured assistant is needed. Reuse the client through the service lifecycle and treat its response as input to the application's own review behavior.
Add the component¶
Installation and version availability explains source builds and published releases.
<dependency>
<groupId>org.fireflyframework</groupId>
<artifactId>fireflyframework-agentic-bridge-core</artifactId>
<version>26.10.20-SNAPSHOT</version>
</dependency>
Quick start¶
The Java examples in this section are API fragments for application code. Use the stated imports and supply the application-owned collaborators described alongside them.
For explicit client construction, set AGENTIC_BASE_URL to the deployed agent service URL. Keep the client alive until the reactive invocation completes and close it when the application shuts down:
AgenticClient client = AgenticClient.builder("orders")
.baseUrl(System.getenv("AGENTIC_BASE_URL"))
.build();
Mono<AgentResponse> result = client.invoke(
"assistant", AgentRequest.of("Summarize the order status"));
Here assistant is an example remote agent name; use a name present in your remote catalog. AgenticClient is in org.fireflyframework.agentic.bridge, and request/response types are in its invocation package. Return or compose result in a reactive application flow. Calling invoke constructs a publisher; it does not prove that a configured remote service has answered. Use stream/streamIncremental for SSE events and conversations() for the conversation API.
Configuration and wiring¶
This module declares no @ConfigurationProperties class of its own. Use the constructor/port contracts above and the configuration of the host or related core module.
Public API and extension points¶
| Type | Contract and responsibility |
|---|---|
AgenticClient |
Reactive façade for invoking remote agents hosted by fireflyframework-agentic. |
AgenticClientBuilder |
Fluent builder for AgenticClient instances. |
AgentRequest |
Wire-format request body for an agent invocation. |
ConversationManager |
Reactive client for the /agents/conversations CRUD endpoints exposed by the agentic REST layer. |
QueueAgenticPublisher |
Reactive contract every queue publisher implementation must satisfy. |
Related components¶
| Related component | Why it belongs nearby |
|---|---|
| Agentic Bridge | Group the Java client, Spring wiring, starter, and sample for remote agent integration. |
| Kernel | Share a consistent exception vocabulary across application, domain, and infrastructure boundaries. |
Build and test¶
Use Java 25. From the repository root, build this component with its required dependencies:
git clone https://github.com/fireflyframework/fireflyframework-jafly.git
cd fireflyframework-jafly
./mvnw -pl :fireflyframework-agentic-bridge-core -am verify
./mvnw -pl :fireflyframework-agentic-bridge-core -am install
verify runs the selected projects' tests. install makes the current build available in your local Maven repository.
Representative test sources:
- AgenticClientBuilderTest.java.
- RestAgenticTransportTest.java.
- AuthStrategyTest.java.
- AgentRequestTest.java.
- SseEventDecoderTest.java.
Test fixture¶
The invokeReturnsTypedResponse test demonstrates one concrete behavior. Excerpt from RestAgenticTransportTest.java. The test class supplies its fixtures and imports.
@Test
void invokeReturnsTypedResponse() {
wireMock.stubFor(post(urlEqualTo("/agents/summariser/run"))
.withHeader("Authorization", equalTo("Bearer ci-token"))
.willReturn(aResponse()
.withStatus(200)
.withHeader("Content-Type", "application/json")
.withBody("{\"agent_name\":\"summariser\",\"output\":\"hi\",\"success\":true}")));
StepVerifier.create(client.invoke("summariser", AgentRequest.of("hello")))
.assertNext(response -> {
assertThat(response.success()).isTrue();
assertThat(response.agentName()).isEqualTo("summariser");
assertThat(response.output()).isEqualTo("hi");
})
.verifyComplete();
}
Continue the application¶
Use the Agentic Bridge Autoconfigure guide for the next part of this integration. The runnable submission/query service is in Getting started.