Make an annotated ACP agent a Micronaut bean with com.agentclientprotocol:acp-micronaut: the same application runs as a stdio agent and over Streamable HTTP and WebSocket, with no @Initialize method, a Micronaut @Around interceptor, and a Publisher return.
What You’ll Learn
@Singleton plus @AcpAgent: compile-time bean discovery, no classpath scan, exactly one agent
Reading the initialize answer a client receives, and matching each field back to the annotation that produced it
Configuring the agent (acp.agent.*) and a client (acp.client.*) from the same module
A Micronaut @Around interceptor running around a prompt handler through the SDK’s discovery
Returning a Reactive Streams Publisher instead of a plain value
The Code
The agent bean
@Singleton@AcpAgent(name = "micronaut-greeting-agent", version = "1.0.0", title = "Micronaut Greeting Agent")public class GreetingAgent { private final Greeter greeter; private final Map<String, String> sessions = new ConcurrentHashMap<>(); public GreetingAgent(Greeter greeter) { this.greeter = greeter; } @NewSession public Publisher<NewSessionResponse> newSession(NewSessionRequest req) { String sessionId = UUID.randomUUID().toString(); sessions.put(sessionId, req.cwd()); return Mono.just(new NewSessionResponse(sessionId, null, null)); } @Prompt(embeddedContext = true) @Audited public Publisher<String> prompt(PromptRequest req, SyncPromptContext ctx) { return Mono.just(greeter.greet(req.text())); } @ListSessions public ListSessionsResponse listSessions(ListSessionsRequest req) { var infos = sessions.entrySet().stream() .map(e -> new SessionInfo(e.getKey(), e.getValue())) .toList(); return new ListSessionsResponse(infos); } @CloseSession public CloseSessionResponse closeSession(CloseSessionRequest req) { sessions.remove(req.sessionId()); return new CloseSessionResponse(); }}
Two annotations make this an agent bean: @Singleton makes it a bean at all, so Greeter injects
into its constructor like into any other bean; @AcpAgent makes it the agent. Micronaut finds it
from the bean definition its annotation processor wrote at compile time, with no classpath scan, and
exactly one such bean is allowed (startup names them all if there’s more than one).
No @Initialize method
Nothing here answers initialize directly. The SDK derives it from the class:
agentInfo from @AcpAgent(name, version, title).
sessionCapabilities.list from @ListSessions, sessionCapabilities.close from @CloseSession.
promptCapabilities.embeddedContext from @Prompt(embeddedContext = true).
No loadSession (there’s no @LoadSession method).
The demo prints the exact initialize answer a client receives, field by field, matched back to the
annotation that produced it:
@Singleton@InterceptorBean(Audited.class)public class AuditInterceptor implements MethodInterceptor<Object, Object> { private final AtomicInteger calls = new AtomicInteger(); @Override public Object intercept(MethodInvocationContext<Object, Object> context) { int call = calls.incrementAndGet(); for (Object argument : context.getParameterValues()) { if (argument instanceof SyncPromptContext prompt) { prompt.sendThought("[audit] " + context.getMethodName() + " call #" + call + ", intercepted by a Micronaut @Around interceptor"); } } return context.proceed(); }}
@Audited (a plain @Around-advised annotation, nothing ACP-specific) applies this interceptor to
the prompt handler. Applying advice makes Micronaut generate a subclass of the agent class at compile
time, an “intercepted” bean carrying no @AcpAgent annotation of its own. The SDK finds the handlers
through the class the subclass extends, and invokes them on the generated subclass, so the
interceptor actually runs. No special ACP-side wiring is needed beyond the ordinary Micronaut AOP
annotations; the SDK’s own AcpInterceptor beans remain the ACP-aware alternative, applied to every
handler regardless of which method it serves.
Return types: Mono, Flux, CompletionStage, or any Publisher
Both handlers above return Publisher<T> rather than T directly or a bare Mono<T>: any
single-value Reactive Streams Publisher works, not only Mono, which lets handler code use
whichever reactive type a Micronaut data or HTTP client call already hands back. Its first element
becomes the response.
If you build the Publisher with Micronaut’s own Publishers helper rather than Reactor or Mutiny
directly, add micronaut-core-reactive to the classpath; acp-micronaut alone doesn’t pull it in.
Returning a Mono/Flux built directly needs nothing extra.
A client, and sharing the classpath with the agent
# The agent: stdio by default.acp.agent.transport.type=stdio
// A client application launches the packaged agent as a subprocesstry (ApplicationContext client = context(Map.of( "acp.agent.enabled", false, "acp.client.transport.stdio.command", java, "acp.client.transport.stdio.args", List.of("-jar", jar)))) { AcpSyncClient acp = client.getBean(AcpSyncClient.class); var init = acp.initialize(); // ...}
Each client application in this module sets acp.agent.enabled=false, since it shares this module’s
classpath (and so the agent’s own bean definition) with the agent application; in production they’re
separate applications entirely. acp.client.transport.http.uri and .websocket.uri build the other
two transports the same way, against acp.agent.transport.type=http’s listener. Customize the
autoconfigured client with an AcpClientCustomizer bean, guarded by
@Requires(property = "acp.client.transport") so it’s absent from the agent-only application:
AcpClientCustomizer is com.agentclientprotocol.sdk.integration.AcpClientCustomizer, the
framework-neutral type Spring Boot and Quarkus customizers implement too, not a Micronaut-specific
interface.
Over HTTP: one bean, many connections
Serving ACP over Streamable HTTP and WebSocket needs com.agentclientprotocol:acp-streamable-http-jetty
on the classpath, an optional dependency of acp-micronaut this module adds explicitly in its own
pom.xml; without it, stdio is the only transport available.As of the listener-key rename, the port (and host) live under acp.agent.transport.http.listener.*,
matching Spring Boot: the listener binds 127.0.0.1 by default unless
acp.agent.transport.http.listener.host says otherwise. An ACP WebSocket is a long-lived session, so
ACP has its own idle timeout, separate from HTTP keep-alive tuning; the initialize deadline closes
connections that never start. This module sets both explicitly, at their defaults:
try (ApplicationContext agent = context(Map.of( "acp.agent.transport.type", "http", "acp.agent.transport.http.listener.port", 0))) { int port = agent.getBean(AcpAgentRuntime.class).port().orElseThrow(); // ...}
Port 0 picks a free port; AcpAgentRuntime.port() reads back what was actually bound. A
Streamable HTTP client and a WebSocket client, each its own application context, connect to the same
listener; the @Around interceptor’s call count keeps climbing across both connections, since one
agent bean serves every connection the listener accepts.
./mvnw package -pl module-40-micronaut -q./mvnw exec:java -pl module-40-micronaut# The agent application on its own, over stdio or on port 8080:java -jar module-40-micronaut/target/micronaut-agent.jarjava -jar module-40-micronaut/target/micronaut-agent.jar --acp.agent.transport.type=http
The demo runs the agent two ways: a stdio client launches the packaged agent as a subprocess, prints
the derived initialize answer, prompts it (through the interceptor), lists sessions, then closes
one; then the same application serves HTTP and WebSocket on one listener, with a client on each
transport talking to the same agent bean. No API key required.
Next Module
Module 41: Quarkus: the same shape, on the Quarkus extension, with Mutiny Uni/Multi and a cancellable stream.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/schema.json","name":"Pollack AI Lab","colors":{"primary":"#4fc3f7","light":"#81d4fa","dark":"#0097a7"},"logo":{"light":"https://mintcdn.com/mcpjavasdk/vV_7S-Kh5_jdaxd-/logo/lab-light.svg?fit=max\u0026auto=format\u0026n=vV_7S-Kh5_jdaxd-\u0026q=85\u0026s=a123c4091fc6865b076075083c5b7cc7","dark":"https://mintcdn.com/mcpjavasdk/vV_7S-Kh5_jdaxd-/logo/lab-dark.svg?fit=max\u0026auto=format\u0026n=vV_7S-Kh5_jdaxd-\u0026q=85\u0026s=c3cb0c503d21faaa1f99441042d9173e"},"favicon":"https://mintcdn.com/mcpjavasdk/vV_7S-Kh5_jdaxd-/logo/favicon.svg?fit=max\u0026auto=format\u0026n=vV_7S-Kh5_jdaxd-\u0026q=85\u0026s=132d021cef95efd8a5bb2fc6c6560810","appearance":{"default":"dark"},"background":{"color":{"dark":"#020915"}},"navbar":{"links":[{"href":"https://pollack.ai","label":"pollack.ai"},{"href":"https://github.com/markpollack","type":"github"}],"primary":{"type":"button","label":"Read the Blog","href":"https://blog.pollack.ai"}},"banner":{"content":"[📓 Read the latest on the blog →](https://blog.pollack.ai)","dismissible":false},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"AgentWorks","icon":"cubes","href":"/projects#agentworks"},{"anchor":"Agento Forge","icon":"hammer","href":"/methodology/forge"},{"anchor":"Experiments","icon":"flask","href":"/experiments"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"mcpjavasdk","hasAudioNarration":false,"actualSubdomain":"mcpjavasdk","customDomains":["lab.pollack.ai"],"gitSource":{"type":"github","owner":"markpollack","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"entitlements":{},"buildId":"6afb5f3bdefb47a100b39cbc","clientVersion":"0.0.4177","searchFilterCounts":[{"language":"default","tag":"Projects","count":179},{"language":"default","tag":"AgentWorks","count":91},{"language":"default","tag":"Supporting Projects","count":69},{"language":"default","tag":"ACP Java SDK","count":67},{"language":"default","tag":"Tutorial","count":56},{"language":"default","tag":"Agent Client","count":24},{"language":"default","tag":"Agent Eval","count":17},{"language":"default","tag":"Agent Journal","count":15},{"language":"default","tag":"Concepts","count":14},{"language":"default","tag":"Reference","count":13}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"custom.css","content":"@import url('https://fonts.googleapis.com/css2?family=Geist+Mono:wght@300;400;500;600\u0026display=swap');h1,h2,h3,h4{font-family:'Geist Mono', ui-monospace, monospace!important;letter-spacing:0.02em}h1{font-weight:300!important;letter-spacing:0.06em}h2{font-weight:400!important;letter-spacing:0.04em}::selection{background:rgba(79, 195, 247, 0.25);color:#ffffff}[class*=\"Card\"] a:hover,.dark [class*=\"Card\"] a:hover{border-color:rgba(255, 215, 64, 0.5)!important;background:rgba(255, 215, 64, 0.03)!important}nav [class*=\"group\"]>span,nav [class*=\"Group\"]>span{font-family:'Geist Mono', ui-monospace, monospace!important;letter-spacing:0.12em;text-transform:uppercase;font-size:0.68rem}.dark pre{background:#020915!important;border:1px solid rgba(79, 195, 247, 0.15)}.dark :not(pre)>code{background:rgba(79, 195, 247, 0.08)!important;color:#81d4fa!important;border:1px solid rgba(79, 195, 247, 0.12)}.dark table{border-color:rgba(33, 150, 243, 0.2)}.dark th{font-family:'Geist Mono', ui-monospace, monospace!important;font-size:0.8rem;letter-spacing:0.08em;text-transform:uppercase;color:rgba(79, 195, 247, 0.7);border-bottom:1px solid rgba(79, 195, 247, 0.2)}.dark td{border-bottom:1px solid rgba(33, 150, 243, 0.1)}.dark span[style*=\"background: #22c55e\"],.dark span[style*=\"background: #3b82f6\"],.dark span[style*=\"background: #ffd740\"]{font-family:'Geist Mono', ui-monospace, monospace!important;letter-spacing:0.08em}.dark blockquote{border-left-color:#ffd740!important;background:rgba(255, 215, 64, 0.03)}.dark hr{border:none;height:1px;background:linear-gradient(90deg, rgba(79, 195, 247, 0.3), transparent)}.dark [class*=\"Note\"],.dark [class*=\"note\"]{border-color:rgba(79, 195, 247, 0.3);background:rgba(79, 195, 247, 0.04)}.dark [class*=\"Warning\"],.dark [class*=\"warning\"]{border-color:rgba(255, 215, 64, 0.4);background:rgba(255, 215, 64, 0.04)}.dark [class*=\"Step\"] [class*=\"indicator\"],.dark [class*=\"step\"] [class*=\"indicator\"]{border-color:rgba(79, 195, 247, 0.4)}footer{font-family:'Geist Mono', ui-monospace, monospace!important;letter-spacing:0.1em}.nav-tabs-item:first-child{font-size:0!important;line-height:0}.nav-tabs-item:first-child::after{content:\"Projects\";font-size:0.875rem;line-height:normal}.dark ::-webkit-scrollbar{width:6px}.dark ::-webkit-scrollbar-track{background:#020915}.dark ::-webkit-scrollbar-thumb{background:rgba(79, 195, 247, 0.2);border-radius:3px}.dark ::-webkit-scrollbar-thumb:hover{background:rgba(79, 195, 247, 0.4)}#banner{background:linear-gradient(90deg, rgba(79, 195, 247, 0.18), rgba(255, 215, 64, 0.12))!important;border-bottom:1px solid rgba(79, 195, 247, 0.35)}#banner a{font-family:'Geist Mono', ui-monospace, monospace!important;font-weight:600!important;letter-spacing:0.04em;color:#ffd740!important;text-decoration:none!important}#banner a:hover{color:#ffffff!important}"}],"page":{"pagePath":"docs/acp-java-sdk/tutorial/40-micronaut","slug":"/docs/acp-java-sdk/tutorial/40-micronaut","pageMetadata":{"title":null,"description":null,"href":"/docs/acp-java-sdk/tutorial/40-micronaut"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,li:`li`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`1`,id:`module-40-micronaut`,children:`Module 40: Micronaut`}),`\n`,_jsxs(_components.p,{children:[`Make an annotated ACP agent a Micronaut bean with `,_jsx(_components.code,{children:`com.agentclientprotocol:acp-micronaut`}),`: the same application runs as a stdio agent and over Streamable HTTP and WebSocket, with no `,_jsx(_components.code,{children:`@Initialize`}),` method, a Micronaut `,_jsx(_components.code,{children:`@Around`}),` interceptor, and a `,_jsx(_components.code,{children:`Publisher`}),` return.`]}),`\n`,_jsx(Heading,{level:`2`,id:`what-you’ll-learn`,children:`What You’ll Learn`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`@Singleton`}),` plus `,_jsx(_components.code,{children:`@AcpAgent`}),`: compile-time bean discovery, no classpath scan, exactly one agent`]}),`\n`,_jsxs(_components.li,{children:[`Reading the `,_jsx(_components.code,{children:`initialize`}),` answer a client receives, and matching each field back to the annotation that produced it`]}),`\n`,_jsxs(_components.li,{children:[`Configuring the agent (`,_jsx(_components.code,{children:`acp.agent.*`}),`) and a client (`,_jsx(_components.code,{children:`acp.client.*`}),`) from the same module`]}),`\n`,_jsxs(_components.li,{children:[`A Micronaut `,_jsx(_components.code,{children:`@Around`}),` interceptor running around a prompt handler through the SDK’s discovery`]}),`\n`,_jsxs(_components.li,{children:[`Returning a Reactive Streams `,_jsx(_components.code,{children:`Publisher`}),` instead of a plain value`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`the-code`,children:`The Code`}),`\n`,_jsx(Heading,{level:`3`,id:`the-agent-bean`,children:`The agent bean`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`38`,language:`java`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`java`,children:_jsxs(_components.code,{language:`java`,numberOfLines:`38`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`@`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`Singleton`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`@`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`AcpAgent`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"micronaut-greeting-agent\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`version`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"1.0.0\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`title`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Micronaut Greeting Agent\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`public`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` GreetingAgent`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` private`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` final`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:` Greeter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` greeter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` private`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` final`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:` Map`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`String`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`String`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#D4D4D4`},children:`> `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`sessions`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` new`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:` ConcurrentHashMap`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c>();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` public`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` GreetingAgent`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:`Greeter`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` greeter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` this`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`greeter`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` greeter;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` @`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`NewSession`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` public`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:` Publisher`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`NewSessionResponse`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`> `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`newSession`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:`NewSessionRequest`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:` String`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` sessionId`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` UUID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`randomUUID`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`toString`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` sessions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`put`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(sessionId, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`cwd`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`());`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Mono`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`just`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` NewSessionResponse`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(sessionId, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`));`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` @`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`Prompt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`embeddedContext`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` @`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`Audited`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` public`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:` Publisher`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`String`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`> `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`prompt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:`PromptRequest`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:`SyncPromptContext`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` ctx`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Mono`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`just`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`greeter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`greet`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`text`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()));`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` @`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`ListSessions`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` public`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:` ListSessionsResponse`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` listSessions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:`ListSessionsRequest`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` var`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` infos`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` sessions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`entrySet`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stream`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`map`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(e `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`->`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` SessionInfo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getKey`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(), `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`e`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getValue`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()))`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` .`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`toList`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` ListSessionsResponse`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(infos);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` @`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`CloseSession`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` public`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:` CloseSessionResponse`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` closeSession`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:`CloseSessionRequest`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` sessions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`remove`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`req`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`sessionId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`());`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` CloseSessionResponse`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Two annotations make this an agent bean: `,_jsx(_components.code,{children:`@Singleton`}),` makes it a bean at all, so `,_jsx(_components.code,{children:`Greeter`}),` injects\ninto its constructor like into any other bean; `,_jsx(_components.code,{children:`@AcpAgent`}),` makes it `,_jsx(_components.em,{children:`the`}),` agent. Micronaut finds it\nfrom the bean definition its annotation processor wrote at compile time, with no classpath scan, and\nexactly one such bean is allowed (startup names them all if there’s more than one).`]}),`\n`,_jsxs(Heading,{level:`3`,id:`no-@initialize-method`,children:[`No `,_jsx(_components.code,{children:`@Initialize`}),` method`]}),`\n`,_jsxs(_components.p,{children:[`Nothing here answers `,_jsx(_components.code,{children:`initialize`}),` directly. The SDK derives it from the class:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`agentInfo`}),` from `,_jsx(_components.code,{children:`@AcpAgent(name, version, title)`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`sessionCapabilities.list`}),` from `,_jsx(_components.code,{children:`@ListSessions`}),`, `,_jsx(_components.code,{children:`sessionCapabilities.close`}),` from `,_jsx(_components.code,{children:`@CloseSession`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`promptCapabilities.embeddedContext`}),` from `,_jsx(_components.code,{children:`@Prompt(embeddedContext = true)`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`No `,_jsx(_components.code,{children:`loadSession`}),` (there’s no `,_jsx(_components.code,{children:`@LoadSession`}),` method).`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`The demo prints the exact `,_jsx(_components.code,{children:`initialize`}),` answer a client receives, field by field, matched back to the\nannotation that produced it:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`java`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`java`,children:_jsxs(_components.code,{language:`java`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`var`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` init`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` acp`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`initialize`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`System`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`out`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`println`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`AcpJsonMapper`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`createDefault`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`writeValueAsString`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(init));`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`System`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`out`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`println`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"agentInfo (from @AcpAgent): \"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` init`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`agentInfo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`+`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \" \"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` init`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`agentInfo`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`version`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`());`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`System`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`out`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`println`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sessionCapabilities.list (from @ListSessions): \"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`init`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`agentCapabilities`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`sessionCapabilities`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`list`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`));`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`System`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`out`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`println`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"promptCapabilities.embeddedContext (from @Prompt(embeddedContext = true)): \"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` init`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`agentCapabilities`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`promptCapabilities`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`embeddedContext`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`());`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/docs/acp-java-sdk/clients-and-agents`,children:`Clients and Agents in Java`}),` for the full derivation rules\nthis applies.`]}),`\n`,_jsxs(Heading,{level:`3`,id:`the-@around-interceptor`,children:[`The `,_jsx(_components.code,{children:`@Around`}),` interceptor`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`18`,language:`java`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`java`,children:_jsxs(_components.code,{language:`java`,numberOfLines:`18`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`@`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`Singleton`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`@`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`InterceptorBean`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Audited`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`class`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`public`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` AuditInterceptor`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` implements`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` MethodInterceptor`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`Object`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`Object`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`> {`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` private`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` final`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:` AtomicInteger`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` calls`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` AtomicInteger`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` @`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`Override`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` public`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:` Object`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` intercept`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:`MethodInvocationContext`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`Object`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`Object`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`> `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`context`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:` int`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` call`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` calls`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`incrementAndGet`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:`Object`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` argument`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` :`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` context`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getParameterValues`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (argument `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`instanceof`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:` SyncPromptContext`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` prompt) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` prompt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`sendThought`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"[audit] \"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` context`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getMethodName`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`+`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \" call #\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` call`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` +`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \", intercepted by a Micronaut @Around interceptor\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` context`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`proceed`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`@Audited`}),` (a plain `,_jsx(_components.code,{children:`@Around`}),`-advised annotation, nothing ACP-specific) applies this interceptor to\nthe prompt handler. Applying advice makes Micronaut generate a subclass of the agent class at compile\ntime, an “intercepted” bean carrying no `,_jsx(_components.code,{children:`@AcpAgent`}),` annotation of its own. The SDK finds the handlers\nthrough the class the subclass `,_jsx(_components.em,{children:`extends`}),`, and invokes them on the generated subclass, so the\ninterceptor actually runs. No special ACP-side wiring is needed beyond the ordinary Micronaut AOP\nannotations; the SDK’s own `,_jsx(_components.code,{children:`AcpInterceptor`}),` beans remain the ACP-aware alternative, applied to every\nhandler regardless of which method it serves.`]}),`\n`,_jsxs(Heading,{level:`3`,id:`return-types-mono-flux-completionstage-or-any-publisher`,children:[`Return types: `,_jsx(_components.code,{children:`Mono`}),`, `,_jsx(_components.code,{children:`Flux`}),`, `,_jsx(_components.code,{children:`CompletionStage`}),`, or any `,_jsx(_components.code,{children:`Publisher`})]}),`\n`,_jsxs(_components.p,{children:[`Both handlers above return `,_jsx(_components.code,{children:`Publisher\u003cT>`}),` rather than `,_jsx(_components.code,{children:`T`}),` directly or a bare `,_jsx(_components.code,{children:`Mono\u003cT>`}),`: any\nsingle-value Reactive Streams `,_jsx(_components.code,{children:`Publisher`}),` works, not only `,_jsx(_components.code,{children:`Mono`}),`, which lets handler code use\nwhichever reactive type a Micronaut data or HTTP client call already hands back. Its first element\nbecomes the response.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`If you build the `,_jsx(_components.code,{children:`Publisher`}),` with Micronaut’s own `,_jsx(_components.code,{children:`Publishers`}),` helper rather than Reactor or Mutiny\ndirectly, add `,_jsx(_components.code,{children:`micronaut-core-reactive`}),` to the classpath; `,_jsx(_components.code,{children:`acp-micronaut`}),` alone doesn’t pull it in.\nReturning a `,_jsx(_components.code,{children:`Mono`}),`/`,_jsx(_components.code,{children:`Flux`}),` built directly needs nothing extra.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`a-client-and-sharing-the-classpath-with-the-agent`,children:`A client, and sharing the classpath with the agent`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`ini`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`ini`,children:_jsxs(_components.code,{language:`ini`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# The agent: stdio by default.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`acp.agent.transport.type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=stdio`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`java`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`java`,children:_jsxs(_components.code,{language:`java`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// A client application launches the packaged agent as a subprocess`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:`ApplicationContext`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` context`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Map`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`of`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"acp.agent.enabled\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"acp.client.transport.stdio.command\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, java,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"acp.client.transport.stdio.args\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`List`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`of`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"-jar\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, jar)))) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:` AcpSyncClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` acp`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getBean`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`AcpSyncClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`class`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` var`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` init`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` acp`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`initialize`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // ...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Each client application in this module sets `,_jsx(_components.code,{children:`acp.agent.enabled=false`}),`, since it shares this module’s\nclasspath (and so the agent’s own bean definition) with the agent application; in production they’re\nseparate applications entirely. `,_jsx(_components.code,{children:`acp.client.transport.http.uri`}),` and `,_jsx(_components.code,{children:`.websocket.uri`}),` build the other\ntwo transports the same way, against `,_jsx(_components.code,{children:`acp.agent.transport.type=http`}),`’s listener. Customize the\nautoconfigured client with an `,_jsx(_components.code,{children:`AcpClientCustomizer`}),` bean, guarded by\n`,_jsx(_components.code,{children:`@Requires(property = \"acp.client.transport\")`}),` so it’s absent from the agent-only application:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`11`,language:`java`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`java`,children:_jsxs(_components.code,{language:`java`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`@`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`Singleton`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`@`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`Requires`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`property`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"acp.client.transport\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`public`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` class`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` PrintingCustomizer`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` implements`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` AcpClientCustomizer`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` public`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:` void`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` customize`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:`AcpClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:`AsyncSpec`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` spec`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` spec`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`sessionUpdateHandler`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(notification `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`->`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // ...`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Mono`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`empty`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`AcpClientCustomizer`}),` is `,_jsx(_components.code,{children:`com.agentclientprotocol.sdk.integration.AcpClientCustomizer`}),`, the\nframework-neutral type Spring Boot and Quarkus customizers implement too, not a Micronaut-specific\ninterface.`]}),`\n`,_jsx(Heading,{level:`3`,id:`over-http-one-bean-many-connections`,children:`Over HTTP: one bean, many connections`}),`\n`,_jsxs(_components.p,{children:[`Serving ACP over Streamable HTTP and WebSocket needs `,_jsx(_components.code,{children:`com.agentclientprotocol:acp-streamable-http-jetty`}),`\non the classpath, an optional dependency of `,_jsx(_components.code,{children:`acp-micronaut`}),` this module adds explicitly in its own\n`,_jsx(_components.code,{children:`pom.xml`}),`; without it, stdio is the only transport available.`]}),`\n`,_jsxs(_components.p,{children:[`As of the listener-key rename, the port (and host) live under `,_jsx(_components.code,{children:`acp.agent.transport.http.listener.*`}),`,\nmatching Spring Boot: the listener binds `,_jsx(_components.code,{children:`127.0.0.1`}),` by default unless\n`,_jsx(_components.code,{children:`acp.agent.transport.http.listener.host`}),` says otherwise. An ACP WebSocket is a long-lived session, so\nACP has its own idle timeout, separate from HTTP keep-alive tuning; the initialize deadline closes\nconnections that never start. This module sets both explicitly, at their defaults:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`ini`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`ini`,children:_jsxs(_components.code,{language:`ini`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`acp.agent.transport.http.web-socket-idle-timeout`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=30m`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`acp.agent.transport.http.initialize-timeout`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=30s`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`java`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`java`,children:_jsxs(_components.code,{language:`java`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#4EC9B0`},children:`ApplicationContext`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` agent`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` context`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Map`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`of`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"acp.agent.transport.type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"http\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"acp.agent.transport.http.listener.port\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:` int`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` port`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` agent`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getBean`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`AcpAgentRuntime`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`class`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`port`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`orElseThrow`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // ...`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Port `,_jsx(_components.code,{children:`0`}),` picks a free port; `,_jsx(_components.code,{children:`AcpAgentRuntime.port()`}),` reads back what was actually bound. A\nStreamable HTTP client and a WebSocket client, each its own application context, connect to the same\nlistener; the `,_jsx(_components.code,{children:`@Around`}),` interceptor’s call count keeps climbing across both connections, since one\nagent bean serves every connection the listener accepts.`]}),`\n`,_jsx(Heading,{level:`2`,id:`source-code`,children:`Source Code`}),`\n`,_jsx(_components.p,{children:_jsx(_components.a,{href:`https://github.com/markpollack/acp-java-tutorial/tree/main/module-40-micronaut`,children:`View on GitHub`})}),`\n`,_jsx(Heading,{level:`2`,id:`running-the-example`,children:`Running the Example`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`./mvnw`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` package`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -pl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` module-40-micronaut`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -q`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`./mvnw`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` exec:java`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -pl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` module-40-micronaut`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# The agent application on its own, over stdio or on port 8080:`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`java`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -jar`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` module-40-micronaut/target/micronaut-agent.jar`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`java`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -jar`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` module-40-micronaut/target/micronaut-agent.jar`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --acp.agent.transport.type=http`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The demo runs the agent two ways: a stdio client launches the packaged agent as a subprocess, prints\nthe derived `,_jsx(_components.code,{children:`initialize`}),` answer, prompts it (through the interceptor), lists sessions, then closes\none; then the same application serves HTTP and WebSocket on one listener, with a client on each\ntransport talking to the same agent bean. No API key required.`]}),`\n`,_jsx(Heading,{level:`2`,id:`next-module`,children:`Next Module`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.a,{href:`/docs/acp-java-sdk/tutorial/41-quarkus`,children:`Module 41: Quarkus`}),`: the same shape, on the Quarkus extension, with Mutiny `,_jsx(_components.code,{children:`Uni`}),`/`,_jsx(_components.code,{children:`Multi`}),` and a cancellable stream.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":null,"description":null,"href":"/docs/acp-java-sdk/tutorial/40-micronaut"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Module 40: Micronaut","slug":"module-40-micronaut","depth":1,"children":[]},{"title":"What You’ll Learn","slug":"what-you’ll-learn","depth":2,"children":[]},{"title":"The Code","slug":"the-code","depth":2,"children":[{"title":"The agent bean","slug":"the-agent-bean","depth":3,"children":[]},{"title":"No @Initialize method","slug":"no-@initialize-method","depth":3,"children":[]},{"title":"The @Around interceptor","slug":"the-@around-interceptor","depth":3,"children":[]},{"title":"Return types: Mono, Flux, CompletionStage, or any Publisher","slug":"return-types-mono-flux-completionstage-or-any-publisher","depth":3,"children":[]},{"title":"A client, and sharing the classpath with the agent","slug":"a-client-and-sharing-the-classpath-with-the-agent","depth":3,"children":[]},{"title":"Over HTTP: one bean, many connections","slug":"over-http-one-bean-many-connections","depth":3,"children":[]}]},{"title":"Source Code","slug":"source-code","depth":2,"children":[]},{"title":"Running the Example","slug":"running-the-example","depth":2,"children":[]},{"title":"Next Module","slug":"next-module","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"mcpjavasdk","siteName":"Pollack AI Lab","title":"40 micronaut - Pollack AI Lab","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-30T20:03:09.665Z","originalFileLocation":"docs/acp-java-sdk/tutorial/40-micronaut.md"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"Pollack AI Lab\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/mcpjavasdk/Mlmb3Lm_XQ1b3nx5/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/mcpjavasdk/Mlmb3Lm_XQ1b3nx5/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/mcpjavasdk/Mlmb3Lm_XQ1b3nx5/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/mcpjavasdk/Mlmb3Lm_XQ1b3nx5/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/mcpjavasdk/Mlmb3Lm_XQ1b3nx5/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/mcpjavasdk/Mlmb3Lm_XQ1b3nx5/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/mcpjavasdk/Mlmb3Lm_XQ1b3nx5/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/mcpjavasdk/Mlmb3Lm_XQ1b3nx5/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/mcpjavasdk/Mlmb3Lm_XQ1b3nx5/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"40 micronaut - Pollack AI Lab\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Pollack AI Lab\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://lab.pollack.ai/docs/acp-java-sdk/tutorial/40-micronaut\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://mcpjavasdk.mintlify.site/_mintlify/api/og/v2?division=New+in+0.80.0\u0026amp;title=40+micronaut\u0026amp;theme=0456974a4d42811676bca4e8\u0026amp;signature=456cff0a720d0ca37e126ce4fa44c102641a3bb3b871f23e0b20d93785ff1076\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"40 micronaut - Pollack AI Lab\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://mcpjavasdk.mintlify.site/_mintlify/api/og/v2?division=New+in+0.80.0\u0026amp;title=40+micronaut\u0026amp;theme=0456974a4d42811676bca4e8\u0026amp;signature=456cff0a720d0ca37e126ce4fa44c102641a3bb3b871f23e0b20d93785ff1076\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/mcpjavasdk/Mlmb3Lm_XQ1b3nx5/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Pollack AI Lab\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4fc3f7\">\u003clink data-mint-head rel=\"canonical\" href=\"https://lab.pollack.ai/docs/acp-java-sdk/tutorial/40-micronaut\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/acp-java-sdk/tutorial/40-micronaut.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://lab.pollack.ai/#organization\",\"name\":\"Pollack AI Lab\",\"url\":\"https://lab.pollack.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/mcpjavasdk/vV_7S-Kh5_jdaxd-/logo/lab-light.svg?fit=max\u0026auto=format\u0026n=vV_7S-Kh5_jdaxd-\u0026q=85\u0026s=a123c4091fc6865b076075083c5b7cc7\"}},{\"@type\":\"WebSite\",\"@id\":\"https://lab.pollack.ai#website\",\"name\":\"Pollack AI Lab\",\"url\":\"https://lab.pollack.ai\",\"publisher\":{\"@id\":\"https://lab.pollack.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://lab.pollack.ai/docs/acp-java-sdk/tutorial/40-micronaut#webpage\",\"url\":\"https://lab.pollack.ai/docs/acp-java-sdk/tutorial/40-micronaut\",\"name\":\"40 micronaut\",\"dateModified\":\"2026-10-30T20:03:09.665Z\",\"isPartOf\":{\"@id\":\"https://lab.pollack.ai#website\"},\"breadcrumb\":{\"@id\":\"https://lab.pollack.ai/docs/acp-java-sdk/tutorial/40-micronaut#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://lab.pollack.ai/docs/acp-java-sdk/tutorial/40-micronaut#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Supporting Projects\",\"item\":\"https://lab.pollack.ai/projects/claude-agent-sdk\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ACP Java SDK\",\"item\":\"https://lab.pollack.ai/projects/acp-java-sdk\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Tutorial\",\"item\":\"https://lab.pollack.ai/docs/acp-java-sdk/tutorial\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"New in 0.80.0\",\"item\":\"https://lab.pollack.ai/docs/acp-java-sdk/tutorial/33-session-config-options\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"40 micronaut\",\"item\":\"https://lab.pollack.ai/docs/acp-java-sdk/tutorial/40-micronaut\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://lab.pollack.ai/docs/acp-java-sdk/tutorial/40-micronaut#article\",\"headline\":\"40 micronaut\",\"name\":\"40 micronaut\",\"url\":\"https://lab.pollack.ai/docs/acp-java-sdk/tutorial/40-micronaut\",\"mainEntityOfPage\":{\"@id\":\"https://lab.pollack.ai/docs/acp-java-sdk/tutorial/40-micronaut#webpage\"},\"dateModified\":\"2026-10-30T20:03:09.665Z\",\"publisher\":{\"@id\":\"https://lab.pollack.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://lab.pollack.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Pollack AI Lab\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Pollack AI Lab\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/acp-java-sdk/tutorial/40-micronaut.md","siteName":"Pollack AI Lab","nav":{"global":{"anchors":[{"anchor":"AgentWorks","icon":"cubes","href":"/projects#agentworks"},{"anchor":"Agento Forge","icon":"hammer","href":"/methodology/forge"},{"anchor":"Experiments","icon":"flask","href":"/experiments"}]},"tabs":[{"tab":"Projects","groups":[{"group":"Projects","pages":[{"title":"Pollack AI Lab","sidebarTitle":"Overview","href":""},{"title":"What's New","sidebarTitle":"What's New","href":"/whats-new"},{"title":"Using development snapshots from main","sidebarTitle":"Development snapshots","href":"/docs/development-snapshots"},{"title":"Projects","href":"/projects/index"},{"group":"Bud","pages":[{"title":"Bud","href":"/projects/bud"}]}]},{"group":"AgentWorks","pages":[{"group":"AgentWorks BOM","pages":[{"title":"AgentWorks BOM","href":"/projects/agentworks-bom"},{"title":"What's New","sidebarTitle":"What's New","href":"/docs/agentworks-bom/whats-new"},{"title":"Upgrading from org.springaicommunity coordinates","href":"/docs/agentworks-bom/upgrading-from-springaicommunity"}]},{"group":"Agent Workflow","pages":[{"title":"Agent Workflow","href":"/projects/agent-workflow"},{"title":"What's New","sidebarTitle":"What's New","href":"/docs/agent-workflow/whats-new"},{"title":"AgentLoop","href":"/docs/agent-workflow/agent-loop"},{"title":"Getting Started with Agent Workflow","href":"/docs/agent-workflow/getting-started"},{"group":"Tutorial","pages":[{"title":"Typed Workflow Tutorial","href":"/docs/agent-workflow/tutorial"},{"title":"Runnable Workflow Examples","href":"/docs/agent-workflow/examples"}]},{"title":"Annotation Model","href":"/docs/agent-workflow/annotation-model"},{"title":"Typed Step Inputs and Constructor Injection","href":"/docs/agent-workflow/parameterization"},{"title":"DSL Primitives","href":"/docs/agent-workflow/choosing-a-pattern"},{"title":"Wiring Complex Pipelines","href":"/docs/agent-workflow/wiring"},{"title":"Agent Workflow API Reference","href":"/docs/agent-workflow/api-reference"},{"title":"Trace Capture","sidebarTitle":"Trace Capture","href":"/docs/agent-workflow/trace-capture"},{"title":"Local Durability and Recovery","href":"/docs/agent-workflow/durability"}]},{"group":"Agent Client","pages":[{"title":"Agent Client","href":"/projects/agent-client"},{"title":"What's New","sidebarTitle":"What's New","href":"/docs/agent-client/whats-new"},{"title":"Getting Started","sidebarTitle":"Getting Started","href":"/docs/agent-client/howto/getting-started"},{"group":"Tutorial","pages":[{"title":"Agent Client Tutorial","sidebarTitle":"Tutorial Overview","href":"/docs/agent-client/tutorial/index"},{"title":"Lesson 1: Your First Agent Task","sidebarTitle":"01 - First Task","href":"/docs/agent-client/tutorial/01-first-task"},{"title":"Lesson 2: Multi-Provider","sidebarTitle":"02 - Multi-Provider","href":"/docs/agent-client/tutorial/02-multi-provider"},{"title":"Lesson 3: Read and Transform","sidebarTitle":"03 - Read \u0026 Transform","href":"/docs/agent-client/tutorial/03-read-and-transform"},{"title":"Lesson 4: Git Operations","sidebarTitle":"04 - Git Operations","href":"/docs/agent-client/tutorial/04-git-operations"},{"group":"Async conversations","pages":[{"title":"One server, many conversations","sidebarTitle":"01 - One server, many conversations","href":"/docs/agent-client/tutorial/async/01-one-server-many-conversations"},{"title":"A shared conversation, in arrival order","sidebarTitle":"02 - Shared conversation","href":"/docs/agent-client/tutorial/async/02-shared-conversation-arrival-order"},{"title":"Separate conversations, independently","sidebarTitle":"03 - Separate conversations","href":"/docs/agent-client/tutorial/async/03-separate-conversations"},{"title":"Picking a conversation up later","sidebarTitle":"04 - Picking up later","href":"/docs/agent-client/tutorial/async/04-picking-up-later"}]}]},{"title":"Switching Providers","sidebarTitle":"Switching Providers","href":"/docs/agent-client/howto/switching-providers"},{"title":"Structured Output","sidebarTitle":"Structured Output","href":"/docs/agent-client/howto/structured-output"},{"title":"Give an agent MCP servers","sidebarTitle":"MCP servers","href":"/docs/agent-client/howto/mcp-servers"},{"group":"Reference","pages":[{"title":"Portable Options Reference","sidebarTitle":"Portable Options","href":"/docs/agent-client/reference/portable-options"},{"title":"Claude Reference","sidebarTitle":"Claude Reference","href":"/docs/agent-client/reference/claude-reference"},{"title":"Codex Reference","sidebarTitle":"Codex Reference","href":"/docs/agent-client/reference/codex-reference"},{"title":"Gemini Reference","sidebarTitle":"Gemini Reference","href":"/docs/agent-client/reference/gemini-reference"},{"title":"Grok Reference","sidebarTitle":"Grok Reference","href":"/docs/agent-client/reference/grok-reference"},{"title":"Antigravity Reference","sidebarTitle":"Antigravity Reference","href":"/docs/agent-client/reference/antigravity-reference"},{"title":"Agent Sessions","href":"/docs/agent-client/reference/sessions"},{"title":"Async Lifecycle","sidebarTitle":"Async Lifecycle","href":"/docs/agent-client/reference/async-lifecycle"}]},{"title":"Defaults Philosophy","sidebarTitle":"Defaults Philosophy","href":"/docs/agent-client/explanation/defaults-philosophy"}]},{"group":"Agent Eval","pages":[{"title":"Agent Eval","href":"/projects/agent-judge"},{"title":"What's New","sidebarTitle":"What's New","href":"/docs/agent-judge/whats-new"},{"title":"Getting started with Agent Eval","href":"/docs/agent-judge/getting-started"},{"group":"Tutorial","pages":[{"title":"Executable Tutorial","href":"/docs/agent-judge/tutorial"},{"title":"PetClinic: running the specification","href":"/docs/agent-judge/petclinic-case-study"},{"title":"Writing Custom Judges","href":"/docs/agent-judge/custom-judge"}]},{"title":"Configured juries and coverage","href":"/docs/agent-judge/jury-system"},{"title":"Reading and retaining results","href":"/docs/agent-judge/interpreting-verdicts"},{"title":"Built-in Judges","href":"/docs/agent-judge/built-in-judges"},{"title":"Requirements, evidence, and execution","href":"/docs/agent-judge/requirements-judges"},{"title":"Requirement documents: syntax, strict loading and the linter","sidebarTitle":"Requirement documents","href":"/docs/agent-judge/requirement-documents"},{"title":"Prompt size guard","sidebarTitle":"Prompt size guard","href":"/docs/agent-judge/prompt-size-guard"},{"title":"Agent Eval API reference","href":"/docs/agent-judge/api-reference"},{"title":"Migrating to Agent Eval 0.18","sidebarTitle":"Migrating to 0.18","href":"/docs/agent-judge/migration-0.18"},{"title":"Migrating to 0.17","sidebarTitle":"Migrating to 0.17","href":"/docs/agent-judge/migration-0.17"},{"title":"Agent Eval design","href":"/docs/agent-judge/design-philosophy"},{"title":"Research Foundations","href":"/docs/agent-judge/research-foundations"}]},{"group":"Agent Bench","pages":[{"title":"Agent Bench","href":"/projects/agent-bench"},{"title":"What's New","sidebarTitle":"What's New","href":"/docs/agent-bench/whats-new"},{"title":"Getting Started with Agent Bench","href":"/docs/agent-bench/getting-started"},{"title":"Agent Configuration","href":"/docs/agent-bench/agent-config"},{"title":"Jury System","href":"/docs/agent-bench/jury-system"},{"title":"CLI Reference","href":"/docs/agent-bench/cli-reference"}]},{"group":"Agent Experiment","pages":[{"title":"Agent Experiment","href":"/projects/agent-experiment"},{"title":"What's New","sidebarTitle":"What's New","href":"/docs/agent-experiment/whats-new"},{"title":"Getting Started with Agent Experiment","href":"/docs/agent-experiment/getting-started"},{"title":"Creating Experiments","href":"/docs/agent-experiment/creating-experiments"},{"title":"Sessions and Sweeps","href":"/docs/agent-experiment/sessions-and-sweeps"},{"title":"Building a Jury","href":"/docs/agent-experiment/jury-system"},{"title":"Agent Experiment API Reference","href":"/docs/agent-experiment/api-reference"}]},{"group":"Agent Hooks","pages":[{"title":"Agent Hooks","href":"/projects/agent-hooks"},{"title":"What's New","sidebarTitle":"What's New","href":"/docs/agent-hooks/whats-new"}]},{"group":"Agent Memory","pages":[{"title":"Agent Memory","href":"/projects/agent-memory"},{"title":"What's New","sidebarTitle":"What's New","href":"/docs/agent-memory/whats-new"}]},{"group":"Agent Journal","pages":[{"title":"Agent Journal","href":"/projects/agent-journal"},{"title":"What's New","sidebarTitle":"What's New","href":"/docs/agent-journal/whats-new"},{"title":"Which Journal Do I Need?","sidebarTitle":"Which Journal do I need?","href":"/docs/agent-journal/1x-or-2"},{"group":"Agent Journal 2.0","pages":[{"title":"Agent Journal 2.0 Overview","sidebarTitle":"Overview","href":"/docs/agent-journal/v2/overview"},{"title":"Agent Journal 2.0: Getting Started","sidebarTitle":"Getting started","href":"/docs/agent-journal/v2/getting-started"},{"title":"Agent Journal 2.0: Capture","sidebarTitle":"Capture","href":"/docs/agent-journal/v2/capture"},{"title":"Agent Journal 2.0: Reading Packages","sidebarTitle":"Reading packages","href":"/docs/agent-journal/v2/reading"},{"title":"Agent Journal 2.0: CLI Support","sidebarTitle":"CLI support","href":"/docs/agent-journal/v2/cli-support"},{"title":"Agent Journal 2.0: Agent Client Recording","sidebarTitle":"Agent Client recording","href":"/docs/agent-journal/v2/agent-client"}]},{"group":"Agent Journal 1.x (released)","pages":[{"title":"Getting Started","href":"/docs/agent-journal/getting-started"},{"title":"Core Concepts","href":"/docs/agent-journal/concepts"},{"group":"Guides","pages":[{"title":"Capture SDK Sessions","href":"/docs/agent-journal/capture-sessions"},{"title":"Sub-agent Capture","href":"/docs/agent-journal/subagent-capture"},{"title":"Analyze Runs with DuckDB","href":"/docs/agent-journal/analyzing-runs"}]},{"title":"API Reference","href":"/docs/agent-journal/api-reference"}]}]},{"group":"Agent Sandbox","pages":[{"title":"Agent Sandbox","href":"/projects/agent-sandbox"},{"title":"What's New","sidebarTitle":"What's New","href":"/docs/agent-sandbox/whats-new"}]}]},{"group":"Supporting Projects","pages":[{"group":"Claude Agent SDK","pages":[{"title":"Claude Agent SDK (Java)","href":"/projects/claude-agent-sdk"},{"title":"What's New","sidebarTitle":"What's New","href":"/docs/claude-agent-sdk/whats-new"}]},{"group":"ACP Java SDK","pages":[{"title":"ACP Java SDK","href":"/projects/acp-java-sdk"},{"title":"ACP Java SDK","sidebarTitle":"Overview","href":"/docs/acp-java-sdk/index"},{"title":"What's New","sidebarTitle":"What's New","href":"/docs/acp-java-sdk/whats-new"},{"title":"What's New 0.81.0","href":"/docs/acp-java-sdk/whats-new-0.81"},{"title":"Migrating to 0.80.0","sidebarTitle":"Migrating to 0.80.0","href":"/docs/acp-java-sdk/migration-0.80"},{"group":"Framework Integrations","pages":[{"title":"ACP Spring Boot Autoconfiguration","sidebarTitle":"Spring Boot Starter","href":"/docs/acp-java-sdk/autoconfig"},{"title":"Micronaut Integration","sidebarTitle":"Micronaut","href":"/docs/acp-java-sdk/micronaut"},{"title":"Quarkus Integration","sidebarTitle":"Quarkus","href":"/docs/acp-java-sdk/quarkus"}]},{"group":"Concepts","pages":[{"title":"Concepts","sidebarTitle":"Concepts","href":"/docs/acp-java-sdk/concepts"},{"title":"Clients and Agents in Java","sidebarTitle":"Clients \u0026 Agents","href":"/docs/acp-java-sdk/clients-and-agents"},{"title":"Session Config Options","sidebarTitle":"Config Options","href":"/docs/acp-java-sdk/config-options"},{"title":"Cancellation","sidebarTitle":"Cancellation","href":"/docs/acp-java-sdk/cancellation"},{"title":"Extension Methods","sidebarTitle":"Extensions","href":"/docs/acp-java-sdk/extensions"},{"title":"Elicitation","sidebarTitle":"Elicitation","href":"/docs/acp-java-sdk/elicitation"},{"title":"Terminal Auth and Logout","sidebarTitle":"Auth \u0026 Logout","href":"/docs/acp-java-sdk/terminal-auth-and-logout"},{"title":"Transports","sidebarTitle":"Transports","href":"/docs/acp-java-sdk/transports"},{"title":"Agent-to-Client Calls","sidebarTitle":"Agent → Client Calls","href":"/docs/acp-java-sdk/agent-to-client-calls"},{"title":"Forward Compatibility","sidebarTitle":"Forward Compat","href":"/docs/acp-java-sdk/forward-compatibility"},{"title":"Errors","sidebarTitle":"Errors","href":"/docs/acp-java-sdk/errors"},{"title":"JSON Mappers","sidebarTitle":"JSON Mappers","href":"/docs/acp-java-sdk/json-mappers"},{"title":"Testing","sidebarTitle":"Testing","href":"/docs/acp-java-sdk/testing"},{"title":"Stable vs Unstable","sidebarTitle":"Stability","href":"/docs/acp-java-sdk/stability"}]},{"group":"Tutorial","pages":[{"title":"Tutorial","sidebarTitle":"Overview","href":"/docs/acp-java-sdk/tutorial/index"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/01-first-contact"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/02-protocol-basics"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/03-sessions"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/04-prompts"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/05-streaming-updates"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/06-update-types"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/07-agent-requests"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/08-permissions"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/09-session-resume"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/10-cancellation"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/11-error-handling"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/12-echo-agent"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/13-agent-handlers"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/14-sending-updates"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/15-agent-requests"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/16-in-memory-testing"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/17-capability-negotiation"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/18-terminal-operations"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/19-mcp-servers"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/20-session-management"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/21-async-client"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/22-async-agent"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/23-spring-boot-agent"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/24-spring-boot-client"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/25-ai-chatbot-agent"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/26-spring-ai-chatbot"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/27-langchain4j-chatbot"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/28-zed-integration"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/29-jetbrains-integration"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/30-vscode-integration"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/31-elicitation"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/32-agent-client"},{"group":"New in 0.80.0","pages":[{"title":null,"href":"/docs/acp-java-sdk/tutorial/33-session-config-options"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/34-extension-methods"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/35-cancellation-timeouts"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/36-terminal-auth-logout"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/37-streamable-http-websocket"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/38-spring-boot-http"},{"title":null,"description":null,"href":"/docs/acp-java-sdk/tutorial/39-forward-compatibility"},{"title":null,"href":"/docs/acp-java-sdk/tutorial/40-micronaut"},{"title":null,"description":null,"href":"/docs/acp-java-sdk/tutorial/41-quarkus"}]}]},{"title":"Java API Reference","sidebarTitle":"Java","href":"/docs/acp-java-sdk/reference/java"},{"title":"Cross-SDK Compatibility","sidebarTitle":"Compatibility","href":"/docs/acp-java-sdk/compatibility"},{"title":null,"href":"/docs/acp-java-sdk/resources"}]}]},{"group":"Related Projects","pages":[{"title":"Agent Tools","href":"/projects/agent-tools"},{"title":"Agent Skills","href":"/projects/agent-skills"}]},{"group":"Explorations","pages":[{"title":"Agento University","href":"/product/agento-university"},{"title":"The Bud Family","href":"/product/bud-family"}]},{"group":"Older / Inactive Projects","pages":[{"group":"Loopy","pages":[{"title":"Loopy","href":"/projects/loopy"},{"title":"Getting Started with Loopy","href":"/docs/loopy/getting-started"},{"title":"Extending Loopy","href":"/docs/loopy/extending"},{"title":"Loopy CLI Reference","href":"/docs/loopy/cli-reference"},{"title":"What's New","sidebarTitle":"What's New","href":"/docs/loopy/whats-new"}]}]}]},{"tab":"Agento Forge","groups":[{"group":"Forge","pages":[{"title":"Agento Forge","href":"/methodology/forge"},{"title":"Your First Research Agent","href":"/docs/forge/getting-started"}]},{"group":"Reference","pages":[{"title":"Knowledge-Directed Execution","href":"/methodology/knowledge-directed-execution"},{"title":"Improvement Flywheel","href":"/methodology/improvement-flywheel"},{"title":"Knowledge Base Design","href":"/methodology/knowledge-base-design"},{"title":"Knowledge Base Freshness","href":"/methodology/knowledge-base-freshness"},{"title":"Four-Tier Jury","href":"/methodology/four-tier-jury"}]}]},{"tab":"Experiments","groups":[{"group":"Experiments","pages":[{"title":"Experiments","href":"/experiments"},{"title":"Code Coverage v1 — Knowledge Injection Baseline","href":"/experiments/code-coverage-v1"},{"title":"Code Coverage v2 — Skills vs Knowledge Bases","href":"/experiments/code-coverage-v2"},{"title":"Code Coverage v3 — The Exemplar Effect","href":"/experiments/code-coverage-v3"},{"title":"Issue Classification — Infrastructure vs Prompts","href":"/experiments/issue-classification"}]}]}]},"basePath":"","title":"40 micronaut - Pollack AI Lab","deploymentId":"dpl_HhUetB7eHHDAmK9T1Teip38TgFx9","buildId":"dpl_HhUetB7eHHDAmK9T1Teip38TgFx9","dynamics":["10e4515597"],"chunks":["BannerMarkdown-BjdIPj1P.js","dist-C5gjFYHe.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","katex-YMM-FMeD.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}