Limits¶
This page lists the limits Agent Kourier places that an operator, a Binding author or an agent backend can run into. Each row gives the value, where it applies, what happens past it, and whether a setting changes it. The reasons and the how-tos are on the pages the rows link to.
Where a value is a constant of the code, or a default the code fills in, a test compares it with this page in every test run. Some values are rules of Kubernetes or of a chat platform that the code does not hold as a constant, and a few are shapes of the code, such as the message fields a trigger reads; the tests read what the code does for those. The figures that were measured, and not read from the code, say so.
The page lists the limits you can run into. It leaves out numbers that change nothing an operator, a Binding author or an agent can see: the intervals and batch sizes of the background loops, the retry pacing of the press worker and the outbox sweep, and Slack layout numbers that a lower cut earlier in the broker hides.
What "past it" means.
- Refused at load: the broker's own validation rejects the object when it reads it. On the files route one such object fails the whole config: at start the broker exits with code 2, and on a reload it keeps the last good config. On the custom resource route a new object is not served, and an object that was good before keeps being served as its last good generation. See What a bad object does.
- Refused by the API server: the CRD schema rejects the create or update, so the object never reaches the broker. This is the custom resource route only. A schema bound that the code also holds is refused at load too, because the broker checks every object it reads. The schema counts characters and the broker counts bytes, so a value of multibyte characters can pass the API server and still be refused at load.
- Cut: shortened. Where the text is shown to people, the end is marked
… (truncated). - Ends the turn, dropped, queued: the turn stops, the item is thrown away, or it waits. The row says which, and what the thread is told.
Run the broker¶
| Limit | Value | Past it | Setting |
|---|---|---|---|
Kubernetes version, custom resource route (config.source: crds) |
1.33 or later |
helm install and helm upgrade fail while the chart renders, with config.source crds needs Kubernetes 1.33 or later. The ConfigMap route has no minimum of its own. On either route the chat listener (chatListener.enabled with rbac.create) adds a ValidatingAdmissionPolicy of admissionregistration.k8s.io/v1, for which the chart checks no version: the chart's tests run it on 1.33 and later only. |
None. With helm template, pass the cluster's version with --kube-version. |
| Replicas that do the work | One | With SQLite, replicaCount above 1 fails while the chart renders. With Postgres the replicas elect a leader through a Lease: one works and the others stand by. See Run two replicas. |
store.type, replicaCount |
| ChatConnections one broker serves | 16 in all. The broker's own (AGENTKOURIER_CHAT_CONNECTION), if it has one, takes the first place, and with custom resources the ChatConnections of the namespaces it admits take the rest by age: creationTimestamp, oldest first, then namespace, then name. It admits the namespaces in AGENTKOURIER_CONNECTION_NAMESPACES and those whose labels match AGENTKOURIER_CONNECTION_NAMESPACE_SELECTOR, or every namespace when none of the three variables is set or the selector is {}: then the 16 places are shared by every ChatConnection of the cluster. With no own connection all 16 places go by age. |
With files, a directory that holds none or several stops the start (exit code 2). With custom resources the broker serves its own connection, if it has one, and the oldest ChatConnections of the namespaces it admits, up to the 16, and no others. A connection past the sixteenth is not run, and the Bindings it admits (those of its own namespace and of the namespaces in its allowedNamespaces) say ConnectionNotServed, with the reason that the broker serves at most 16, and the leader counts them in agentkourier_config_binding_rejections{reason="ConnectionNotServed"} (Metrics). The source logs it once at WARN, and it is served again, logged once at INFO, when a connection ahead of it is deleted or its namespace stops being admitted. An invalid connection takes a place too, and so does one whose Secret the broker cannot read; a deleted one keeps its place until its deletion takes effect, and so does a second connection of a Slack or Microsoft Teams app that is not run (the next row), so the choice depends on the objects' ages and names and not on their contents. A ChatConnection of a namespace that is not admitted is not served, takes no place, and its Secret is not read. |
The 16 has no setting. config.chatConnection names the own connection, and config.connectionNamespaces and config.connectionNamespaceSelector the namespaces (none of the three, and no config.chatConnections entry, for every namespace), custom resources only |
| How soon a team ChatConnection's runtime follows a change | The broker looks at the team connections it serves each 5s. It reads the connections from the config snapshot, so a ChatConnection added, edited or no longer served is seen after the config reload that carries it, and the credentials from the Secret informers' cache, so a changed Secret is seen at the first look after the cache has it. A connection is started, restarted (when its generation or the content of its Secret changed) or stopped at that look. |
Until then the runtime is as it was. A Secret that cannot be read when the connection is first seen is looked at again at each look, and the connection starts once it can be read. A Secret that does not exist yet is read at the first look after it is created. One that the API server denied (the team's Role is missing) is asked for again only at the config recheck, so a Role applied late is noticed after up to about 1 m 10 s (the row on a Secret the API server answers forbidden, below, has the figures; no setting changes them) and then at the next look. | None |
| Asking Slack whose bot a team connection's token is | Each connection is asked once, with auth.test and then bots.info for the bot it names, before it starts, and again only if its ChatConnection or Secret changes. The own connection, if there is one, is asked the same when the broker serves a team connection. Each call is cut at 10s. |
The connection does not start, and is asked again at the next look, unless Slack answered that the token is refused (invalid_auth, token_revoked, token_expired, account_inactive, not_authed): then it is not asked again until its ChatConnection or Secret changes. A connection whose Slack app (the app ID bots.info gives, so one app installed in two workspaces counts once) another served connection uses is not run: the older is served, a younger one that runs is stopped when an older of its app turns up, and the Bindings of the one not run say ConnectionNotServed. |
None |
| Waiting for a team connection's Slack run to stop | When the broker stops a team connection (removed, or restarted on a change) it waits at most 5s for the run to return. |
A WARN says so and the broker goes on: the run has been told to stop and ends on its own. | None |
| Reconnecting Slack after the connection is lost | A connection that cannot be opened, or that was lost and cannot be opened again, ends the run of the connection, and the broker runs it again after a wait. The first wait is 1s, and each wait after a failure is twice the one before, up to 60s. Each wait is cut at random by up to half of itself, so it is never shorter than half of that pause or longer than it, and each connection draws its own: connections that fail together do not retry together. The pauses start again from 1s after a run that lasted 120s or more before it failed. When Slack answers a call with a rate limit and a Retry-After longer than the wait, the broker waits that long, but no longer than 5m. |
The broker retries for as long as Slack does not reject the credentials, so the longest wait is 60s, or Slack's Retry-After when that is longer. A Retry-After past 5m is cut to 5m. A rejection of the tokens (invalid_auth, not_authed, token_revoked, token_expired or account_inactive) is not retried: the own connection, if there is one, exits the process with code 1, and a team connection stops (ChatCredentialsRejected); a broker with no own connection never exits for it. agentkourier_chat_connected is 0 from when the connection is lost, which is when the library starts to connect again, until Slack's hello. A WARN, slack connection ended; connecting again, says why and how long the wait is. |
None |
| What the Slack client library does itself on a connection | slack-go v0.36.0, read in its source. It connects again at once, with no wait and no jitter, when Slack asks for a refresh (a disconnect message) and for the first attempt after the connection is lost. It drops a connection on which Slack has sent no WebSocket ping for more than 30s, which it checks every 30 seconds, so a silent connection is dropped 30 to 60 seconds after the last ping, and counts the WebSocket handshake as failed after 45s. The call that opens the connection (apps.connections.open) has no timeout of its own: the broker bounds it with its HTTP client (the next row). |
A failed attempt ends the run, and the row above sets the wait. The library's own retry, which started at 100 ms, doubled up to 5 minutes and had no jitter, no longer runs: it is not used for any attempt, the first connection of a run included. | None |
| One Slack Web API call | 30s for each call, counted from the start of the request to the end of the response body: the dial, the TLS handshake, the wait for the answer and the reading of it. The bound is on the broker's HTTP client for the Slack Web API, so it applies to every call the Slack adapter makes, the auth.test that each run starts with and the apps.connections.open that opens each Socket Mode connection and each reconnection included. It does not apply to the Socket Mode WebSocket, which the client library dials with its own dialer (the row above), so a connection that stays up is not cut. A call that the adapter bounds more closely, such as users.info (5s) or the membership checks of a button press (10s in the broker), ends at its own bound. |
The call fails with a client timeout error. The adapter classes that as a transient failure, which is not a rejection of the credentials, so nothing is stopped for it. When it is auth.test or apps.connections.open, the run of the connection ends with the failure, and the row on reconnecting sets the wait before the broker runs it again. Without the bound a call on a connection that a network blip had left dead held the run for up to two minutes (53 and 118 seconds were seen) before it failed. |
None |
A request to the chat listener (AGENTKOURIER_CHAT_LISTEN; there is none while it is unset) |
A body of up to 1 MiB, and a request line and headers of up to 16 KiB. The headers must arrive within 1s and the whole request within 2s, both counted from the start of the request. The connection's handler is given a context that ends 3s after the body was read, and the answer must be written within 6s of the end of the headers: the time to read the request, the handler's 3s, and 1s to write the answer. A Microsoft Teams connection's handler asks for a longer deadline, for every request of the connection (the row on the answer to a press of a Microsoft Teams card): its context ends then instead, and its answer must be written within the same 1s after it. A kept-alive connection is closed after 30s with no request. |
A body past its cap is answered 413 and the connection's handler is not called: a body with a declared length is not read, and one sent in chunks is read only to the cap. Headers past theirs are answered 431, by Go's HTTP server, which allows a few KiB over the cap. A request whose headers are late is cut, its connection closed, and one whose body is late is answered 400; neither reaches the handler. Past its context the handler is expected to answer, and an answer not written within its bound is cut with the connection. Slack waits about 3 seconds for an answer before it sends a request again (Slack's own behaviour, not checked here), so these bounds hold a request only as long as its answer can still count. A POST to a connection with no route on this replica (a standby, a leader whose connection is starting, restarting or down, a connection that takes nothing over HTTP, or none of that name) is answered 503 with a Retry-After of 5s, and the connection closed, before any of its body is read; it is counted as no_route on agentkourier_chat_listener_requests_total. |
None |
| Requests the chat listener hands to their handlers at once | 32 requests whose connection's handler is running, across all connections. A request takes a place only once its body has been read whole, so a client that sends its body slowly holds none. A press of a Microsoft Teams card holds its place while it waits for its decision (the row on the answer to a press of a Microsoft Teams card), and at most 16 presses wait so at once: a press past them is recorded and answered at once as received, as if it had not been decided in the wait. |
While every place is taken, the next request is answered 503 with a Retry-After of 5s, and the connection closed, before any of its body is read; a request whose body was read while the last places were taken is answered 503 with the same Retry-After once it has been read. Both are counted as busy on agentkourier_chat_listener_requests_total. Slack sends them again; Microsoft Teams sent a message activity answered 503 at once again once, about 0.6 seconds later, when measured (the row on a request that Microsoft Teams sends). |
None |
| Request bodies the chat listener holds at once | 32 MiB of live body buffers, across all requests being read or handled, from the start of the read until the handler returns: an eighth of the chart's default memory limit. A body is read into buffers of 4 KiB, each counted before it is allocated, so a request being read holds at most 4 KiB more than it has received (a body of the full 1 MiB holds 1 MiB and 4 KiB). A request holds its first 4 KiB as soon as its headers are read, whatever it has sent of its body, so the budget is held either by 8192 connections that are in the middle of their bodies, until the bound on reading the request cuts them, or by 32 MiB actually sent. The number of connections is not counted in it. |
A request whose next buffer does not fit is answered 503 with a Retry-After of 5s, and the connection closed, without the rest of its body being read; it is counted as busy. Slack sends it again; Microsoft Teams sent a message activity answered 503 at once again once, about 0.6 seconds later, when measured (the row on a request that Microsoft Teams sends). |
None |
A request that Slack sends to a ChatConnection in HTTP mode (spec.slack.mode: http) |
Its timestamp (X-Slack-Request-Timestamp) must be within 5m of the broker's clock, either way, and its signature (X-Slack-Signature) the one the connection's signingSecret makes of the timestamp and the body. An event or a press that passes goes on the lane of its channel (the row on the events the adapter holds, in Start investigations), and the answer waits at most 2s, counted from when the connection's handler was given the request, for the broker to take it. |
A request outside the time window, or not signed with the secret, is answered 401, and nothing of its body is decoded. An event the broker has not taken within the wait is answered 503, and so is one that the lane's bounds shed or the broker could not take: Slack sends it again (Slack's own behaviour, not checked here). The broker may still take one that was answered 503 for the wait, and Slack's second copy of a message is then dropped as a duplicate once the first has been decided. Each answer is counted on agentkourier_slack_http_requests_total (Metrics). |
None |
A request that Microsoft Teams sends to a ChatConnection in http mode (spec.teams.mode), which the leader takes on its chat listener |
The request's body is held to the chat listener's cap (the row on a request to the chat listener). Its bearer token must be signed RS256 by a key that the Bot Framework publishes and endorses for Microsoft Teams, name the connection's spec.teams.appID as its audience and the activity's serviceUrl as its service URL, and have an expiry and a not-before time within 5m of the broker's clock. A token waits at most 3s for the keys while they are being fetched, the chat listener's default deadline, although the connection's requests have a longer one (the row on the answer to a press of a Microsoft Teams card). The keys are fetched when the connection starts taking requests, their age is checked every 1h, and they are fetched again in the background once they are 12h old, whether or not requests come, and used while that fetch fails until they are 24h old. After a fetch that failed the next waits 1s, twice as long after each further failure, up to 5m. A token whose key they do not hold makes one more fetch, and the next such token another only once that longest wait has passed. A published key of fewer than 2048 bits is ignored, as if it were not published. A fetch, the metadata and the key set together, is cut at 10s and reads at most 4 MiB of each (the key set was about 0.8 MB in November 2026, measured). The activity's ID is at most 64 bytes; a message's ID, and the replyToId of an invoke, hold no :; and its channelData.tenant.id must be the connection's spec.teams.tenantID. The connection takes requests only while it runs. An activity is remembered by its type, channel and ID for at least 10m, and for less than twice that, in two generations of at most 4096 activities each. Accepted activities wait for the broker on a lane for each channel and are handed on in the order they came: a channel's lane holds 16, and once the lanes hold 256 in all, a channel that already has one waiting takes no other, while a channel with none still takes its first. A post that the broker does not take is given to it again on its lane, up to 4 times in all, after 1s and then twice as long after each further failure, up to 4s; the channel's later activities wait behind it. When the connection stops, what it accepted is handed on for at most 1s more. |
A token that fails a check is answered 401, and one that cannot be checked because no key set younger than a day could be fetched, or because its wait for a fetch ran out, 503; an activity with a longer ID, or a : where none may be, is answered 400, one of another tenant 403, and a request while the connection does not run (before it starts, or once it stops) 503. None of them is worked on. A refused token that the Bot Framework signed (one that names another app, is out of the skew, or fails the issuer, endorsement or service URL check) means the connection's app ID or the broker's clock is wrong, and is logged at WARN, one line for each reason every 10s with a count of those not logged; a log line quotes at most 256 bytes of a value the request chose. An activity that comes again within the window is answered 200 and handed on to nothing; one remembered for less than the window because a generation filled early may be taken again. Any activity other than an invoke that its channel's lane cannot take is answered 503; an invoke is still answered, and only what it says of its channel is not recorded. A post still not taken after the last try is dropped, and the same activity is taken if it comes again. What is still waiting when the drain ends is dropped. What Microsoft Teams sends again was measured on a test tenant: an activity answered 200, or one whose request it held until it gave up (about 25 seconds for a message, 14 for an invoke), never; a message answered 503 at once, once, about 0.6 seconds later, with the same ID; an invoke answered 503, and other status codes, were not measured. So a message answered 503 is taken when it comes again if the lane has room by then, and lost if not, and an activity answered 200 and then dropped is lost. |
None |
| The answer to a press of a Microsoft Teams card | The chat listener gives a Microsoft Teams connection's request a context that ends 8s after its body was read, in place of its 3s, and a press waits in it up to 6s for the worker that decides recorded presses to decide it. Measured on a test tenant, from the invoke's arrival to the answer: the Teams client showed the answer given at 12.5 seconds and gave up on one given at 13 seconds, showing the person who pressed an error, while Teams' service held the request until about 13.9 seconds. The chat listener's 2s to read the request, the 8s and its 1s to write the answer come to 11s, which leaves the network a margin. A message activity is answered at once, and a token waits for the signing keys no longer than it did (the row on a request that Microsoft Teams sends), so only a press uses the longer deadline. The read of the channel's members that decides a press keeps its own bound (the row on the reads of people), so a slower read is decided after the answer. |
A press decided within the wait is answered with what it came to, when the decision has words for the person who pressed: that it was recorded or was already, or why it was refused (not a member of the channel, not an approver, approver groups that cannot be read, a question or message that is gone or answered by someone else, an answer that is not valid, or a press that was not recorded). A press not decided within the wait, one decided with nothing to tell (a bot's press, say), and one whose decision is to be tried again (a read of people that failed, say) are answered that the press was received; the worker decides each after the answer, once, and a refusal then reaches nobody. The card changes for everyone when the question is decided, by its own update. On the test tenant the answer showed whether that update came first or second, and a press that the client gave up on was still recorded and decided, and its card replaced. | None |
| What the broker sends to a Microsoft Teams connection, in either mode | Each call to Microsoft Entra, the Bot Connector, Microsoft Graph or the Bot Framework's keys is cut at 30s, from the start of the request to the end of the answer's body. The bot's token, which Microsoft Entra issues for the client secret, is fetched when the connection starts and kept: a new one is fetched in the background 5m before it expires, while the old one is still used, and the old one is no longer used 1m before it expires (a token whose life is less than twice the first margin is renewed at half its life, and one whose life is less than four times the second is no longer used at three quarters of it). The calls that wait for a token share one fetch, which is cut at 15s whatever their own deadlines, and a fetch that failed is given again to every call for 5s before the next is made. The app's token for Microsoft Graph, which the reads of a thread use (the row on a read of a thread on a Microsoft Teams connection), and the outbox's lookups of a post, is a second token of the same app and client secret, fetched when a read first needs it and kept by the same rules; it goes to Microsoft Graph alone. At most 64 KiB of Microsoft Entra's answer is read, and 1 MiB of the Bot Connector's. The token goes over HTTPS to the service URL that the channel's last activity named, or to the default service URL for a channel that no activity has come from or whose stored record cannot be read, and no redirect is followed; in socket mode it goes to each region's connect endpoint too (the row on a Microsoft Teams connection in socket mode). |
A call that fails on its bound, a 429, a 412, a 5xx or an answer that cannot be read fails for this try only. The outbox tries a post again on its own doubling wait, the row on a post that was never posted, and does not read a 429's Retry-After; the edits of a live reply wait for the Retry-After of a 429 (at least a second), or the reply's throttle if that is longer, before the next. Microsoft Entra's refusal of the client secret for the bot's token (400 or 401), a 401 of the Bot Connector, and its 403 BotDisabledByAdmin are a rejected credential, which stops the connection's run as a Slack token that Slack rejects does. Entra's refusal of the token for Microsoft Graph alone, and every refusal of Graph, fail that read of a thread, or are a lookup of a post that finds nothing, and stop nothing. A 413 is a message too long, a 404, or a 403 that says that the bot is not in the conversation (BotNotInConversationRoster) or was blocked (ConversationBlockedByUser), a channel that is gone, and any other 403 a call refused: none is tried again. A redirect fails the call. |
None |
A Microsoft Teams connection in socket mode (spec.teams.mode), which the leader alone runs |
One socket in each of the regions amer, emea, apac. A region's socket is opened with a call to its connect endpoint, https://<region>.botapi.skype.com/v3/websockets/connect, with the bot's token, then SignalR's negotiate, which follows at most 5 redirects, the WebSocket and SignalR's handshake; at most 64 KiB of the connect call's answer and of each negotiate's is read, and each of those calls is cut at the 30 seconds of the row above. The socket must be ready (Teams calls SocketReady) within 30s of the start of the WebSocket's dial. The broker pings every 15s, closes a socket on which Teams has sent nothing for 30s, cuts each write to a socket at 10s, and ends a socket on which Teams sends a WebSocket message of more than 4 MiB. A socket lives as long as the connect call's answer says (600 seconds, measured on a test tenant in November 2026): 1m before it expires, or at half its life if it lives less than twice that, its region opens the next socket, which names the old one so that Teams sends the region's activities to the new one. The old socket is closed 5s later, once the activities it is handling are answered, which it waits for at most 30s; when the connection stops, its sockets wait at most 1s for them. |
A socket that is not ready in time, on which Teams sends nothing, or on which it sends too long a message is closed, and its region connects again (the next row). A replacement that fails is tried again on the next row's waits for the same failure, and the old socket serves until it ends. A connect call that answers no positive life is a failure. What Teams sends while no region's socket is ready it does not deliver, then or later (measured on a test tenant in November 2026): the broker logs each such interval with its start and end and observes it in agentkourier_teams_socket_gap_seconds (Metrics). |
None. spec.teams.mode: http takes the activities on the chat listener instead. |
The waits between the connects of a Microsoft Teams region in socket mode |
After a failure the region waits 1s, twice as long after each further failure in a row, up to 15s, each wait lengthened or cut at random by up to a fifth. A socket that was ready for at least 15s and then ended is followed by a connect at once; one that ended sooner counts as a failure. A 429 waits for its Retry-After if that is longer, up to 5m. A region that answers 403 (Microsoft's error says that Socket mode is not enabled for the bot; on the test tenant apac answered it while amer and emea worked), and a socket that Teams closes with a SocketClosing that says not to reconnect, wait 5m, give or take a fifth. |
A region retries for as long as the connection runs, except that a 401 of a connect call, or Microsoft Entra's refusal of the client secret, is a rejected credential, which stops the connection's run (the row on what the broker sends to a Microsoft Teams connection). A 403 is not fatal while another region's socket is ready; when every region has answered 403 and none is ready the run ends, and the broker runs it again on the waits of the row on reconnecting Slack. | None |
Activities that a Microsoft Teams connection in socket mode handles at once |
32 across its sockets. Each is answered in its reply frame by the envelope's deadlineMs less 1s, or by 25s less that when the envelope names none (every envelope measured named 25 seconds), and a press by the 8 seconds of the row on the answer to a press at the latest. A message is answered once it is on its channel's lane, as over HTTPS. |
One more is answered 503 at once and not handled, and counted as busy in agentkourier_teams_socket_envelopes_total and as socket_busy in agentkourier_teams_activities_shed_total. Whether Teams sends a message answered 503 over a socket again was not measured. |
None |
The Microsoft Graph subscriptions of a Microsoft Teams connection with a spec.teams.notificationURL, which the leader alone keeps |
One for each channel that a Binding of the connection names, to the channel's new and edited messages, made to expire 24h after it is made or renewed, and renewed once it would expire within 12h, or within half the lifetime that Graph granted when it made or last renewed it, if that is shorter. Each call to Microsoft Graph that lists, makes, renews or deletes one is cut at 30s: on a test tenant in November 2026 a make took about 8 seconds and a renew about 7, the time of Graph's validation handshake to the connection's URL. The subscriptions are compared with the Bindings every 1m, within 1s of a change of the channels that the Bindings name once any comparison in progress ends, and at once when a lifecycle notification or a notification with another clientState asks for it, or an activity tells the Microsoft Entra group of a bound channel's team. At the start of each run, even with no channel bound, and at the comparison after Graph refuses a make with 409, the leader lists the app's subscriptions, at most 10 pages, keeps those to the connection's URL that it can, and deletes the rest to that URL. A bound channel that the app's subscription for another URL holds (Graph lets an app have one subscription to a channel's messages) is tried again after 10m, or when that subscription expires if sooner. That a subscription to a channel's messages may live up to 4,320 minutes is Microsoft's documentation; a lifetime of 24 hours was not measured (a subscription of 55 minutes was). |
A channel whose team's Microsoft Entra group the broker does not know yet is not subscribed: the broker logs it once at WARN with the fix (install the app in the channel's team and mention the bot in the channel), counts it in agentkourier_teams_graph_channels as waiting_group, and subscribes it at the first comparison after an activity of the channel has told the group. A call that fails is made again at the next comparison, logged at WARN the first time and counted as failing. A listing longer than its pages fails, as does any listing Graph refuses. When the listing at the start of a run fails, nothing is subscribed until a listing succeeds. When the listing after a 409 fails, the subscriptions the leader holds are still renewed, and no subscription is made until a listing succeeds. A channel that another URL's subscription holds is not subscribed until that subscription expires (up to 24 hours after it was last renewed) or is deleted: the broker logs it once at WARN with that subscription's URL (its scheme, host and path) and expiry and the fix, and counts it as failing. A subscription that is not renewed in time lapses, and Graph sends nothing of its channel until it is made again. |
spec.teams.notificationURL: with none, nothing is subscribed |
What Microsoft Graph sends to the spec.teams.notificationURL of a Microsoft Teams connection, which the leader takes on its chat listener |
The body is held to the chat listener's cap (the row on a request to the chat listener), and a body of notifications to 256 KiB and 1000 notifications. The notifications of a body whose clientState is not the connection's are logged in one WARN line for the body, and those lines, like those of a body too long, at most one every 10s with a count of the bodies not logged. Each new message notified is read from Microsoft Graph on its channel's lane, one call cut at 10s, made 3 times in all when it fails with a 429, a 5xx or a timeout, after 1s, twice as long after each further failure up to 4s, or after a 429's Retry-After when that is longer, up to the same. The message waits on its channel's lane with the channel's activities, is handed to the broker with the same tries as an activity, and is remembered by the same key as the message's activity (the row on a request that Microsoft Teams sends), so a post that comes both ways within that window is handed on once. The text of an alert card is kept to the 128 KiB that a message's body is read to (the row on a read of a thread on a Microsoft Teams connection). |
A longer body is answered 413, and one with more notifications 400; nothing of either is taken. A message that cannot be read in its tries is dropped, logged at WARN and counted as fetch_failed: its notification was answered 202, and Graph does not send it again. A notification whose channel's lane is full, or that comes while the connection does not run or has not listed its subscriptions yet, is answered 503, which Graph sends again (Microsoft's documentation, for up to 4 hours; not measured). |
None |
The polls of Microsoft Graph by a Microsoft Teams connection with no spec.teams.notificationURL, which the leader alone makes |
Each channel that a Binding of the connection names is read every 10s, through Graph's delta of its messages; the first reads of the channels that the broker finds at once are spread over one interval. A run's first reads of a channel page through its delta to a deltaLink, at most 5 pages at each poll and 500 in all, keeping none of their messages; a read of the deltaLink follows at most 500 pages too. A post counts as new when it was made at most 30s before the channel's last read began. The replies of the 3 newest threads of each channel that the run saw begin within the last 1h, and of those read at the poll before, are read at each poll, each its newest 50: at most 6 reads. A reply counts as new when no read gave it and it was made at most 30 seconds before the newest reply read in its thread. The connection's reads go one at a time, at least 250ms apart, each cut at the 10 seconds of a read of a notified message: at most 4 reads a second. Budget: once a channel has its deltaLink, it costs 1 delta read and 3 reads of replies each interval, and at a poll that finds new threads 4 to 6 reads of replies (6 when three or more threads begin), so 24 to 42 reads a minute, and N channels 24 × N to 42 × N a minute, up to the 240 a minute of the connection's pace: 10 channels when no thread begins, 8 when one begins at every poll (30 reads a minute each), 5 at the worst; past that, polls come later than every 10 seconds. While a channel is read to its deltaLink, a poll of it makes at most 5 pages, 3 reads of replies and a catch-up read: 9 reads. A channel whose poll fails is read again after 10 seconds, twice as long after each further failure up to 5m. A catch-up read (at a run's first poll of a channel, at each poll while it has no deltaLink, when a gap of the sockets ends with no notificationURL, and on Graph's lifecycle notification missed) reads the 20 newest threads of the channel with their replies, and hands on what was posted within the last 10m, the window in which the broker remembers what it handed on. Where each channel's delta stands is kept in the store (the next row); the rest of what is read is held in memory only. That a channel's messages are throttled at 1 request a second and an app's at 20 in a tenant is a summary of Microsoft's throttling page, not seen there and not measured; 22 reads at 5 seconds apart drew no 429 on a test tenant. |
Graph's 429 pauses every read of the connection for its Retry-After. A 401, 403, 404 or 400 of a channel's delta or catch-up read, or a 401 of a thread's replies, counts the channel as failing, logged once at WARN; a 400, 403 or 404 of a thread's replies stops the reads of that thread alone. A channel whose delta names no deltaLink within 500 pages counts as failing, logged once at WARN, and is read by its catch-up read alone until the run ends (a restart or a change of leader) or no Binding names it and one names it again. A reply in a thread older than the window, or past the newest 3, is not read by a poll, nor a reply that Graph shows more than 30 seconds after a newer one in its thread; a catch-up read does not recover a reply in a thread past its newest 20, nor anything posted before its look-back. A post that a catch-up read or a resumed delta gives again after a restart is handed on again, and the store drops what it already holds (Catch-up reads). |
spec.teams.notificationURL: with one, the connection does not poll |
Where the polls of a Microsoft Teams connection with no spec.teams.notificationURL stand, which the leader keeps in its store |
For each polled channel, the deltaLink of its last delta read whose messages were all handed on, and when that poll began (Stored data). A channel's is written at most once each 1m while its deltaLink changes, and, while the deltaLink stays the same, once the stored time is 10m old: a poll that changes nothing writes nothing. A run of the connection resumes each channel's delta from its stored position, unless the position is more than 1h old, or its time is more than 30 seconds ahead of the broker's clock. |
A position past either bound is not resumed, logged at WARN: the channel is read anew, as at a first start, and a catch-up read hands on what was posted within the last 10 minutes; what was posted earlier while no broker polled is not handed on. A position that cannot be read fails the channel's poll, which is made again after its backoff. A write that fails is logged once at WARN and tried again at the channel's first poll a minute or more later; the channel is polled on. A write that the store refuses because the broker no longer leads stops the connection's polls. After a crash, what was handed on since the last write is read again. At a run's start the positions of the channels that no Binding names are deleted. A failed delete of one channel's position, when no Binding names it any longer, is logged at WARN with the channel, each time; it is made again a minute later by a delete of the positions of every channel that no Binding names, as is a failed delete at a run's start. That delete is made each minute while it fails, and is logged at WARN at its first failure, at DEBUG after, and at INFO when one succeeds after it; the channels are polled on. | None |
| The chat listener at shutdown | It stops taking connections first, and waits at most 2s for the requests in flight, inside the intake step of the shutdown, so that the intakes, which stop next in that step, keep at least half of its bound. |
A request still in flight is cut, its connection closed and nothing answered, so Slack sends it again, to the replica that leads next. What Microsoft Teams does with a request cut so was not measured: it does not send again one that it held until it gave up. So, as the drain begins, every press of a Microsoft Teams card that waits for its decision stops waiting and is answered that the press was received, and a press that comes during the drain is not waited for; the presses are decided by the worker, before the broker stops or by the replica that leads next. | None |
| A delivery to a webhook ChatConnection, on the chat listener | Its body is at most 1 MiB, the chat listener's own bound, and one JSON object of valid UTF-8, at most 64 objects and arrays deep, the outer object counted. It is verified on its raw bytes, by the HMAC-SHA256 of the body under the connection's secret or by its fixed token, before anything of it is parsed; with a body timestamp, the time must be an integer within the connection's window of the broker's clock, either way. Each value that the connection reads as an id field is at most 128 bytes of ASCII letters, digits and _.-:/, and so is the delivery ID that it reads from its delivery header: 128 bytes. The answer waits at most 2s, counted from when the connection's handler was given the request, for the broker to take the event. |
A body past its bound is answered 413 by the chat listener, before it is verified. A request that does not verify is answered 401: its body is parsed for nothing but the body timestamp, and only once the signature has passed. Each is logged at DEBUG, and one WARN line sums the connection's at most once every 1m. A verified body that is not such an object, or that has a key twice in an object on the way to a value the connection reads, is answered 400; on a connection with a body timestamp the time is read from the body as part of the verification, so such a body (or one that has a key twice on the way to the time) is answered 401 as stale instead. An id field's value that is not an identifier is passed over for the field's next pointer; a field with no other is marked invalid, and the event is still taken, unless it is the field of the thread: that event, like one with no channel or no thread, is answered 200 and handed to nothing. A delivery ID that is not an identifier is left out of the log. An event the broker has not taken within the wait, or could not take, is answered 503 with a Retry-After of 1s; the chat listener's own 503s, for a connection that does not run on the replica or a listener that is full, carry the listener's Retry-After (the rows above). Every other answer is 200. Each answer is counted on agentkourier_webhook_requests_total (Metrics). |
The body timestamp's window, per connection |
| A webhook ChatConnection's credential, when the broker builds the connection | The token scheme's token is at least 32 bytes. Neither the secret nor the token may hold a control character, a trailing newline included. |
The connection is not built. The error names the Secret and its key, never the value. Remove the newline that a file read into the Secret keeps (tr -d '\n'). |
None |
The leader label on the pod (agentkourier.dev/role=leader, which the chart's chat Service selects; only with AGENTKOURIER_CHAT_LISTEN and AGENTKOURIER_POD_NAMESPACE set) |
Each write of the label, a patch of the pod's labels, is cut at 1s. Every replica takes the label off its pod as it starts, and is not ready until a write of the label has succeeded, that removal or, if it leads first, the label put on (the leader-label check of /readyz); the leader puts it on once it has started to lead, and takes it off at shutdown, in the last step, before it hands the lease over. A failed write is tried again after 1s, and each wait after another failure in a row is twice the one before, up to 30s. |
The broker leads whatever becomes of the write: a failure is logged at ERROR, counted as failed on agentkourier_leader_pod_label_writes_total (Metrics, which has an alert on it), and tried again for as long as the broker runs. A replica none of whose writes has succeeded is not ready, so out of every Service, the health Service included, until one does: that is a patch that keeps failing while the API server answers the broker's reads (one the broker cannot reach at all fails its start before, when it reads its config and Secrets: the Secret caches do not sync within AGENTKOURIER_SYNC_TIMEOUT, CLI). A first write that the API server refuses as forbidden, or for a pod it does not have, fails the start (exit code 2), since no retry mends it. Until the leader's label is on, the chat Service selects no pod, and the platform sends its requests again. The write at shutdown is tried once. |
None |
| Bindings on one channel of a ChatConnection | One | With files, refused at load. With custom resources the older Binding holds the channel, and the other is not served and says ChannelConflict. See Who holds a channel. |
None |
| One config file, files route | 1 MiB for each *.yaml or *.yml file of AGENTKOURIER_CONFIG_DIR |
Refused at load, so the whole config is. | None |
| How often a change is read | Every 10s, files and custom resources |
The change takes effect at the next read. | None |
| Delay of a deleted custom resource | About 10 to 20 seconds after the delete: it takes effect at the first read that finds nothing newly deleted, and no sooner than 8s after the last read that did. Other deletions can defer it, but a deletion first seen 1m ago takes effect at the next read whatever else is deleted. The exception is the broker's own ChatConnection, if it has one: when it is deleted, it is held at its last good generation until it is back or the broker restarts, and a Binding deleted while it is held stays held too. |
Until then the object is served as it was. When a deletion takes effect, the object is kept, not served, for 1m more, so that a ChatConnection deleted just after it takes the object into the hold. See What a bad object does. |
None |
| Leader election, Postgres only | Lease duration 15s, renew deadline 10s, retry period 2s |
A standby takes the Lease a lease duration after the last renewal it saw. A leader that cannot renew within the renew deadline exits at once with code 5. Timings that do not satisfy lease duration > renew deadline > 1.2 × retry period stop the start (exit code 2). See High availability. |
leaderElection.leaseDuration, renewDeadline and retryPeriod (AGENTKOURIER_LEASE_*) |
| Wait for the Secret caches at start | 30s |
The start fails (exit code 4). | syncTimeout (AGENTKOURIER_SYNC_TIMEOUT) |
| Time to stop | The broker's ordered shutdown takes up to 25s. The chart gives the pod 40 seconds. |
The broker stops waiting at its total. Kubernetes ends the pod when the grace period does. | terminationGracePeriodSeconds; the shutdown total has none |
| Memory of the container | The chart's default limit is 256Mi, and it sets GOMEMLIMIT to four fifths of the limit. |
A container that passes the limit is ended by the kernel, and Kubernetes restarts it. Nothing in the broker bounds the total: see what has no limit. The events the Slack adapter holds (the row on events, in Start investigations) are bounded in number and not in bytes: the broker sets no limit on the size of an event it reads from the Socket Mode connection (the Slack client library has an option for one, off by default, which the adapter does not set), and Slack's largest event was not verified here. | resources.limits.memory; see the release that sets GOMEMLIMIT |
| SQLite volume, SQLite only | 1Gi by default. The database holds sessions, the outbox, the audit log and the votes. The audit log is kept for ever unless auditRetention is set, and nothing deletes a vote, so a default install grows toward the size. |
The volume fills, and a write to the database fails with the SQLite error database or disk is full. In a test at the store, with SQLite's max_page_count standing in for a full volume, appends to the audit log failed and kept failing, reads kept working, and a plain delete of audit rows was refused (the log is append-only), while the retention purge still ran, freed room, and appends worked again. A volume that is truly full, where the write-ahead log cannot grow either, was not tested, and what the broker does with each failed write was not traced. |
persistence.size, persistence.existingClaim (a claim you size), auditRetention |
| All the files of the files route, in one ConfigMap | The chart writes every resource of config.* as a file of one ConfigMap, and Kubernetes limits a ConfigMap to 1 MiB in all (a Kubernetes rule, not checked here against Kubernetes). |
The API server refuses the ConfigMap, so the install or upgrade fails (inferred from that rule, not run). | The custom resource route (config.source: crds), which has no such total. config.existingConfigMap names the one ConfigMap that is mounted, so the same total applies to it. |
| Liveness probe | The kubelet asks /healthz every 10 seconds and restarts the container after 3 misses in a row: about 30 seconds |
The container is restarted. | livenessProbe.periodSeconds, livenessProbe.failureThreshold |
| client-go log verbosity | Held to 7 |
The chart refuses a higher klogVerbosity, and the binary holds a higher AGENTKOURIER_KLOG_V to this value. client-go logs response bodies, Secret lists included, from 8 up. |
klogVerbosity (AGENTKOURIER_KLOG_V), up to this value |
| The broker's requests to the API server | Secret informers 50 a second with a burst of 100, Binding status writes 20 with 40, Lease renewals 5 with 10 |
A request waits for its client's limiter before it is sent. Each client has a limiter of its own, so a burst of status writes does not hold up a Lease renewal. | None |
| A Secret the API server answers forbidden or unauthorized (custom resources and files) | The broker asks for it again only at a recheck of the config, which comes every 1m (looked for at each read of 10s, so up to about 1 m 10 s after the last), and no sooner than 1m after it last asked. It asks for 10 denied Secrets at once and then for one every 100ms, 10 a second. A try is two requests. |
The informer of the Secret ends at the first answer, and the cache it held, if it had synced, is served as it was. The denial is logged once, and again only when what the answer says changes. One answer of forbidden or unauthorized that every Secret gets at once, such as an expired or rotated token of the broker or an outage of the authorizer, ends every Secret informer, the broker's own included. Cached values are served, and turns and readiness are unaffected, but a rotation is not seen until a try reaches that Secret: about 1 m 10 s, plus 0.1 s for each denied Secret beyond the first 10. With custom resources the Binding reports CredentialsUnreadable until a try succeeds, and with files a reload that names the Secret fails: a Role applied later is read at the first recheck after it, plus one tenth of a second for each denied Secret ahead of it in the queue beyond the first 10. A reload that comes sooner, because a config changed, asks for none. A Secret whose keys the config reads change is asked for at once. |
None |
| How often a Binding's status is written, custom resource route only | The leader writes a Binding's status at most once each 10s (counted from the end of its last write) and looks for work each 1s. A failed write is tried again after one gap, then after twice the one before, up to 5m. |
A write waits for its time, and a failed one is tried again for as long as it fails, with the backoff cap as the longest wait; it is not dropped, and one WARN says it failed until a write succeeds. A status that something else keeps changing is put back at its next write, and when it is put back 3 times in a row, each within 5 gaps of the one before, one WARN says so, until the run is broken; the writes go on. |
None. See Binding status. |
| Postgres connections, Postgres only | 10 for each replica. A statement may run 30s, and a transaction may sit idle 10s. |
A caller waits for a free connection. The server cancels a statement that runs longer, and, for the idle timeout, ends the session (Postgres's documented behaviour of idle_in_transaction_session_timeout, not run here). |
A DSN that sets statement_timeout or idle_in_transaction_session_timeout wins over the broker's value. store.postgres.timeouts: role leaves both to the database role. The connection count has no setting: a pool_max_conns in the DSN does not change it. |
Write a Binding, an AgentBackend or a ChatConnection¶
These caps hold the objects to a size, so that a stored object, and the memory the broker keeps for each of them, stay bounded. The upgrade page has the errors each prints. Counts are of entries. A length in bytes is of bytes.
| Limit | Value | Past it | Setting |
|---|---|---|---|
Triggers in a Binding (spec.chat.triggers) |
50 |
Refused at load, and by the API server. | None |
extract entries in a botMessage trigger. The same number bounds the entries of thread.closeWhen, whose keys must be extract names. |
32 |
Refused at load, and by the API server. | None |
match or exclude entries in a trigger: one for each message field. A webhookEvent trigger, whose keys are fields of its ChatConnection, takes as many. |
6 |
Refused at load, and by the API server, and so is a key that is not a message field. A key of a webhookEvent trigger that is not a field of the connection is refused when the Binding is resolved against it. |
None |
A regular expression of match, exclude or extract |
512 bytes |
Refused at load, and by the API server. | None |
The program of one regular expression of match, exclude or extract |
2000 instructions: the length of the program Go compiles the expression to (regexp/syntax, after Simplify, counting the failure and match instructions). Measured with Go 1.27: the regular expressions of this repository's example Bindings are 10 to 98, .{0,900} is 1802 and .{0,1000} is 2002. |
Refused at load, with the field, the count and the limit. The API server cannot count instructions, so on the custom resource route it creates the object and the Binding shows Accepted as False with the reason InvalidSpec. The check ends at the first regular expression it refuses, so the message names one. The upgrade page has the errors. |
None |
| The programs of all the regular expressions of a Binding, over all its triggers | 5000 instructions |
Refused at load, as the row above says, at the regular expression that takes the sum past it. The trigger cap is 50, but the budget is what a Binding with many triggers meets first: the trigger of Investigate Alertmanager alerts compiles to 346 instructions (370 with the exclude of the heartbeat, as in the chart's CI values and the test fixture), so 14 of it fit and the 15th is refused (13 and 14 with the exclude). About half of that is the bounded repeat {1,32} of the optional bracket tag, 67 instructions each of the three times it appears, where [^\]]* is 6. |
None |
promptTemplate of a botMessage, personMessage or webhookEvent trigger |
8192 bytes |
Refused at load without being parsed, and by the API server. | None |
spec.agent.name of a Binding |
253 bytes |
Refused at load, and by the API server. | None |
spec.identity.userId of a Binding |
256 bytes |
Refused at load, and by the API server. | None |
Headers of an AgentBackend (spec.headers) |
32 |
Refused at load, and by the API server. | None |
| The name of a header | 256 bytes |
Refused at load, and by the API server. | None |
chat.mentions of a Binding |
50 |
Refused at load, and by the API server. | None |
chat.maxMentionsPerTurn |
From 1 to 10, default 2 |
A value out of range, 0 included, is refused at load, and by the API server. The mentions past the cap in one turn are not mentioned. | The field itself |
interactions.approverGroups |
10 groups |
Refused at load, and by the API server. | None |
allowedNamespaces of an AgentBackend or a ChatConnection |
256 namespaces |
Refused at load, and by the API server. | None |
agents.namespaces of an AgentBackend |
256 namespaces |
Refused at load, and by the API server. | None |
The url of an AgentBackend |
2048 bytes. A ? or a # anywhere in it is refused, so a URL has no query and no fragment, even an empty one. |
Refused at load, and by the API server. | None |
The value of a header |
4096 bytes |
Refused at load, and by the API server. | None |
chat.channel of a Binding that is not of webhookEvent triggers alone |
140 bytes, Microsoft Teams' cap (a Slack connection's is lower: see the row of the same IDs on a Slack connection) |
Refused at load, and by the API server. | None |
A trigger's from.id |
36 bytes, the length of a Microsoft Entra ID |
Refused at load, and by the API server. | None |
The user of a chat.mentions entry |
36 bytes, the length of a Microsoft Entra ID |
Refused at load, and by the API server. | None |
Each entry of interactions.approverGroups |
32 bytes, Slack's cap: only Slack has approver groups |
Refused at load, and by the API server. | None |
| The same IDs on a Slack connection | 32 bytes for a channel, a sender and a user group, and 21 for a mention's user, as Slack's shapes (C…, B…, S…, U…) bound them |
Refused when the broker reads the Binding with its connection: the load and the API server take either platform's shape up to the caps above. With custom resources the Accepted condition is False with the reason InvalidPlatformID; a Binding that had a good generation keeps serving it, and the message says which (serving generation 1), and a new Binding is not served. On the files route the whole config fails: at start the broker exits with code 2, and on a reload it keeps its last good config. What each platform supports has each platform's shapes. |
None |
| The same IDs on a Microsoft Teams connection | A channel, 19:…@thread.tacv2 or 19:…@thread.skype, takes the 140-byte cap above. A trigger's sender and a mention's user are Microsoft Entra IDs, GUIDs in lowercase hex of 36 bytes. Approver groups are refused whatever their shape, with the reason UnsupportedOnPlatform |
Refused when the broker reads the Binding with its connection, as on Slack (the row above). | None |
The teams.tenantID and teams.appID of a ChatConnection |
36 bytes each, a GUID in lowercase hex |
Refused at load, and by the API server. | None |
The teams.notificationURL of a ChatConnection |
2048 bytes, https only, with no credentials, query or fragment. Its path is /chat/teams/<namespace>/<name>, the connection's own namespace and name. |
Refused at load, and by the API server, which checks the form of the path; that the path names the connection itself, the broker checks when it loads the connection. | None |
chat.channel of a Binding of webhookEvent triggers alone, and spec.webhook.channel.value of a ChatConnection |
140 bytes each |
Refused at load, and by the API server. | None |
spec.webhook.fields of a ChatConnection |
32 fields |
Refused at load, and by the API server. | None |
The name of an entry of spec.webhook.fields |
63 bytes |
Refused at load, and by the API server. | None |
A from list of spec.webhook (channel.from, actor.from, and a field's from) |
8 JSON Pointers |
Refused at load, and by the API server. | None |
A JSON Pointer of spec.webhook (an entry of a from list, and verify.timestamp.from) |
256 bytes |
Refused at load, and by the API server; the broker checks it again when it builds the connection, and the error names the pointer. | None |
A header that spec.webhook names (verify.header, a field's header, delivery.header) |
64 bytes |
Refused at load, and by the API server. | None |
spec.webhook.verify.prefix and spec.webhook.thread.prefix |
32 bytes each |
Refused at load, and by the API server. | None |
spec.webhook.identity |
128 bytes |
Refused at load, and by the API server. | None |
spec.webhook.verify.timestamp.window |
Above 0 and at most 10m |
Refused at load, and by the API server. | The field itself |
chat.acknowledgment.emoji |
100 bytes |
Refused at load, and by the API server. | None |
The name of an extract entry. The keys of thread.closeWhen are extract names, so the same number bounds them. |
63 bytes |
Refused at load, and by the API server. | None |
A value of thread.closeWhen |
256 bytes |
Refused at load, and by the API server. | None |
The text of a duration (interactions.timeout, session.threadTTL, thread.cooldown, thread.maxIdle, rateLimit.per) |
64 characters, whatever the value that it writes |
Refused at load, and by the API server. The broker reads the text before it becomes a duration, so the file route refuses it too. | None |
thread.cooldown of a trigger |
From 1m to 168h |
Refused at load, and by the API server. | The field itself |
thread.maxIdle of a trigger |
At least twice the cooldown and at most 720h. Unset, it is the larger of 24h and twice the cooldown. |
Refused at load, and by the API server. | The field itself |
rateLimit.per of a trigger |
From 10s to 24h |
Refused at load, and by the API server. | The field itself |
interactions.timeout of a Binding |
At most 7d (168 hours) |
Refused at load, and by the API server. | None |
session.threadTTL of a Binding |
At most 365d (8760 hours) |
Refused at load, and by the API server. | None |
rateLimit.maxRuns, rateLimit.maxConcurrent and maxRunsPerDay |
At least 1 for the first two, and 0 or more for the last (0 is no cap). No upper bound. | Refused at load, and by the API server. | The fields themselves |
| Names of Bindings, AgentBackends, ChatConnections and Secrets (Kubernetes names) | 253 characters |
Refused at load, and by the API server. | None |
Namespaces, and the names of chat.mentions |
63 characters for a namespace, 63 for a mention name |
Refused at load, and by the API server. | None |
Some checks are not in the CRD schema. A prompt template's rules and a regular expression's syntax are not something the schema can express, so on the custom resource route the API server accepts them and the broker refuses the object at load. The size of a config file is a limit of the files route only. Tune triggers with a dry run loads files the way the broker does, so it finds what is refused at load before you apply a config.
Write a prompt template¶
A botMessage, personMessage or webhookEvent trigger's promptTemplate is text that runs over values taken out of a message or a webhook event. These limits keep what it can do small.
The release that limits prompt templates has the errors.
| Limit | Value | Past it | Setting |
|---|---|---|---|
| What a template may use | No range, define, template or block, and no variable. It calls only and, eq, ge, gt, index, le, len, lt, ne, not, or and slice. It reads values only as .Channel, .State, .Key, .Link, .Source, .Fields.name or index .Fields "name". |
Refused at load, and only there: the API server cannot read a template. | None |
| What a template writes | 256 KiB |
At load the Binding is refused. When a trigger renders it, no turn starts, a note is posted in the alert's thread, the start is audited, and agentkourier_trigger_refused_total counts it with the reason render_error. With the other bounds in force a template cannot reach it: one of the longest allowed length that does nothing but read .Link writes at most 910 × 256 bytes, about 227 KiB (computed from the bounds on this page, not run). It is a backstop. |
None |
| The values a load check runs the template over | 64 bytes each |
A template that slices a value past that length fails the load. One that slices past the length of a real value, but within that length, passes the load and fails when the first message renders: a render error, so no turn starts. | None |
A value the template reads: .Fields entries, .State, .Channel and .Source |
128 bytes, of ASCII letters, digits and _ . - :; a .Channel may instead be a Microsoft Teams channel ID, 19:…@thread.tacv2 (or @thread.skype) of at most 140 bytes |
The render is refused: no turn, a note in the alert's thread, an audit entry, and agentkourier_trigger_refused_total with the reason too_long or characters. |
None |
.Key |
128 bytes, with / also allowed |
The same. | None |
A value a webhookEvent trigger's template reads: .Fields entries, which are id fields of the ChatConnection |
128 bytes, with / also allowed |
The same, with no note, since a webhook connection posts nothing. An id field the template reads that is marked invalid, because none of its values was an identifier, is refused with the reason invalid. |
None |
.Channel of a webhookEvent trigger's template |
140 bytes of a webhook channel: ASCII letters, digits, ., _ and -, starting with a letter or a digit, with / between parts |
The same, with the reason too_long or characters, and no note. |
None |
.Link |
256 bytes of an http or https URL, each of whose @ must be the one of a path segment that is a whole Microsoft Teams channel ID (one segment, one @) |
The same, with the reason too_long, characters or not_link. |
None |
| The instruction part of the first prompt (the template's output) | 4000 UTF-16 units |
Cut. | None |
| One field of the message in the untrusted block | 3000 UTF-16 units |
Cut. | None |
| The untrusted block as a whole | 8000 UTF-16 units |
Fields that do not fit are left out, and a last line says so. The whole prompt is at most 12002 units. |
None |
| One field of a webhook event in the untrusted block, and the block as a whole | 3000 UTF-16 units a field, and 8000 the block |
A field past its bound, or one that does not fit in what the fields before it leave, is left out whole, never cut, and a last line names each field left out. | None |
Build or connect an agent backend¶
What the broker reads and holds¶
The backend of a Binding may be a tenant's, so the broker bounds each thing it reads. A bound is on one response or one event, never on a stream's length. The values are constants of the binary: no chart value, file or custom resource field reaches them. The release that lowers the bounds has what each means for an agent.
| Limit | Value | Past it | Setting |
|---|---|---|---|
| The agent card | 1 MiB |
The card is not read, and no connection is made. A probe sets the Binding's BackendReachable condition to False with the reason InvalidAgentCard. The card is not an answer to a call, so what it does differs from the rows below: a send or a lookup that meets it is retried like any call that cannot reach the agent, and a send is given up after 15m as an agent that cannot be reached; an answer to a paused task reopens the pause and tells the thread that the answer could not be delivered; a follow of a task, or the read of the task that comes before it, tells the thread, in a fixed sentence, that Agent Kourier could not connect because the agent's card is too large, and that once the card is fixed Agent Kourier must be restarted; it cancels nothing, and leaves the task recorded and running at the agent, followed by no one (the turn ends with the outcome refused); a cancel is not counted as done, and the record stays. Nothing follows that task again by itself: what releases it is a restart of Agent Kourier, which then reads the recorded task and follows it, and a restart interrupts every turn of every tenant on that broker while it runs. Read from the code and its tests. |
None |
| One event of a stream, the lines of it up to the blank line | 2 MiB |
The read fails at the bound, never as a shortened event. The turn ends with the outcome response_too_large: the thread keeps what it was shown and is told, in a fixed sentence, that the agent sent more than Agent Kourier can read or hold, and Agent Kourier cancels the task at the agent, once, within 30s. A reply that names no task has none to cancel: a send whose first event is too large, or a reply that is one message and no task. An answer to a paused task whose reply is too large before the agent names the task again ends the turn at once, with the same sentence, and Agent Kourier cancels the task that was answered, so that it does not stay paused for a person to answer into the same reply; the answer is not sent again. On kagent 1.0 the final event of a task repeats the task's tool calls and results, so all of them together, from the start of the task, count against this bound, not only the last one. See the notice and what it leaves. |
None |
| What one turn holds of the agent's reply: its artifacts' text, tool results that wait for their call, and the bookkeeping of each tool part | 341 KiB |
Ends the turn as an event does, however many events the reply came in. What an answer reads first of the task it answers, the tool calls and results of the turn that paused, is not counted: that task is bounded by the GetTask that reads it (the GetTask row for a pressed answer, below), so the answer's own stream can be read for a task that paused after many tool steps. That is the answer's own stream only. What the answer notes of that task is held in memory for the whole answer, and was measured in a test process (a task of the smallest distinct tool parts, 78 bytes each on the wire, 53,847 of them in 4 MiB): 4.2 MiB for parts in an artifact and 5.2 MiB for parts in the history, for each answer in flight, besides the memory to decode the task. A follow builds no such note: it is the read after a restart, after a lost stream past the reconnect limit, and after an answer that the agent refused as busy or whose outcome is unknown. Its first snapshot holds every tool call and result again, and in a test (one artifact of call and result pairs with 40-byte call IDs) it passed the budget at about 350 pairs, where a live stream of the same turn passed it at about 400. A task that long, paused and then followed after a restart, is stopped as too large and cancelled. |
None |
GetTask that reads a task back: after a lost stream, a restart or a follow; to read a person's typed reply to a paused task, on the a2a dialect; and after an answer that the agent refused as busy or not ready, or whose outcome is unknown (the answer carries the task with its whole history) |
4 MiB |
The answer is not read, and the turn ends with the outcome response_too_large, as for an event. For a typed reply the turn that paused ends that way and its task is cancelled, and the reply stays queued as a turn of its own. |
None |
GetTask before a person's answer to a paused task that is pressed (a button, not a typed reply), which reads the task to tell what in the reply is new |
4 MiB |
The read is dropped, and the answer is sent without it. | None |
CancelTask. A server of a2a-go answers a cancel, and a repeat of one that took, with the whole task. |
4 MiB |
The answer is counted as a cancel that took, without being verified, and its size does not end the turn: the task is not left recorded. The audit row says cancel: failed response_too_large, which means the answer was not read, and a WARN names the unverified cancel. That a real server answers this way is shown in a test against a2a-go's handler and is unconfirmed on kagent, and an error with a large body reads the same, so nothing is known of what became of the task. The same holds when the agent says a task cannot be cancelled because it ended, and the task is then too large to read. The task is no longer recorded, so a restart does not help: nothing of this thread follows it afterwards, and restarting would interrupt every turn of every tenant on that broker for nothing. A task that still runs at the agent can only be ended at the agent. |
None |
A page of ListTasks, in the lookup that runs before a turn is sent again (after a restart, a busy agent or an unknown outcome). Each task of a page carries its history. |
4 MiB. A page too large is asked for again at half the size. The first ask names no size, so the first retry is for half of 50 tasks (25), and each further retry halves again, down to 3. |
If a page does not fit at the least size, and an earlier page held the turn, the holders found so far are the answer. Otherwise the lookup is incomplete: Agent Kourier cannot tell whether the agent has the turn. It sends nothing, because a message sent again into a context is not deduplicated, with one exception read from runner.go: a turn that this process queued, and whose every attempt was refused as busy or not ready (-32004) or never left the broker, is sent, since the agent cannot have it. Any other failure before the agent named a task, a JSON-RPC error such as -32603 among them, counts as an unknown outcome, because the agent may have started the task and failed on the way back, so such a turn fails with the outcome lookup_incomplete and is not sent. Otherwise the thread is told that Agent Kourier could not tell whether the agent already started the message, so it did not send it, and that the agent may be running it, and the person posts it again to run it; the turn ends with the outcome lookup_incomplete; the audit log has find_task: failed lookup_incomplete, followed by the cause, such as response_too_large or deadline_exceeded; and the log has WARN session turn failed. Nothing is cancelled, because no task is named. A turn behind a task that is still running waits instead, and is looked up again when that task ends. See the notice and what it leaves. |
None |
| The whole walk of that lookup | At most 5m and 200 pages. A page token that comes again also ends it. |
The same as a page that does not fit at the least size: an earlier holder is the answer, and otherwise the lookup is incomplete, with the outcome lookup_incomplete. A call that is refused on the first page asked for at a size the walk lowered (a 4xx other than 408 and 429, or an error the agent answered with) is taken as incomplete too, since whether a server continues a page token at another size is not known (unconfirmed). A 5xx, a timeout or a lost connection there is not taken so, and is retried like any failed lookup. The caller's own cancellation is none of these. |
None: no chart value or field reaches the deadline |
These bounds give each response a size and the broker no total, and what a response costs in memory depends on the JSON it holds: a response of many small objects at the bound costs much more than the same number of bytes of text. The figures are from a test process, not from a pod: the Go test binary on a laptop, with the fake agent and the client in one process, and a pod's own baseline was not measured. With small objects at the bound, two or three large responses read at the same time passed the chart's default limit of 256Mi. So the number of streams or answers that fit is not a limit to plan by. An AgentBackend must be one you trust, or get a broker of its own, because the backend decides how many large responses are in flight. The measurement and its counts are in the release that lowers the bounds.
How long the broker waits on an agent¶
| Limit | Value | Past it | Setting |
|---|---|---|---|
| A stream with no event | 5m |
The stream is cut and reconciled with GetTask and then SubscribeToTask, and no text is delivered twice. A tool call that is silent for longer is cut the same way. |
None |
| Reconnects in a row that bring nothing new | 5 |
The send is treated as a lost stream, and the turn follows the task again after a backoff. | None |
| The backoff before a resend or a follow | Starts at 1s, doubles up to 60s |
It waits. A turn that is blocked is retried after the backoff and is never dropped, except as the next rows say. | None |
| A call to start answering (response headers) | 30s |
The call fails. This bounds a call's start, not a stream's length. | None |
GetTask and CancelTask |
30s each |
The call fails. | None |
| Fetching the agent card to connect | 30s |
The connect fails. | None |
| An agent that cannot be reached | Retried for 15m |
The turn ends with the outcome unreachable, and the thread is told that the agent could not be reached. The second failure in a row also tells the thread that the broker is retrying. |
None |
An agent that answers busy or not ready (-32004) |
Retried with no limit | The turn waits behind it. The thread is told after 2m. |
None |
| A task still working after its stream was lost, with no sign of life | 1h |
The task is presumed wedged and cancelled, and the turn ends with the outcome wedged. A live stream is never limited by this. |
None |
| The cancel of a task whose reply was too large | 30s |
A cancel that fails is logged and leaves the task recorded, for a restart to reconcile: nothing in the thread can cancel it, and a restart interrupts every turn of every tenant on that broker while it runs. | None |
What the broker sends¶
| Limit | Value | Past it | Setting |
|---|---|---|---|
| The name and the email of the person who wrote a turn, as sent to the agent | 64 characters each |
Both are cleaned (control and format characters and brackets are dropped) and then cut, in the text prefix and in name and email of metadata["agentkourier.dev/actor"]. The ID in the metadata is as the chat platform gave it. See the agent contract. |
None |
What a pause may ask¶
A pause that the dialect cannot show, or that does not fit one message, is refused as unusable: the thread is told in a fixed sentence, the task is cancelled, and the refusal is audited. The agent contract lists the rest of the rules.
| Limit | Value | Past it | Setting |
|---|---|---|---|
| Questions in one pause | 20 |
Unusable. | None |
| Choices of one question | 100 |
Unusable. | None |
| Tools in one approval | 20 |
Unusable. | None |
| The name of one tool in an approval | 300 bytes, as the audit row writes the name: 300 ASCII characters, and fewer of any others |
Unusable. The audit row of the decision writes every tool's name whole, so a longer name is refused. | None |
| The arguments of one tool in an approval prompt | 3000 UTF-16 units |
Unusable, because the approver would not see what runs. | None |
| All of an approval prompt's argument text | 3600 UTF-16 units |
Unusable. | None |
| The Block Kit JSON of an approval prompt | 16000 UTF-16 units |
Unusable. | None |
| How long a pause waits for an answer | 30m by default |
A question's task is cancelled and the thread told. An approval is denied for every tool, with the reason that no one decided in time, and the prompt shows a timed-out ending. While the Binding's chat connection is served and does not run (it has not started yet, Slack rejected its credentials, or its Secret cannot be read), none of this is done and the interaction stays pending with its task paused, for as long as that lasts; The connection runs again: the first sweep after it runs (a sweep is every 10 seconds) times the interaction out as above. It never does (its credentials stay rejected, say): nothing times the interaction out. The interaction, its session, the runner parked on it and the agent's task stay for as long as the broker process runs; the purge of sessions keeps a session that has a pending interaction or a task. After a restart the cleanup of stale tasks ends the task and cancels the interaction, if the session still records that task, once the session's last activity is older than the Binding's threadTTL plus the grace of the second row of What the broker keeps, and logs. A pause whose Binding or connection is gone is ended by the next row. |
interactions.timeout of the Binding for the first case. For the second: session.threadTTL of the Binding |
| How long a pause whose Binding or connection is gone waits to be ended | 5m after the first sweep that finds the pause both past its timeout and orphaned |
A pause cannot be answered or timed out as the row above says when its Binding is not in the config (it was deleted; or its ChatConnection was deleted, left the list of namespaces the broker admits or is past the 16; or the Binding is rejected and has no good generation), or when its Binding is in the config and the broker does not serve the ChatConnection the pause's thread is on, because that connection is a second connection of a Slack or Microsoft Teams app that another connection uses, or is not in the config (it was deleted, say, after the Binding was pointed at another connection; it is invalid with no good generation; it is outside the list of namespaces the broker admits; or it is past the 16), and cannot run while it stays so. A connection that is in the config and not running (it has not started, or Slack rejected its credentials) is served, and its pauses wait as the row above says; so does a pause whose Binding was pointed at another connection while the first is in the config, since the agent is still reached through the Binding and the first connection's platform edits the prompt. Once the sweep has found it so at every sweep for 5m, counted from the first sweep that found it past its timeout and orphaned (the sweep runs every 10 seconds), it ends the pause, and the sweep posts nothing: it does not edit the prompt and queues no notice (turns that were held behind the pause, when the Binding is gone, are dropped with the notice for a Binding that is gone, which goes through the outbox like any notice; on a connection that is not served, whose Binding is there, they go to the agent; the repair of ended prompts, which reads the store every 5 minutes for the interactions that ended in the last 24 hours, takes the controls off the prompt of one whose connection runs, as it does for any interaction that ended, and leaves the prompt of one whose connection does not). The task is cleared from the session record (a runner parked on it, if the Binding was deleted while the broker ran, lets go; after a restart no runner is parked), and the interaction ends as timed out; it is audited as orphaned and counted in agentkourier_approval_outcomes_total with the outcome orphaned, and not in agentkourier_interaction_timeouts_total. Agent Kourier cannot call the agent through a Binding that is gone, so its task is not ended: it stays input-required at the agent until the agent expires it. For a connection that is not served and whose Binding is there the agent is asked to cancel the task: one cancel, which Agent Kourier tries up to three times on a transient failure; if it still fails the task is left too. An approval's denial that the session took and the agent did not, whose Binding was then deleted, has its task cancelled again at each sweep for the 5m, and then is released the same way, with a notice in the thread that the task is left with the agent. A press recorded by the deadline that is not decided yet holds the end off, as it holds off a timeout, until the press is decided or the worker gives up on it. A Binding that comes back, or a connection that is served again, inside the 5m starts the count again and the interaction is timed out as above. The count is kept in memory, so a restart or a takeover starts it again. Once the pause is ended, nothing pending or recorded holds the session back, and the purge of expired sessions deletes it at its horizon (what the broker keeps), except that the session of a Binding that exists in the cluster and is not served (rejected with no good generation, or on a ChatConnection that is not among those served) is kept for as long as that Binding is unserved; until the pause is ended the session, with its interaction, stays whatever its horizon. |
None |
Start investigations: triggers, rates and probes¶
| Limit | Value | Past it | Setting |
|---|---|---|---|
Starts of a botMessage or personMessage trigger |
The rateLimit (maxRuns in any per, and maxConcurrent at once) and maxRunsPerDay, all required |
The start is not made: no turn of the trigger, and nothing from it in the thread (a person's message that also mentions Agent Kourier, on a Binding with a mention trigger, is answered as that mention). It is counted in agentkourier_trigger_limited_total and in one digest line for the window, and a personMessage trigger's is audited under the person who posted the message. Only a start is limited: a repeat, a close and a note never are. See Limits and the digest line. |
limits of the trigger |
Starts of a webhookEvent trigger |
The rateLimit (maxRuns in any per, and maxConcurrent at once) and maxRunsPerDay, all required |
The start is not made: no turn of the trigger. The delivery is still answered 200, so its sender does not send it again. The stop is counted in agentkourier_trigger_limited_total and logged at WARN with the delivery ID, and a webhook connection, which has no replies, gets no digest line. The event is not remembered, so it is lost unless its sender, or you, delivers it again: a later delivery of the same body is decided again, and starts if there is room by then; stopped again, it is logged at WARN again with its delivery ID, and not counted again. |
limits of the trigger |
| The events of a connection that the broker remembers, so that one delivered again starts nothing | A message's or a webhook event's channel and ID, held in memory for each connection, for at least 1024 later events that it remembers, and at most twice that. A restart, a change of leader, and a restart of a team connection (an edit of its ChatConnection, say) forget them. Not every event is remembered: a webhook event that no trigger matched, that a limit stopped, that its session withheld, or whose channel no Binding names is not, and neither is a person's top-level Slack message that no trigger matched. |
An event delivered again once it is forgotten is tried against the triggers again, as a new one is. While it is remembered it is duplicate on agentkourier_intake_total and does nothing: a turn it started does not start again, and a bot's message that matched no trigger is not tried again. A webhook body that matched no trigger is tried again whenever it is delivered, and starts once a fixed trigger matches it and the trigger's limits allow it. |
None |
Starts of a mention trigger (a person's mention) |
No limit | Nothing stops a person's mention from starting a turn. | None: a mention trigger takes no limits field |
Turns after a start: a person's reply in a thread Agent Kourier owns, a mentioned reply in the thread of a personMessage trigger's start included |
No limit, and one turn at a time in each thread | Nothing stops the reply. A trigger's limits count its starts alone, so one top-level message that a personMessage trigger takes lets anyone in the channel ask follow-ups in its thread. |
None |
Audit rows for a person's messages that a personMessage trigger's limits stopped |
One for each person, trigger and window of the trigger's rateLimit.per, which opens with the first stopped message. The windows are held in memory, at most 4096 at once. |
A later stopped message of the person in the window is counted in agentkourier_trigger_limited_total and the digest line, and not audited. A restart or a change of leader forgets the windows, so a window may get one more row. A row that could not be written opens no window: the row is tried again for the person's next stopped message. Past the bound, the windows that ended are dropped, and if none has, all are, so more rows are written, never fewer. |
rateLimit.per sets the window; the bound has no setting |
| A bot's mention of Agent Kourier, across every bot on a Binding | 3 in any 30m, 1 at a time, and 20 in any 24h |
The start is not made: no turn and nothing in the thread. It is counted, audited and in the window's digest line. | chat.botMentions: none turns bot mentions off. The numbers have no setting. |
| How much of a message field a trigger's regular expressions read | The first 16 KiB of each of the fields text, title, link, fallback, footer and body, cut at a character boundary (a character that the cut would split is left out whole). match, exclude and extract all read the same head. |
The rest of the field is not read: a regular expression finds nothing that is past it, and one that ends in $ ends at the end of the head. The message is otherwise unchanged. |
None |
| Slack events the adapter holds while the broker works through them, for each ChatConnection the broker serves | 16 for one channel (the one being handled and those waiting behind it), and 256 for all channels of that connection, past which a channel that already has an event held is refused another. A channel that holds none is never refused its first event, but once the total is full a channel takes one event at a time, so a press during its message, or the second alert of a burst, can be shed. The total is exceeded by one event, and one goroutine, for each other conversation (a channel or a direct message) Agent Kourier is in that has an event waiting: the lane of an event is the conversation Slack names in it, which a poster cannot choose, and events that decode to nothing share one lane (read from the code; what Slack guarantees about those identifiers was not verified here). The events of one channel are handled one at a time and in order, and different channels at once. When the broker is stopping, the events still waiting are not handled. |
The event is not queued: it is left unacknowledged, as when the broker fails to take an event, so Slack may send it again. Slack's retries are finite (how many, and how late, was not verified here), so a shed event can be lost. One that comes back after a later event of the same channel was taken is handled after it, so the order of events within a thread can invert (a close, then a fire): order within a thread holds only while the bounds do. It is counted in agentkourier_slack_events_shed_total by reason and connection, and logged at WARN: the first at once, and then, when another is shed 10s or more after the last line, one line with the count shed since, over all channels of that connection (its channel is that of the event that made the line); a count still pending when the connection ends is logged then. A button press that is left this way may not be sent again (unverified), and the person sees it fail. |
None. The bounds are per connection: each has its own lanes, so a full backlog on one sheds that connection's events and fills no other's. |
| Presses of buttons waiting to be processed | 1000 for each chat connection, 10 for one person on it (a press is recorded with the connection it came in on) |
A press past either is dropped. It is logged at WARN and acknowledged to the chat platform, and the person is told nothing. | None |
| A press that cannot be processed yet, which includes a vote on a reply whose message has no place recorded yet | Tried again until 1h after it was recorded |
The worker logs it at ERROR, gives up and deletes the press, and the person is told to press again. | None |
| The check that a person who pressed is a member of the channel and not a bot, and, for an approval with approver groups, that they are in one | 10s on Slack (on Microsoft Teams, the row below) |
The check fails, and the press is kept for another try, until it is given up as the row above says. | None |
| The reads of people on a Microsoft Teams connection: whether a person who pressed is in the channel's team and is no bot, a person's name for the agent, the name of who decided a question or an approval, which its ending shows, and the name of the person a message mentions | Each read is of the Bot Connector's roster of a conversation (the channel's, for whether a person who pressed is in its team, for an ending and for a message's mentions; each team's that the broker has heard from since it started, for a name and for whether a person is a bot, unless the person's account is kept), in pages of 500 members, and stops at the person (for a post or an edit, at the last of the people it mentions, whom it reads in one read); it is bounded as a whole, every page and every team, by 10s. Membership is read again at every press, and never kept. A person's account (their name, and whether it is a bot's) is kept for 1h, at most 1000 of them. A mention that could not be named is kept for 1m, at most 1000 of them: a person the channel's roster does not list, and a channel whose roster could not be read, which covers every person mentioned in it. A read that the post or edit itself gave up on is not kept. An ending or a mention shows at most 64 units of a name, and only its letters, marks, digits, ., - and ': anything else is a space between words. The page size, the answer's shape and the errors are what Microsoft documents; no roster was read on a test tenant. |
A read that is not done within the bound, or that fails (a rate limit, a 5xx, a removed bot, a conversation that is gone), is no answer: a press is kept for another try, as the row on a press that cannot be processed yet says, and a name is not shown (the agent gets the person's ID alone, and an ending or a mention says someone, still a mention of the person). A post or an edit that mentions a person whose account is not kept waits for the read before it is sent, up to 10s and at most 50 pages, and then names whom the read did not find someone; within 1m of a miss, it names the missed person, or anyone in a channel whose roster could not be read, someone with no read and no wait. A name read again after 1h shows a change of name. Past 1000 accounts, or 1000 misses, the expired are dropped first, then any, and a dropped one is read again when it is needed. A longer name is cut and marked. |
None |
| The pages of the Bot Connector's rosters that one read of people on a Microsoft Teams connection asks for (the row above) | 50 pages in all, across every team the read covers: 25,000 members at 500 a page, the largest team that Microsoft documents (Microsoft's figure, not measured). A roster whose page names as its next a page that the roster already gave is read no further. |
The read stops with an error and is no answer, as the row above says: a press is kept for another try, and each try makes at most 50 requests. A team past 25,000 members cannot be read to its end: a person on a later page is never found, so their press is never decided and their name never shown. | None |
| Probes of a Binding | Every 5m, each pass shifted by up to 10% so that brokers do not probe together, and 4 at a time. Each Binding has two: the agent card and the channel. One that asks for tool approvals from user groups has a third, which reads its groups one after the other, up to 10 of them with one request each, and stops at the first it cannot read. A pass reads each group once, however many Bindings name it: a Binding that comes to a group another Binding has read, or is reading, in the same pass waits for that read and takes its answer. So a pass makes at most one usergroups.users.list request for each group the connection's Bindings name, unless a read is cut short at its Binding's 8 second bound: the next Binding that needs the group then reads it again, and the request that was cut may still have counted against Slack's limit. At most 4 requests are made at a time, one for each probe running. Those requests share Slack's rate limit for the method with the group check of a tool-approval press (a press that Slack rate-limits is kept and tried again, not refused). Slack puts usergroups.users.list in its Tier 2, "20+ per minute", counted for each method, workspace and app (the method's page and Slack's rate limits), so a pass whose Bindings name more than 20 groups, or passes 30 seconds apart that read more than 20 in a minute between them, can be rate-limited, and so can a press made then. A group read that Slack rate-limits reads Unknown with the reason ChatUnavailable for every Binding whose read reaches the group (one that stops at an earlier group of its own list does not) until a later pass reads it; the pass does not read it again. |
Each adapter bounds its own call a little earlier: the read of all of a Binding's groups together, waits for another Binding's read included, is cut at 8 seconds, and is Unknown with the reason ChatUnavailable, the groups after the one it was in not read. A read that its Binding's bound cut short is no answer about the group: another Binding that was waiting for it, and still has time, reads the group itself. The wait counts against the waiting Binding's own 8 seconds even when the read it waited for is then cut, so a Binding can read Unknown with the reason ChatUnavailable for a pass because another Binding on the connection came to the group first with less time left. A probe that takes more than 10s is Unknown with the reason ProbeTimeout. A change to the config calls for a pass no sooner than 30s after the last pass began. |
None |
| People one turn mentions | At most chat.maxMentionsPerTurn |
The people past the cap are not mentioned. | chat.maxMentionsPerTurn |
What a thread shows¶
The chat side cuts text to what a message holds. Units are UTF-16 units, as the chat platform counts them.
| Limit | Value | Past it | Setting |
|---|---|---|---|
| The agent's reply in one message | 12000 units (Slack's markdown block) |
Cut. The cut is marked. | None |
| Steps a live stream shows | 50 |
The calls after these are made and not shown. | None. chat.progress and chat.output choose what is shown, not how many steps. |
| Steps a message shows when it is updated: an alert thread's reply on Slack, and every live reply on Microsoft Teams, which has no streams | The latest 20, under a line that counts the earlier ones |
The earlier ones are not listed. | None. chat.progress and chat.output choose what is shown, not how many steps. |
| A tool's name and its arguments in a status line | 64 units and 160 units |
Cut. | None |
| A tool's arguments in the ending that replaces an approval prompt, one line for each tool with its name and its verdict | 160 units of the arguments on one line, as key=value pairs |
Cut and marked; the prompt showed them whole. The name on the line is cut and marked too: on Slack at 100 units, on Microsoft Teams to what the cap of a line leaves. On Slack the arguments and the verdict together are held to 190 units, which count <, > and & as their escapes, so arguments with many of them are cut shorter; on Microsoft Teams an ending cut to fit its message (the row on a Microsoft Teams card) holds the arguments to half of what each text is cut to. |
None |
| How long an approval prompt waits for the reply the agent paused in to finish its last write, so that the ending of the approval can say what the reply's cards show | 5s from the pause |
The prompt is posted, and its ending names each tool with the summary of its arguments, as it does when the reply shows no card of the call. A reply whose last write is not throttled is written well inside it; one that wrote in the 2 seconds before the pause waits for the rest of them first. A question, an approval that a sub-agent raised, and an approval in a reply that shows no step cards (output: final, progress: activity, or a platform without them) wait for nothing. |
None |
| A step card's title or details (Slack) | 256 units |
Cut. | None |
| Blocks in one Slack message | 50 |
A prompt past it is refused as unusable. A reply's step cards take the room that the other blocks leave, and a line says how many steps are not shown. | None |
| Choices as radio buttons or checkboxes (Slack) | 10 |
A question with more gets a select menu, up to 100 choices. |
None |
| One choice's text, and a button's (Slack) | 75 units |
A question with a longer choice, or more choices than a select holds, is shown as a numbered list that the person answers by number. Each line is cut at 200 units. A button's label is cut. |
None |
| One Microsoft Teams message | 80 KiB of JSON as the broker sends it, under the about 100 KB that Microsoft documents for a bot's message (Microsoft's figure, not measured). A message with text and buttons is two posts, the text and then a card of the buttons, each with this budget of its own. In it the agent's reply takes at most 20000 units, its escapes counted, and each other line (a header, a note, a question, a choice, a step of the list under a live reply) 3000. A list of the most steps a reply lists, each of the longest tool name and arguments, fits beside the longest reply, which is cut to make room |
A line or a reply past its cap is cut, and the cut is marked. A message still over the budget has the reply cut to half, and again, down to 1000 units; one that is over it then, or that has no reply to cut, is not sent and counted as too long. An update of a live reply that is too long so is sent again at once without its steps, and the reply lists none from then on: the status line of its latest tool call is shown in their place. |
None |
| A Microsoft Teams card: a question, a tool approval, the card that replaces it when it ends, and the buttons under a message | The budget of one message (the row above), the card of a message's buttons on its own, sized as it names the longest ID of a message that it goes under; and each text of the card that the agent, a person or an alert wrote is cut at the cap of a line there; a tool's name and its arguments are held to that cap and not cut. A question's choices show as radio buttons or checkboxes up to 10. |
A question with more choices shows them in a menu. A question or an approval over the budget, or with a tool whose name or arguments are longer than the cap, is not posted: the pause is refused as one that cannot be shown. A message whose card of buttons is over the budget is not posted, its text neither, and is counted as too long. The card that replaces a question or an approval has its texts cut to half of the cap, and again, down to 200 units, until it fits; the longest of either (the questions or tools of the rows on a pause, each text at its cap) fits so. |
None |
| The cards of buttons under a message's text that one Microsoft Teams connection remembers, so that an edit of the message with the same buttons does not post them again | 4096 cards, in memory, the oldest forgotten first. A reply's live updates give it its buttons on the last of them, and may give them again after; the card is needed until the reply's last update. |
An edit of a message whose card is forgotten, or was posted before a restart or by another replica, posts the buttons again, and they show twice. A press of either card is taken. | None |
| The post of the card of buttons under a message's text on a Microsoft Teams connection | Tried once more, within the post's own deadline, when the call fails for this try only (the row on what the broker sends to a Microsoft Teams connection: a 429, a 412, a 5xx, a call cut at its bound): after the wait that a 429's Retry-After asks for (at least a second), when that is at most 5s, or after 1s when the failure asks for none. The wait is inside the post, which the outbox makes under its connection's delivery lock, so the connection's other posts wait behind it. A text whose ID is longer than the 64 bytes of an activity's ID, or holds a :, gets no card. |
A card still not posted after the second try, refused for good (a 403, say), or refused with a longer wait, is not posted: the text stands without its buttons, and the broker logs it at WARN and counts the call as failed (operation="PostButtons"). A later edit of the message with its buttons posts them; a message that is not edited again, such as one that the outbox posted whole, has none. |
None |
| A question's text (Slack) | 2000 units |
Cut. | None |
| A prompt's heading (Slack) | 150 units |
Cut. | None |
Replies carried as thread context to a turn on a Binding with chat.threadReplies: mention, and to a bot's mention; and, on Microsoft Teams, the thread's first message that a session's first turn carries, alone, under the same caps |
The newest 50 replies, each cut at 1000 units, an author's name and ID at 100 each, and the whole block at 6000 |
Replies that do not fit are left out, the oldest first, and the block's last line counts them. | None |
| The window of a thread the broker reads for that context | 1000 messages |
A longer window cannot be read: the turn carries the fixed line that Agent Kourier could not read the earlier replies (a bot's mention keeps the message that opened the thread). | None |
| A read of a thread on a Microsoft Teams connection, for that context | Microsoft Graph's replies of the thread's first message, in pages of 50 (the most that Microsoft documents), at most 20 pages, 1000 replies, whatever the window: Microsoft documents no query of the replies but the page size, so every page is read and the window is cut by the messages' IDs. A read that leads with the thread's first message reads it first, with one more call; the first turn of a session that a person's mention started reads that message alone, with that one call and no page of replies, under the same caps. At most 8 MiB of each answer is read, and the whole read is cut at 10s. A message's body is read as text up to 128 KiB, cut at a character, and an alert card's text to a depth of 32 elements. The page size, the paging and the order of the replies are Microsoft's documentation, not measured: the reader sorts what it read and does not rely on the order. |
A thread with more replies than the pages hold cannot be read, even for a short window, and so is a read past its time or a page past its size, one whose next page is a page the read already took or is not on Microsoft Graph, and one of a channel whose team the broker does not know yet (no activity of the channel that names its team has come to the bot, so the store holds no Microsoft Entra group for it): the turn carries the fixed line that Agent Kourier could not read the earlier replies, and the broker logs why at WARN (a bot's mention keeps the message that opened the thread when only the replies are too many, and the first turn of a session that a person's mention started reads that message alone, so the length of the thread does not stop it). A 403 of Graph, which an app that may not read the team's channel messages gets, is logged with the fix: the app's manifest must ask for the resource-specific permission ChannelMessage.Read.Group, and the app must be installed in the team. A 429 that asks for at most 5 seconds is waited out once, as on Slack. The rest of a longer body is not read, and neither is the text of a card nested deeper. |
None |
| The detail of a notice in the thread, which says why a turn failed. It is put on one line first. | 200 units |
Cut: a detail longer than this shows only its start. | None |
| A condition's message in a Binding's status | 1024 bytes |
Cut, and marked, after secrets are taken out. | None |
What the broker keeps, and logs¶
The durations here are the ones people notice. Stored data has what each table holds and how a sweep runs.
| Limit | Value | Past it | Setting |
|---|---|---|---|
| How long a thread keeps its session after its last activity | 90d by default |
The session is expired. A reply that the Binding takes gets the notice that the conversation has expired. An unmentioned reply with chat.threadReplies: mention gets none, and neither does a bot's mention. |
session.threadTTL of the Binding |
| How long an expired session is kept | 90d after its threadTTL has run out |
The session is deleted with every row that belongs to it, except its votes, which are kept for good. | None |
| A reply that was never delivered | 30d |
Dropped, with its text. | None |
| A reply written while its chat connection is not running (it has not started, stopped, or was removed) | The turn tries the write again every 2s, as long as the turn runs, and for the final text until 3m after the run first waits once the turn's final event has come. These tries are not counted against the attempts that a write is given when the chat platform fails it. When a write fails because the connection is down, or the platform rejects the credential of the runtime the turn holds, the turn looks the connection's platform up again, so a turn that is running when its connection comes up, or restarts, goes on through the platform that runs it: a message that was posted is edited, and a stream that the earlier run started is stopped and the message edited to the whole text. |
The turn gives up on the final text: it logs at ERROR, and agentkourier_render_final_total counts the outcome deadline_exceeded. A reply that was posted through the outbox stays there with the text of its first write, which for a live reply may be less than the whole reply, and is posted when the connection runs, within the 7d of the next row. A stream has no text in the outbox: it stays as it was shown. |
None |
| A post that was never posted | 7d |
Abandoned with the reason expired, and its text dropped. A failed post is retried from 5s doubling up to 5m, and each call to the chat platform is bounded at 30s. The posts of one chat connection go one at a time, so a call that takes the whole 30s holds up that connection's other posts, and the posts of another connection go meanwhile. A post whose chat connection nothing is running is not a failed post: it has no back-off, it is looked at on every pass of the outbox (every 30s, and whenever a post is queued), and it is posted on the first pass after its connection runs. The 7d applies to it as to any post: each pass abandons the posts of a connection that are past it, whether or not their platform answers, except for a connection whose call is still running, which is looked at again when the call ends. |
None |
| Finding a post again on a Microsoft Teams connection, before the outbox posts one that it queued or tried before (Finding a post again on Microsoft Teams) | One read of Microsoft Graph with the bounds of a read of a thread (the row on a read of a thread on a Microsoft Teams connection): the thread's replies, or, for a post that opens a thread, the channel's messages, at most 4 pages of them, the first that Graph gives. The read stops at the page that holds the post. |
A post that the pages do not hold, a channel whose team the broker does not know yet, a read that runs out of time after Graph gave a page, a page that Graph names off Graph or already read, an answer past the size of an answer, and a refusal of Graph that no retry mends (a 400, 401, 403 or 404, or Microsoft Entra's refusal of the token for Graph) are taken as not found: the broker logs why at WARN and posts, so the post may show twice. A 429, a 5xx, an answer that is not JSON and a read that runs out of time before any page came back fail the lookup, which the outbox tries again on its doubling wait; a lookup that keeps running out of time, while other calls of the connection pass, abandons the post with the reason lookup_timeout (Metrics). |
None |
| The request and answer of a settled interaction | 25h after it was decided, and 7d for an answer that was never marked delivered |
The text is emptied, and the row stays. | None |
| The key by which a button press that the chat platform sends again is recorded once | At least 1h after the press was recorded, whether it has been processed since or not: the key is forgotten at the first purge of presses, which runs every 10m, once that hour has passed. A Slack press is keyed by who pressed, the message, the button and the action's action_ts; a press with no action_ts has no key. While the press waits, a delivery of it again hands that press to the worker once more, as it was recorded, and records nothing; the worker skips it if it has finished it by then. |
A delivery of the press after its key is forgotten is recorded as a new press, as a press with no key is each time it comes: on a question already decided, a person whose press lost is told again who decided it, and for the person whose press won nothing is decided again: the answer that was recorded, while the interaction keeps its text, is offered to the session again, which takes it only while that task is paused on this same question, and otherwise drops it with no notice: a task that has gone on to a later question keeps that question open for its own answer. | None |
| The record of a trigger's starts, which its limits count | 24h |
The record is purged. | None |
| Audit entries | Kept for ever by default, so on SQLite a default install grows toward the volume. A retention must be at least 24h. |
An entry past the retention is purged. A retention under that stops the start (exit code 2). | auditRetention (AGENTKOURIER_AUDIT_RETENTION) |
Votes on investigations, in agentkourier_investigation_feedback_total |
100 alert names for each Binding |
The votes on any other name are counted under the name other. The votes themselves are kept for good. |
None |
| An error's text in a log line | 300 bytes |
Cut, and marked. The text that is cut is not logged anywhere. | None |
| The reason of an unusable pause in the audit log | 120 bytes |
Cut. | None |
What has no limit¶
The broker does not bound these, and the code confirms it. Where the number can hurt, the row says what to do.
| What | What to do |
|---|---|
Bindings, AgentBackends and ChatConnections in a cluster or a namespace, and the entries of allowedNamespaces |
A cap of the schema or of Validate bounds one object, never how many there are. Put a ResourceQuota in each tenant's namespace with count/bindings.agentkourier.dev and count/agentbackends.agentkourier.dev. The API server then refuses a create past it with exceeded quota (measured on kind 1.37.0, as Security says; not run again for this page). In each admitted namespace (with every namespace admitted, in each namespace where someone may create one) add count/chatconnections.agentkourier.dev (the same Kubernetes quota for the kind, not run here): the broker serves at most 16 ChatConnections, the oldest first, so a team that makes many can leave a later team's out. Add count/secrets for the Secrets a Binding's token or an AgentBackend's header can name (Kubernetes's own object-count quota, not run here): it bounds how many Secrets exist, and not how many names the objects give the broker to follow, since it follows each name with an informer of its own whether or not the Secret exists. A quota limits the count and not the size. What the broker holds of the largest object that Validate accepts was measured in a test process, not a pod. The informer's cache holds about 0.17 MiB for an AgentBackend, 0.03 MiB for a ChatConnection and 1.75 MiB for a Binding, with the labels, annotations, owner references, finalizers and managed fields of an object not held at all. On top of that the broker keeps the object it decoded: 1.44 MiB for a Binding, 0.16 MiB for an AgentBackend, and the Snapshot serves the Binding's, so a Binding costs about 3.2 MiB, and 3.8 MiB when it is served (the trigger table is 0.63 MiB). Every broker owns, decodes and keeps the Bindings that name a ChatConnection that does not exist, and every AgentBackend of the cluster, whether or not a Binding names it, so these cost every broker whoever created them. A full status (16 conditions of 32768 bytes) adds 0.50 MiB to the informer's copy of a Binding, and the figures assume an empty one. The conditions and the rest of the figures are in Security. |
| Streams and calls open to agents at once | Each has a size bound, but nothing bounds the number, so the bounds give the broker no total. Run only AgentBackends you trust, or give one its own broker, and size resources.limits.memory for the responses that can be in flight at once: see what the broker reads and holds. |
| The length of a stream, and the text a stream carries in all | A stream runs as long as its turn. The broker holds only up to the reply bound, and a stream that sends text that is thrown away can run as long as its context. |
| Threads, sessions and turns at once | Each thread runs one turn at a time and queues the rest. Nothing bounds how many threads run turns at once, or how many replies queue in a thread. |
| A person's mentions | A mention trigger has no limit. A rate limit applies to bots only. |
| Secrets that the objects of a namespace name, denied or not | Each name that a served object refers to has an informer of its own, and the first request of each (two, for a name that is denied) is not paced: the client's limiter of 50 a second spreads them, so a thousand denied names take about 40 s to be asked once, and a read of another tenant's Secret that makes its own request waits behind them (inferred from how the limiter queues, not measured). After that a denied name costs at most the paced tries above, about 20 requests a second in all however many there are, and a name that does not exist or is allowed costs one open watch. Put a count/secrets quota and the quotas on Bindings and AgentBackends in each tenant's namespace, which bound the names (see the security model). |
| The audit log and the votes | The audit log is kept for ever unless you set auditRetention. Nothing deletes a vote, and auditRetention does not reach them. |
The upper bound of rateLimit.maxRuns, maxConcurrent and maxRunsPerDay |
Only a lower bound is checked. |
Add-ons¶
An add-on is a separate module with separate limits: no setting of the broker changes
them, and no limit above applies inside an add-on. The add-ons share a module, the kit, whose limits apply to every
add-on (Every add-on); each add-on's section has the rest. The rows
give the add-on's environment variable, and the chart value that sets it, in which <name> is the add-on's block under
addons: cma or ax.
The values in code spans are constants or defaults of the kit's code or of an add-on's, and the tests of the module that holds each compare it with this page.
Every add-on¶
What the kit's runtime, store, settings and caller check hold for each add-on.
| Limit | Value | Past it | Setting |
|---|---|---|---|
| A settled task (completed, failed, canceled or rejected) and its message IDs | 720h after its last update |
Deleted. A resend of one of its messages after that starts a new turn. 0 keeps them. |
TASK_RETENTION (addons.<name>.taskRetention) |
| A context with no activity and no turn running | 2160h |
The add-on releases it: the add-on's section says what that deletes, and what counts as activity. 0 never releases one. Set it to the Binding's session.threadTTL. |
SESSION_IDLE_TTL (addons.<name>.sessionIdleTTL) |
| How often the add-on looks for idle contexts and old tasks | Every 1m |
A context can outlive SESSION_IDLE_TTL, and a task TASK_RETENTION, by up to that. Only the leader looks, and with both set to 0 it never does. |
None |
| How often the add-on reads its token file | Every 5s |
A token added or removed counts from the next read, which comes after the kubelet's own delay in updating a mounted Secret. A read that fails or finds no token keeps the last good tokens. At start, a file with no token stops the add-on. | None |
| Replicas on SQLite | One | The chart refuses addons.<name>.replicaCount above 1, and a second add-on on the same file stops at start. |
addons.<name>.store.type |
| A wait for a lock on the SQLite file | 5000ms |
The statement fails, and with it the request or the sweep that made it. | None |
| A Postgres transaction left idle | 10s |
Postgres ends the connection, which rolls the transaction back. A DSN that sets idle_in_transaction_session_timeout itself overrides it. |
POSTGRES_DSN |
| A Postgres statement | 30s |
Postgres cancels it, and the write or read fails. A DSN that sets statement_timeout itself overrides it. |
POSTGRES_DSN |
| The leader's lease, on Postgres | Lasts 15s, renewed within 10s, tried every 2s |
The add-on does not start unless the lease is longer than the renew deadline and the renew deadline longer than 1.2 times the retry period, all of them more than zero; with SQLite it refuses any of them. A leader that cannot renew within the deadline, or that finds another replica has taken the lease, exits at once with code 5, without a drain, and a standby takes over once the lease has run out. |
LEASE_DURATION, LEASE_RENEW_DEADLINE, LEASE_RETRY_PERIOD (addons.<name>.leaderElection) |
| A wait for a lock by a leader's write on Postgres, once the write has checked the lease | 3s |
Postgres cancels the statement and rolls the write back, and the request or the sweep that made it fails. A takeover waits for the writes that have checked the lease, so a write held up by another lock holds a takeover up for no longer than that. | None |
| An attempt to take the lease, on Postgres | Waits at most 4s for a lock, and runs each statement for at most 6s |
Postgres cancels the statement and the attempt fails. The failure is logged, and the replica tries again every LEASE_RETRY_PERIOD; one whose attempt before it listens fails starts as a standby. |
None |
| A standby's connection to the leader, to forward a request | 5s |
The standby answers the request 503 with Retry-After, and looks the leader up again for the next one. |
None |
| The request headers of a call to the add-on | 10s |
The connection is closed. | None |
| Open requests when the add-on is stopped | 5s |
The add-on stops waiting, and cancels the turns still running, as the next row says. | None |
| Turns still running when the add-on has stopped serving requests | 5s |
The add-on cancels them, refuses their task writes from then on, and waits up to that for them to end; past it, it logs stopped waiting for the turns still running and goes on to hand the lease over and close its store. Their tasks stay as they were, and fail at the next start, or at a standby's takeover, as the add-on's section says. |
None |
| Handing the lease over, on Postgres, when the add-on stops after its requests | 3s |
The add-on exits without handing it over, and a standby takes over once the lease has run out. | None |
A page of ListTasks |
50 tasks unless the request names a size, at most 100 |
A larger size is refused as an invalid request. Each task carries its last 100 history messages unless the request names another length; a negative length is refused as invalid parameters. |
None |
| An error's text in a log line | 300 bytes |
Cut at a character boundary and marked with …. This covers an error value and a string logged as error, err, cause, reason or message. Unlike Agent Kourier, the add-on does not run its secret redaction over the text: it cuts it only. |
None |
| A string value of a span attribute, such as a task or context ID that the caller chose | 256 characters |
Cut there, with no mark. A list of strings is cut the same way, each string on its own. | None |
| A warning of the trace exporter, or of OpenTelemetry's own diagnostics, while traces are exported | Each kind at most once every 1m |
The warnings of that kind within the interval are not logged. The next line logged for the kind carries their count as suppressed. A kind is the warning's message, and for a failed export or exporter shutdown its error's class too (such as timeout, tls or http_401); the error's text is never logged. |
None |
| The kinds of those warnings that the add-on keeps track of | 64 for the exporter's warnings, and as many again for OpenTelemetry's diagnostics |
A kind that first comes once that many are tracked is never logged, and is not counted in any suppressed. A tracked kind is never dropped while the process runs. |
None |
Claude Managed Agents add-on¶
The Claude Managed Agents add-on bridges A2A to sessions of one agent. The limits of every add-on apply to it too.
| Limit | Value | Past it | Setting |
|---|---|---|---|
| A tool result's text, as the thread's step card gets it | 4000 characters |
Cut, and marked with …. The rest never reaches Agent Kourier. |
None |
| A turn with no event from the session | A working update after each 60s |
The update keeps Agent Kourier's stream open, so the broker's own cut of a silent stream, at 5 minutes, does not reach a slow turn. | None |
| A turn that waits on a tool the sandbox runs, with no event from the session | 10m |
The add-on interrupts the session and fails the task with code: timeout, and the thread shows Agent Kourier's timeout notice. A sandbox that cannot be scheduled ends this way, and so does a command that runs silently for longer. MCP tools and the model's own thinking are not timed. 0 waits for ever. |
TOOL_RESULT_TIMEOUT (addons.cma.toolResultTimeout) |
What a context idle past SESSION_IDLE_TTL loses |
Its session | Archived, which cannot be undone, and the context's tasks from before are deleted with their message IDs. The context's next message starts a new session without the old history. A context's activity is a message accepted for it, and a turn of it that starts or ends. | SESSION_IDLE_TTL (addons.cma.sessionIdleTTL) |
| Callers | One: every accepted token is the same caller, Agent Kourier | Tasks are kept apart by caller, so any accepted token reaches every task: the tokens exist to be rotated, not to tell callers apart. | None |
| The start-up work: reading the store, checking each context's session against Claude Managed Agents, and failing the turns a restart cut off | The chart's startup probe, which asks /readyz: 30 tries, 2s apart |
The kubelet restarts the container, which starts the work again. The add-on serves nothing until the work is done. On Postgres a replica tries the lease once before it listens: one that takes it is bounded the same way, and one that does not is a standby, ready at once. A standby that starts to lead later, after its probe has passed, is not bounded by it: until its work is done it is out of the Service and answers A2A requests 503. | None |
| A turn running when the add-on stops | Not kept | The next start, or a standby's takeover, fails its task with "Interrupted by an adapter restart." and interrupts its session, and the thread shows Agent Kourier's failure notice. A task paused on an approval is kept. | None |
| What a message may carry | Text and data parts | A message with a file part, or with no text, is refused as invalid. Data parts reach the agent as JSON text. The agent's content blocks that are not text are not shown. | None |
| How a tool approval is answered | The Approve and Deny buttons | A typed reply to a paused approval is refused as invalid, and the task stays paused. | None |
| What a pause may wait on | Tool calls whose permission is ask |
A pause on a custom tool, or on a call the turn did not see ask for approval, fails the turn. If one pause names both a call the sandbox runs and one that needs approval, and the session pauses on the first call again after the approval, the turn fails the same way. | None |
A session.error event |
Logged | The turn goes on until the session idles or terminates; the thread is not told. | None |
A request to the Managed Agents API that fails with a connection error or status 408, 409, 429 or 5xx, unless the API's x-should-retry header says otherwise |
Sent again up to 2 times, the Anthropic Go SDK's own default (v2.13.0), which the add-on does not set | The SDK waits as the API's retry-after header says, or backs off, before each. After the last, the call fails: a call a turn makes fails the turn, an archive of an idle session is tried again at the next check, and a list of the sessions stops the start-up work. An event stream that breaks after it opens is not opened again. |
None |
| The wait for the Managed Agents API's response headers, on each of those requests | 10 minutes, the Anthropic Go SDK's own default (v2.13.0), which the add-on does not set | The attempt fails as a connection error, so it counts against the retries above. It does not bound the event stream once its headers have come: a session that sends no event is timed only while the turn waits on a tool the sandbox runs (the row on that wait). | None |
| Environments | Self-hosted | Cloud environments have not been tested and are not supported. The add-on does not refuse one. | None |
AX add-on¶
The AX add-on is an ADK agent on Amazon Bedrock or the Anthropic API that serves A2A. The limits of every add-on apply to it too.
| Limit | Value | Past it | Setting |
|---|---|---|---|
What a context idle past SESSION_IDLE_TTL loses |
Its ADK session | Deleted with the session's events and the context's tasks, a question it waits on included, and their message IDs. The context's next message starts a new session without the old history. A context's activity is a message accepted for it, and a create or an update of one of its tasks, which a turn makes as it starts and as it ends. | SESSION_IDLE_TTL (addons.ax.sessionIdleTTL) |
| A request to the OIDC issuer, for its discovery document or its signing keys | 10s |
The request is cut, and the A2A request that needed it is answered 503 with Retry-After: 1 and logged with the reason unavailable. The add-on reads the discovery document at the first request that carries a token, and again at each such request until a read succeeds. |
None |
| Callers | One | With the token file every accepted token is the same caller, and with OIDC the subject OIDC_SUBJECT is. Each task and ADK session belongs to the caller that created it, so a change from one check to the other, or of OIDC_SUBJECT, leaves the earlier tasks and sessions out of reach: a thread then goes on without its history. |
AUTH_TOKEN_FILE or OIDC_* |
| The start-up work: opening and migrating the store, before the add-on listens; then, on the leader, failing the turns a restart or a takeover cut off and starting the upkeep | The chart's startup probe, which asks /readyz: 30 tries, 2s apart |
The kubelet restarts the container, which starts the work again. Until the leader's work is done, /readyz answers 503 and A2A requests are answered 503 with Retry-After. On Postgres a replica tries the lease once before it listens: one that takes it is bounded the same way, and one that does not is a standby, ready at once. A standby that starts to lead later, after its probe has passed, is not bounded by it: until its work is done it is out of the Service and answers A2A requests 503. |
None |
| A turn running when the add-on stops | Not kept | The next start, or a standby's takeover, fails its task with "Interrupted by an agent restart.", and the thread shows Agent Kourier's failure notice. A task paused on a question is kept. | None |
| What the agent can do | Answer, and ask with its one tool, ask_user |
It has no tool that reaches another system, and asks for no tool approval: its agent card lists no human-in-the-loop extension. | None |
| A pause | One ask_user question |
A pause with two ask_user calls fails the turn. |
None |
| An answer to a question | Text | The answer is the text of the next message on the paused task. A message with a part that is not text, or with no text, is refused as invalid before the turn starts, and the task stays paused. | None |
| The model | Amazon Bedrock or the Anthropic API | The add-on does not start with another MODEL_PROVIDER. |
MODEL_PROVIDER (addons.ax.model.provider) |
| A reply on the Anthropic API | 8192 tokens, its thinking included |
The reply stops there. Cut in its text, the turn completes with what was written; cut in an ask_user call, or with nothing written, the turn fails. Bedrock's replies take the model's own limit. |
None |
A request to the Anthropic API that fails with a connection error or status 408, 409, 429 or 5xx, unless the API's x-should-retry header says otherwise |
Sent again up to 2 times |
The Anthropic SDK waits as the API's retry-after header says, or backs off, before each; after the last, the turn fails. An error event in a stream that has opened is not retried. |
None |
| The wait for the Anthropic API's response headers, on each of those requests | 10 minutes, the Anthropic Go SDK's own default (v2.13.0), which the add-on does not set | The attempt fails as a connection error, so it counts against the retries above. It does not bound the stream once its headers have come: a stream that stalls after it opens waits as long as the turn's context, on which the add-on sets no deadline. | None |