| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…t in workflow templates
Add a max_cached_workflows parameter (default 1000, unchanged) to AgentexWorker and pass it through to the temporalio Worker. The sticky workflow-cache size was previously not configurable, so agents with many concurrent long-lived workflows (e.g. ones that park waiting for events) could not raise it above the SDK default, causing heavy sticky-cache eviction and constant workflow replay under load. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ts.delivery) event/send is accepted and acked by the ACP server before the Temporal signal is attempted, so an HTTP success does not mean the event reached a live workflow. Add an agentex.events.delivery counter tagged with an outcome label (delivered / no_live_workflow / error) and record it around send_signal in TemporalTaskService.send_event. no_live_workflow (RPCError NOT_FOUND) captures events that arrived after the task completed or idle-timed-out. Recording is best-effort and gated on AGENTEX_EVENT_METRICS; behaviour is otherwise unchanged (send_event still raises). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
| Back | FazBrowse Home | New Git URL |
What
Two independent, load-test-driven changes to the Temporal worker path:
**feat(temporal): expose max_cached_workflowsonAgentexWorker** The sticky workflow-cache size was hardcoded to the temporalio default (1000/worker) and not surfaced. Add a max_cached_workflowsparam (default **1000**, unchanged) and pass it intoWorker(...)`. No behaviour change for existing agents.
**feat(observability): agentex.events.deliverycounter**event/sendis accepted + acked by the ACP server **before** the Temporal signal is attempted, so HTTP success does not mean the event reached a live workflow. New counter tagged withoutcome (delivered/no_live_workflow/error), recorded around send_signalinTemporalTaskService.send_event. no_live_workflow=RPCError/NOT_FOUND(task already completed or idle-timed-out). Best-effort, gated onAGENTEX_EVENT_METRICS; send_event` still raises as before.
Why
A rocket-mock-async-agent load test showed 61% sticky-cache miss / 618k forced evictions → constant workflow replay, and the only "event success" signal was the ACP server's accept log (which hides events that never reached a live workflow). These two changes make the cache tunable and give a true delivery metric.
Verify (Mimir; OTLP → _total, dots→underscores)
sum(rate(agentex_events_delivery_total{outcome="delivered"}[5m])) / sum(rate(agentex_events_delivery_total[5m])) # true delivery rate sum(rate(agentex_events_delivery_total{outcome="no_live_workflow"}[5m])) # arrived too lateNote
Paired with agentex-agents PR (raises this agent's max_cached_workflows/activity limits) — this SDK PR should merge first, since max_cached_workflows isn't a valid AgentexWorker kwarg until then.
🤖 Generated with Claude Code