pub async fn serve_agentic(
nats_url: &str,
merged_agents: HashMap<String, AgentConfig>,
) -> Result<(), Error>Expand description
Run the agentic-worker runtime as a NATS-consuming service.
Builds the production AgentRuntime via build_agent_runtime and,
when it could be constructed, serves greentic.agentic.request.v1
forever via the shared aw-event-bridge. This is the out-of-process
(agentic.call) counterpart to the in-process dw.agent node.
When GREENTIC_AW_REDIS_URL is set and reachable the serve path wires
a greentic_aw_runtime::RedisDispatchLedger so JetStream at-least-once
redeliveries are short-circuited without re-running the LLM step. If the
Redis connect fails the ledger falls back to greentic_aw_runtime::NoopDispatchLedger
(idempotency disabled, warning logged) so serving is never blocked.
Returns Ok(()) immediately (a no-op) when the runtime cannot be built
(e.g. no agents, no Redis) so the host can call this unconditionally.