bots-garden/sidekickspublic Fork
⑂ 15cb3c0
Commits
⬇ Clone ▾
git clone https://git.rickub.com/bots-garden/sidekicks.git
git clone ssh://git@rickub.com/bots-garden/sidekicks.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP

#26 Message à plusieurs agents : chacun ne reçoit que sa part, comme un message pour lui seul

Le cadrage (nom, ordre, « Your part of it ») ne marchait pas avec mm :
Alice répétait sa part et Bob écrivait l'histoire.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
k33g committed 2026-11-10T05:09:58+01:00 Browse files
15cb3c0 parent: cc9e2a7
modified .memory/history.md +1 -0
@@ -220,3 +220,4 @@
220220 - **2026-11-09 — #51 unload a model from the Log panel** (owner: "/unload already works; from the Log panel, unload the selected model or all of them"): convention kept — an agent that announces the `unload` slash command can unload its model. `channels.Manager.Unload` sends `/unload` in a throwaway session (no trace in conversations; refuses no-command / answering agents), `AgentService.Unload` also refuses a stopped agent and writes the answer to the agent log (`unload: …`), `UnloadAll` returns `{unloaded, skipped}` without starting stopped agents. UI: ⏏ Unload the model + ⏏ Unload all in the Log panel (result line), ⏏ on the agent row and in the agent view header; the frontend decides visibility from `appState.commands` (no `canUnload` in `List()`, it would be lost on agent:state events). Verified under Xvfb with two fake ACP agents (Python, scratchpad). Docs EN/FR: memory-pressure how-to, memory explanation, AgentService reference.
221221 - **2026-11-09 — #26 agents calling agents** (owner: "add #26 to the milestone and implement it"): chose @mentions in answers over an MCP "ask_agent" tool (mm ignores mcpServers). In a channel, members mentioned in an agent's answer answer next (`channels.Manager.answer` loop; `HandoffPrompt` tells them who addressed them; unseen includes the user's message). Guards: members only, not self, not already queued, not in code, not after a /command, not in direct conversations; `limits.maxAgentHandoffs` (default 3, 0–10, 0 = off; `*int` in raw config, read per message via `Options.Handoffs` → `Core.maxAgentHandoffs`), then system message `handoff-limit`; ■ stops the chain. Verified under Xvfb with two fake agents mentioning each other. Docs EN/FR: manage-channels how-to, channels-and-context explanation, configuration + agents-and-events references.
222222 - **2026-11-10 — messages for several agents** (owner tested "@alice make a story about seven of nine, then @bob make a summary of this story": Alice asked for the story, Bob did everything; "@alice … ensuite demande à @bob d'en faire un résumé" worked): cause — with nothing unseen, Alice got the raw text and does not know she is @alice. Now, when a user message routes to several agents in a channel, `SharedPrompt` tells each one its name, the answer order and its part (`PartFor`: words after its first mention up to the next addressed agent's mention, code masked; none under two words = request for all). The fake conn matches scripts on the user's text inside a shared prompt. Docs EN/FR: manage-channels row, channels-and-context explanation, agents-and-events routing row. Not yet tried with mm.
223+- **2026-11-10 — follow-up**: tried with mm, `SharedPrompt` failed (Alice echoed "make a story about seven of nine", Bob wrote the story). Replaced it: each addressed agent receives only its part through the plain `Prompt` format (the one that works for a single agent), linking word stripped (`trailingLink`: then/and/puis/et/ensuite…); whole text when the part is under two words. `SharedPrompt` removed. Not yet re-tried with mm.
@@ -220,3 +220,4 @@
220 - **2026-11-09 — #51 unload a model from the Log panel** (owner: "/unload already works; from the Log panel, unload the selected model or all of them"): convention kept — an agent that announces the `unload` slash command can unload its model. `channels.Manager.Unload` sends `/unload` in a throwaway session (no trace in conversations; refuses no-command / answering agents), `AgentService.Unload` also refuses a stopped agent and writes the answer to the agent log (`unload: …`), `UnloadAll` returns `{unloaded, skipped}` without starting stopped agents. UI: ⏏ Unload the model + ⏏ Unload all in the Log panel (result line), ⏏ on the agent row and in the agent view header; the frontend decides visibility from `appState.commands` (no `canUnload` in `List()`, it would be lost on agent:state events). Verified under Xvfb with two fake ACP agents (Python, scratchpad). Docs EN/FR: memory-pressure how-to, memory explanation, AgentService reference.220 - **2026-11-09 — #51 unload a model from the Log panel** (owner: "/unload already works; from the Log panel, unload the selected model or all of them"): convention kept — an agent that announces the `unload` slash command can unload its model. `channels.Manager.Unload` sends `/unload` in a throwaway session (no trace in conversations; refuses no-command / answering agents), `AgentService.Unload` also refuses a stopped agent and writes the answer to the agent log (`unload: …`), `UnloadAll` returns `{unloaded, skipped}` without starting stopped agents. UI: ⏏ Unload the model + ⏏ Unload all in the Log panel (result line), ⏏ on the agent row and in the agent view header; the frontend decides visibility from `appState.commands` (no `canUnload` in `List()`, it would be lost on agent:state events). Verified under Xvfb with two fake ACP agents (Python, scratchpad). Docs EN/FR: memory-pressure how-to, memory explanation, AgentService reference.
221 - **2026-11-09 — #26 agents calling agents** (owner: "add #26 to the milestone and implement it"): chose @mentions in answers over an MCP "ask_agent" tool (mm ignores mcpServers). In a channel, members mentioned in an agent's answer answer next (`channels.Manager.answer` loop; `HandoffPrompt` tells them who addressed them; unseen includes the user's message). Guards: members only, not self, not already queued, not in code, not after a /command, not in direct conversations; `limits.maxAgentHandoffs` (default 3, 0–10, 0 = off; `*int` in raw config, read per message via `Options.Handoffs` → `Core.maxAgentHandoffs`), then system message `handoff-limit`; ■ stops the chain. Verified under Xvfb with two fake agents mentioning each other. Docs EN/FR: manage-channels how-to, channels-and-context explanation, configuration + agents-and-events references.221 - **2026-11-09 — #26 agents calling agents** (owner: "add #26 to the milestone and implement it"): chose @mentions in answers over an MCP "ask_agent" tool (mm ignores mcpServers). In a channel, members mentioned in an agent's answer answer next (`channels.Manager.answer` loop; `HandoffPrompt` tells them who addressed them; unseen includes the user's message). Guards: members only, not self, not already queued, not in code, not after a /command, not in direct conversations; `limits.maxAgentHandoffs` (default 3, 0–10, 0 = off; `*int` in raw config, read per message via `Options.Handoffs` → `Core.maxAgentHandoffs`), then system message `handoff-limit`; ■ stops the chain. Verified under Xvfb with two fake agents mentioning each other. Docs EN/FR: manage-channels how-to, channels-and-context explanation, configuration + agents-and-events references.
222 - **2026-11-10 — messages for several agents** (owner tested "@alice make a story about seven of nine, then @bob make a summary of this story": Alice asked for the story, Bob did everything; "@alice … ensuite demande à @bob d'en faire un résumé" worked): cause — with nothing unseen, Alice got the raw text and does not know she is @alice. Now, when a user message routes to several agents in a channel, `SharedPrompt` tells each one its name, the answer order and its part (`PartFor`: words after its first mention up to the next addressed agent's mention, code masked; none under two words = request for all). The fake conn matches scripts on the user's text inside a shared prompt. Docs EN/FR: manage-channels row, channels-and-context explanation, agents-and-events routing row. Not yet tried with mm.222 - **2026-11-10 — messages for several agents** (owner tested "@alice make a story about seven of nine, then @bob make a summary of this story": Alice asked for the story, Bob did everything; "@alice … ensuite demande à @bob d'en faire un résumé" worked): cause — with nothing unseen, Alice got the raw text and does not know she is @alice. Now, when a user message routes to several agents in a channel, `SharedPrompt` tells each one its name, the answer order and its part (`PartFor`: words after its first mention up to the next addressed agent's mention, code masked; none under two words = request for all). The fake conn matches scripts on the user's text inside a shared prompt. Docs EN/FR: manage-channels row, channels-and-context explanation, agents-and-events routing row. Not yet tried with mm.
223+- **2026-11-10 — follow-up**: tried with mm, `SharedPrompt` failed (Alice echoed "make a story about seven of nine", Bob wrote the story). Replaced it: each addressed agent receives only its part through the plain `Prompt` format (the one that works for a single agent), linking word stripped (`trailingLink`: then/and/puis/et/ensuite…); whole text when the part is under two words. `SharedPrompt` removed. Not yet re-tried with mm.
modified docs/en/explanation/channels-and-context.md +1 -1
@@ -16,7 +16,7 @@ The alternative, one shared session that every agent reads, does not exist in AC
1616
1717 A message goes to the agents it mentions, in order; without a mention, to the last agent who spoke. That is how people talk in a group: you name someone, or you carry on with the person you were talking to. Nobody answers a message that names nobody in a channel where several agents have not spoken yet — guessing would surprise the user more than asking them to choose.
1818
19-Agents answer one after the other, never at the same time. On a laptop, two local models generating together are each slower than one after the other, and memory is the real limit (two small models on the reference machine). Answering in turn also lets the second agent read the first one's answer: "@alice @bob compare" gives Bob Alice's answer to compare with. A small model does not know its own name, though: given "@alice write a story, then @bob sum it up", Alice may wait for a story, and Bob may write it and sum it up. So when a message addresses several agents, each one is told who it is, in which order they answer, and its part — the words after its name, up to the next agent's name. A part shorter than two words ("@alice and @bob, tell a joke") means the request is for everyone. For the same reason an agent answers one channel at a time: a second channel waits, and shows whose turn it is.
19+Agents answer one after the other, never at the same time. On a laptop, two local models generating together are each slower than one after the other, and memory is the real limit (two small models on the reference machine). Answering in turn also lets the second agent read the first one's answer: "@alice @bob compare" gives Bob Alice's answer to compare with. A small model does not know its own name, though: given "@alice write a story, then @bob sum it up", Alice may wait for a story, and Bob may write it and sum it up. Telling each one its name and its part was not enough either: a small model repeated its part instead of doing it. So when a message addresses several agents, each one receives only its part, as if the user had written it to it alone — the words after its name, up to the next agent's name, without the "then" that links them. Bob still reads Alice's answer before his part. A part shorter than two words ("@alice and @bob, tell a joke") means the request is for everyone: each agent receives the whole message. For the same reason an agent answers one channel at a time: a second channel waits, and shows whose turn it is.
2020
2121 ## When an agent calls another one
2222
@@ -16,7 +16,7 @@ The alternative, one shared session that every agent reads, does not exist in AC
16 16
17 A message goes to the agents it mentions, in order; without a mention, to the last agent who spoke. That is how people talk in a group: you name someone, or you carry on with the person you were talking to. Nobody answers a message that names nobody in a channel where several agents have not spoken yet — guessing would surprise the user more than asking them to choose.17 A message goes to the agents it mentions, in order; without a mention, to the last agent who spoke. That is how people talk in a group: you name someone, or you carry on with the person you were talking to. Nobody answers a message that names nobody in a channel where several agents have not spoken yet — guessing would surprise the user more than asking them to choose.
18 18
19-Agents answer one after the other, never at the same time. On a laptop, two local models generating together are each slower than one after the other, and memory is the real limit (two small models on the reference machine). Answering in turn also lets the second agent read the first one's answer: "@alice @bob compare" gives Bob Alice's answer to compare with. A small model does not know its own name, though: given "@alice write a story, then @bob sum it up", Alice may wait for a story, and Bob may write it and sum it up. So when a message addresses several agents, each one is told who it is, in which order they answer, and its part — the words after its name, up to the next agent's name. A part shorter than two words ("@alice and @bob, tell a joke") means the request is for everyone. For the same reason an agent answers one channel at a time: a second channel waits, and shows whose turn it is.19+Agents answer one after the other, never at the same time. On a laptop, two local models generating together are each slower than one after the other, and memory is the real limit (two small models on the reference machine). Answering in turn also lets the second agent read the first one's answer: "@alice @bob compare" gives Bob Alice's answer to compare with. A small model does not know its own name, though: given "@alice write a story, then @bob sum it up", Alice may wait for a story, and Bob may write it and sum it up. Telling each one its name and its part was not enough either: a small model repeated its part instead of doing it. So when a message addresses several agents, each one receives only its part, as if the user had written it to it alone — the words after its name, up to the next agent's name, without the "then" that links them. Bob still reads Alice's answer before his part. A part shorter than two words ("@alice and @bob, tell a joke") means the request is for everyone: each agent receives the whole message. For the same reason an agent answers one channel at a time: a second channel waits, and shows whose turn it is.
20 20
21 ## When an agent calls another one21 ## When an agent calls another one
22 22
modified docs/en/how-to/manage-channels.md +1 -1
@@ -44,7 +44,7 @@ While an agent is answering, the history cannot be cleared: stop it (**■**) or
4444 | --- | --- |
4545 | a specific agent to answer | `@name your message` (the list after `@` filters as you type; Tab or Enter picks) |
4646 | several agents to answer in turn | `@alice @bob compare your answers` |
47-| each agent to do its own part | `@alice write a story about Picard, then @bob sum it up`: each agent is told the words after its name |
47+| each agent to do its own part | `@alice write a story about Picard, then @bob sum it up`: each agent receives only the words after its name |
4848 | an agent to involve another one | ask it: `@alice …, and ask @bob` ([below](#let-the-agents-call-each-other)) |
4949 | the agent you were talking with | your message, without mention |
5050 | an agent's command | `/` then pick it in the list; with several agents, `/agent:command` |
@@ -44,7 +44,7 @@ While an agent is answering, the history cannot be cleared: stop it (**■**) or
44 | --- | --- |44 | --- | --- |
45 | a specific agent to answer | `@name your message` (the list after `@` filters as you type; Tab or Enter picks) |45 | a specific agent to answer | `@name your message` (the list after `@` filters as you type; Tab or Enter picks) |
46 | several agents to answer in turn | `@alice @bob compare your answers` |46 | several agents to answer in turn | `@alice @bob compare your answers` |
47-| each agent to do its own part | `@alice write a story about Picard, then @bob sum it up`: each agent is told the words after its name |47+| each agent to do its own part | `@alice write a story about Picard, then @bob sum it up`: each agent receives only the words after its name |
48 | an agent to involve another one | ask it: `@alice …, and ask @bob` ([below](#let-the-agents-call-each-other)) |48 | an agent to involve another one | ask it: `@alice …, and ask @bob` ([below](#let-the-agents-call-each-other)) |
49 | the agent you were talking with | your message, without mention |49 | the agent you were talking with | your message, without mention |
50 | an agent's command | `/` then pick it in the list; with several agents, `/agent:command` |50 | an agent's command | `/` then pick it in the list; with several agents, `/agent:command` |
modified docs/en/reference/agents-and-events.md +1 -1
@@ -73,7 +73,7 @@ A channel holds a conversation between the user and one or several agents. A dir
7373 | The message | Answered by |
7474 | --- | --- |
7575 | `/agent:command arguments` (`agent` is a configured agent) | that agent, which receives `/command arguments` |
76-| contains `@name` mentions of configured agents | the mentioned agents, one after the other, in the order of the mentions; a mentioned agent that is not a member joins first. With several agents, each one is told its name, the order, and its part (the words after its mention, up to the next answering agent's mention; none under two words) |
76+| contains `@name` mentions of configured agents | the mentioned agents, one after the other, in the order of the mentions; a mentioned agent that is not a member joins first. With several agents, each one receives only its part instead of the text: the words after its mention, up to the next answering agent's mention, without a linking word (then, and, puis, et…); the whole text when the part has fewer than two words |
7777 | no mention | the last agent who answered in the channel; with a single member, that member |
7878 | no mention and nobody answered yet, several members | nobody: system message `no-recipient` |
7979 | any message in a direct conversation | its agent; mentions are plain text there |
@@ -73,7 +73,7 @@ A channel holds a conversation between the user and one or several agents. A dir
73 | The message | Answered by |73 | The message | Answered by |
74 | --- | --- |74 | --- | --- |
75 | `/agent:command arguments` (`agent` is a configured agent) | that agent, which receives `/command arguments` |75 | `/agent:command arguments` (`agent` is a configured agent) | that agent, which receives `/command arguments` |
76-| contains `@name` mentions of configured agents | the mentioned agents, one after the other, in the order of the mentions; a mentioned agent that is not a member joins first. With several agents, each one is told its name, the order, and its part (the words after its mention, up to the next answering agent's mention; none under two words) |76+| contains `@name` mentions of configured agents | the mentioned agents, one after the other, in the order of the mentions; a mentioned agent that is not a member joins first. With several agents, each one receives only its part instead of the text: the words after its mention, up to the next answering agent's mention, without a linking word (then, and, puis, et…); the whole text when the part has fewer than two words |
77 | no mention | the last agent who answered in the channel; with a single member, that member |77 | no mention | the last agent who answered in the channel; with a single member, that member |
78 | no mention and nobody answered yet, several members | nobody: system message `no-recipient` |78 | no mention and nobody answered yet, several members | nobody: system message `no-recipient` |
79 | any message in a direct conversation | its agent; mentions are plain text there |79 | any message in a direct conversation | its agent; mentions are plain text there |
modified docs/fr/explanation/channels-et-contexte.md +1 -1
@@ -16,7 +16,7 @@ L'alternative, une session commune lue par tous les agents, n'existe pas dans AC
1616
1717 Un message va aux agents qu'il mentionne, dans l'ordre ; sans mention, au dernier agent qui a parlé. C'est ainsi qu'on parle en groupe : on nomme quelqu'un, ou on continue avec la personne à qui l'on parlait. Personne ne répond à un message qui ne nomme personne dans un channel où plusieurs agents n'ont pas encore parlé — deviner surprendrait davantage l'utilisateur que lui demander de choisir.
1818
19-Les agents répondent l'un après l'autre, jamais en même temps. Sur un portable, deux modèles locaux qui génèrent ensemble sont chacun plus lents qu'à tour de rôle, et la mémoire est la vraie limite (deux petits modèles sur la machine de référence). Répondre à tour de rôle permet aussi au second agent de lire la réponse du premier : « @alice @bob comparez » donne à Bob la réponse d'Alice à comparer. Mais un petit modèle ne connaît pas son propre nom : devant « @alice écris une histoire, puis @bob résume-la », Alice peut attendre qu'on lui donne une histoire, et Bob l'écrire puis la résumer. Quand un message s'adresse à plusieurs agents, chacun apprend donc qui il est, dans quel ordre ils répondent, et sa part : les mots qui suivent son nom, jusqu'au nom de l'agent suivant. Une part de moins de deux mots (« @alice et @bob, une blague ») veut dire que la demande est pour tous. Pour la même raison, un agent répond à un seul channel à la fois : un second channel attend, et indique à qui c'est le tour.
19+Les agents répondent l'un après l'autre, jamais en même temps. Sur un portable, deux modèles locaux qui génèrent ensemble sont chacun plus lents qu'à tour de rôle, et la mémoire est la vraie limite (deux petits modèles sur la machine de référence). Répondre à tour de rôle permet aussi au second agent de lire la réponse du premier : « @alice @bob comparez » donne à Bob la réponse d'Alice à comparer. Mais un petit modèle ne connaît pas son propre nom : devant « @alice écris une histoire, puis @bob résume-la », Alice peut attendre qu'on lui donne une histoire, et Bob l'écrire puis la résumer. Lui dire son nom et sa part ne suffisait pas non plus : un petit modèle répétait sa part au lieu de la faire. Quand un message s'adresse à plusieurs agents, chacun ne reçoit donc que sa part, comme si l'utilisateur l'avait écrite pour lui seul : les mots qui suivent son nom, jusqu'au nom de l'agent suivant, sans le « puis » qui les relie. Bob lit toujours la réponse d'Alice avant sa part. Une part de moins de deux mots (« @alice et @bob, une blague ») veut dire que la demande est pour tous : chaque agent reçoit le message entier. Pour la même raison, un agent répond à un seul channel à la fois : un second channel attend, et indique à qui c'est le tour.
2020
2121 ## Quand un agent en appelle un autre
2222
@@ -16,7 +16,7 @@ L'alternative, une session commune lue par tous les agents, n'existe pas dans AC
16 16
17 Un message va aux agents qu'il mentionne, dans l'ordre ; sans mention, au dernier agent qui a parlé. C'est ainsi qu'on parle en groupe : on nomme quelqu'un, ou on continue avec la personne à qui l'on parlait. Personne ne répond à un message qui ne nomme personne dans un channel où plusieurs agents n'ont pas encore parlé — deviner surprendrait davantage l'utilisateur que lui demander de choisir.17 Un message va aux agents qu'il mentionne, dans l'ordre ; sans mention, au dernier agent qui a parlé. C'est ainsi qu'on parle en groupe : on nomme quelqu'un, ou on continue avec la personne à qui l'on parlait. Personne ne répond à un message qui ne nomme personne dans un channel où plusieurs agents n'ont pas encore parlé — deviner surprendrait davantage l'utilisateur que lui demander de choisir.
18 18
19-Les agents répondent l'un après l'autre, jamais en même temps. Sur un portable, deux modèles locaux qui génèrent ensemble sont chacun plus lents qu'à tour de rôle, et la mémoire est la vraie limite (deux petits modèles sur la machine de référence). Répondre à tour de rôle permet aussi au second agent de lire la réponse du premier : « @alice @bob comparez » donne à Bob la réponse d'Alice à comparer. Mais un petit modèle ne connaît pas son propre nom : devant « @alice écris une histoire, puis @bob résume-la », Alice peut attendre qu'on lui donne une histoire, et Bob l'écrire puis la résumer. Quand un message s'adresse à plusieurs agents, chacun apprend donc qui il est, dans quel ordre ils répondent, et sa part : les mots qui suivent son nom, jusqu'au nom de l'agent suivant. Une part de moins de deux mots (« @alice et @bob, une blague ») veut dire que la demande est pour tous. Pour la même raison, un agent répond à un seul channel à la fois : un second channel attend, et indique à qui c'est le tour.19+Les agents répondent l'un après l'autre, jamais en même temps. Sur un portable, deux modèles locaux qui génèrent ensemble sont chacun plus lents qu'à tour de rôle, et la mémoire est la vraie limite (deux petits modèles sur la machine de référence). Répondre à tour de rôle permet aussi au second agent de lire la réponse du premier : « @alice @bob comparez » donne à Bob la réponse d'Alice à comparer. Mais un petit modèle ne connaît pas son propre nom : devant « @alice écris une histoire, puis @bob résume-la », Alice peut attendre qu'on lui donne une histoire, et Bob l'écrire puis la résumer. Lui dire son nom et sa part ne suffisait pas non plus : un petit modèle répétait sa part au lieu de la faire. Quand un message s'adresse à plusieurs agents, chacun ne reçoit donc que sa part, comme si l'utilisateur l'avait écrite pour lui seul : les mots qui suivent son nom, jusqu'au nom de l'agent suivant, sans le « puis » qui les relie. Bob lit toujours la réponse d'Alice avant sa part. Une part de moins de deux mots (« @alice et @bob, une blague ») veut dire que la demande est pour tous : chaque agent reçoit le message entier. Pour la même raison, un agent répond à un seul channel à la fois : un second channel attend, et indique à qui c'est le tour.
20 20
21 ## Quand un agent en appelle un autre21 ## Quand un agent en appelle un autre
22 22
modified docs/fr/how-to/gerer-les-channels.md +1 -1
@@ -44,7 +44,7 @@ Pendant qu'un agent répond, l'historique ne peut pas être vidé : arrêtez-le
4444 | --- | --- |
4545 | qu'un agent précis réponde | `@nom votre message` (la liste après `@` se filtre pendant la frappe ; Tab ou Entrée choisit) |
4646 | que plusieurs agents répondent à tour de rôle | `@alice @bob comparez vos réponses` |
47-| que chaque agent fasse sa part | `@alice écris une histoire sur Picard, puis @bob résume-la` : chaque agent reçoit les mots qui suivent son nom |
47+| que chaque agent fasse sa part | `@alice écris une histoire sur Picard, puis @bob résume-la` : chaque agent ne reçoit que les mots qui suivent son nom |
4848 | qu'un agent en fasse intervenir un autre | demandez-le-lui : `@alice …, et demande à @bob` ([plus bas](#laisser-les-agents-sappeler-entre-eux)) |
4949 | continuer avec l'agent à qui vous parliez | votre message, sans mention |
5050 | une commande d'un agent | `/` puis choisissez-la dans la liste ; avec plusieurs agents, `/agent:commande` |
@@ -44,7 +44,7 @@ Pendant qu'un agent répond, l'historique ne peut pas être vidé : arrêtez-le
44 | --- | --- |44 | --- | --- |
45 | qu'un agent précis réponde | `@nom votre message` (la liste après `@` se filtre pendant la frappe ; Tab ou Entrée choisit) |45 | qu'un agent précis réponde | `@nom votre message` (la liste après `@` se filtre pendant la frappe ; Tab ou Entrée choisit) |
46 | que plusieurs agents répondent à tour de rôle | `@alice @bob comparez vos réponses` |46 | que plusieurs agents répondent à tour de rôle | `@alice @bob comparez vos réponses` |
47-| que chaque agent fasse sa part | `@alice écris une histoire sur Picard, puis @bob résume-la` : chaque agent reçoit les mots qui suivent son nom |47+| que chaque agent fasse sa part | `@alice écris une histoire sur Picard, puis @bob résume-la` : chaque agent ne reçoit que les mots qui suivent son nom |
48 | qu'un agent en fasse intervenir un autre | demandez-le-lui : `@alice …, et demande à @bob` ([plus bas](#laisser-les-agents-sappeler-entre-eux)) |48 | qu'un agent en fasse intervenir un autre | demandez-le-lui : `@alice …, et demande à @bob` ([plus bas](#laisser-les-agents-sappeler-entre-eux)) |
49 | continuer avec l'agent à qui vous parliez | votre message, sans mention |49 | continuer avec l'agent à qui vous parliez | votre message, sans mention |
50 | une commande d'un agent | `/` puis choisissez-la dans la liste ; avec plusieurs agents, `/agent:commande` |50 | une commande d'un agent | `/` puis choisissez-la dans la liste ; avec plusieurs agents, `/agent:commande` |
modified docs/fr/reference/agents-et-evenements.md +1 -1
@@ -73,7 +73,7 @@ Un channel contient une conversation entre l'utilisateur et un ou plusieurs agen
7373 | Le message | Répondu par |
7474 | --- | --- |
7575 | `/agent:commande arguments` (`agent` est un agent de la configuration) | cet agent, qui reçoit `/commande arguments` |
76-| contient des mentions `@nom` d'agents de la configuration | les agents mentionnés, l'un après l'autre, dans l'ordre des mentions ; un agent mentionné qui n'est pas membre rejoint d'abord le channel. Avec plusieurs agents, chacun reçoit son nom, l'ordre et sa part (les mots après sa mention, jusqu'à celle de l'agent suivant qui répond ; aucune sous deux mots) |
76+| contient des mentions `@nom` d'agents de la configuration | les agents mentionnés, l'un après l'autre, dans l'ordre des mentions ; un agent mentionné qui n'est pas membre rejoint d'abord le channel. Avec plusieurs agents, chacun ne reçoit que sa part au lieu du texte : les mots après sa mention, jusqu'à celle de l'agent suivant qui répond, sans mot de liaison (then, and, puis, et…) ; le texte entier quand la part fait moins de deux mots |
7777 | sans mention | le dernier agent qui a répondu dans le channel ; avec un seul membre, ce membre |
7878 | sans mention, personne n'a encore répondu, plusieurs membres | personne : message système `no-recipient` |
7979 | tout message d'une conversation directe | son agent ; les mentions y sont du simple texte |
@@ -73,7 +73,7 @@ Un channel contient une conversation entre l'utilisateur et un ou plusieurs agen
73 | Le message | Répondu par |73 | Le message | Répondu par |
74 | --- | --- |74 | --- | --- |
75 | `/agent:commande arguments` (`agent` est un agent de la configuration) | cet agent, qui reçoit `/commande arguments` |75 | `/agent:commande arguments` (`agent` est un agent de la configuration) | cet agent, qui reçoit `/commande arguments` |
76-| contient des mentions `@nom` d'agents de la configuration | les agents mentionnés, l'un après l'autre, dans l'ordre des mentions ; un agent mentionné qui n'est pas membre rejoint d'abord le channel. Avec plusieurs agents, chacun reçoit son nom, l'ordre et sa part (les mots après sa mention, jusqu'à celle de l'agent suivant qui répond ; aucune sous deux mots) |76+| contient des mentions `@nom` d'agents de la configuration | les agents mentionnés, l'un après l'autre, dans l'ordre des mentions ; un agent mentionné qui n'est pas membre rejoint d'abord le channel. Avec plusieurs agents, chacun ne reçoit que sa part au lieu du texte : les mots après sa mention, jusqu'à celle de l'agent suivant qui répond, sans mot de liaison (then, and, puis, et…) ; le texte entier quand la part fait moins de deux mots |
77 | sans mention | le dernier agent qui a répondu dans le channel ; avec un seul membre, ce membre |77 | sans mention | le dernier agent qui a répondu dans le channel ; avec un seul membre, ce membre |
78 | sans mention, personne n'a encore répondu, plusieurs membres | personne : message système `no-recipient` |78 | sans mention, personne n'a encore répondu, plusieurs membres | personne : message système `no-recipient` |
79 | tout message d'une conversation directe | son agent ; les mentions y sont du simple texte |79 | tout message d'une conversation directe | son agent ; les mentions y sont du simple texte |
modified internal/channels/fakes_test.go +0 -5
@@ -84,11 +84,6 @@ func (c *fakeConn) Prompt(ctx context.Context, sessionID string, text string, at
8484 c.attachments = append(c.attachments, attachments)
8585 handler := c.handlers[sessionID]
8686 play := c.scripts[text]
87- if _, message, shared := strings.Cut(text, "The user's message:\n"); play == nil && shared {
88- // A message for several agents (SharedPrompt): the script is the user's text.
89- message, _, _ = strings.Cut(message, "\n\n")
90- play = c.scripts[message]
91- }
9287 reply := c.reply
9388 c.mu.Unlock()
9489 if play == nil {
@@ -84,11 +84,6 @@ func (c *fakeConn) Prompt(ctx context.Context, sessionID string, text string, at
84 c.attachments = append(c.attachments, attachments)84 c.attachments = append(c.attachments, attachments)
85 handler := c.handlers[sessionID]85 handler := c.handlers[sessionID]
86 play := c.scripts[text]86 play := c.scripts[text]
87- if _, message, shared := strings.Cut(text, "The user's message:\n"); play == nil && shared {
88- // A message for several agents (SharedPrompt): the script is the user's text.
89- message, _, _ = strings.Cut(message, "\n\n")
90- play = c.scripts[message]
91- }
92 reply := c.reply87 reply := c.reply
93 c.mu.Unlock()88 c.mu.Unlock()
94 if play == nil {89 if play == nil {
modified internal/channels/handoff_test.go +15 -0
@@ -116,3 +116,18 @@ func TestACommandIsNotHandedOn(t *testing.T) {
116116 t.Fatalf("a command's answer hands nothing on: %q", sent)
117117 }
118118 }
119+
120+func TestEachAddressedAgentReceivesItsPart(t *testing.T) {
121+ f := setup(t, nil)
122+ general := f.channel(t, "general", "alice", "bob")
123+ f.source.conn("alice").reply = func(string) string { return "Once upon a time." }
124+ f.send(t, general.ID, "@alice make a story about seven of nine, then @bob make a summary of this story")
125+ f.idle(t, general.ID, 5)
126+ if sent := f.source.conn("alice").sent(); len(sent) != 1 || sent[0] != "make a story about seven of nine" {
127+ t.Fatalf("alice prompts: %q", sent)
128+ }
129+ sent := f.source.conn("bob").sent()
130+ if len(sent) != 1 || !strings.Contains(sent[0], "alice: Once upon a time.\n") || !strings.HasSuffix(sent[0], "The user now writes to you (answer directly, without your name in front):\nmake a summary of this story") {
131+ t.Fatalf("bob prompts: %q", sent)
132+ }
133+}
@@ -116,3 +116,18 @@ func TestACommandIsNotHandedOn(t *testing.T) {
116 t.Fatalf("a command's answer hands nothing on: %q", sent)116 t.Fatalf("a command's answer hands nothing on: %q", sent)
117 }117 }
118 }118 }
119+
120+func TestEachAddressedAgentReceivesItsPart(t *testing.T) {
121+ f := setup(t, nil)
122+ general := f.channel(t, "general", "alice", "bob")
123+ f.source.conn("alice").reply = func(string) string { return "Once upon a time." }
124+ f.send(t, general.ID, "@alice make a story about seven of nine, then @bob make a summary of this story")
125+ f.idle(t, general.ID, 5)
126+ if sent := f.source.conn("alice").sent(); len(sent) != 1 || sent[0] != "make a story about seven of nine" {
127+ t.Fatalf("alice prompts: %q", sent)
128+ }
129+ sent := f.source.conn("bob").sent()
130+ if len(sent) != 1 || !strings.Contains(sent[0], "alice: Once upon a time.\n") || !strings.HasSuffix(sent[0], "The user now writes to you (answer directly, without your name in front):\nmake a summary of this story") {
131+ t.Fatalf("bob prompts: %q", sent)
132+ }
133+}
modified internal/channels/route.go +7 -24
@@ -22,6 +22,8 @@ var (
2222 codePattern = regexp.MustCompile("(?s)```.*?(```|$)|`[^`\n]*`")
2323 trailingPunct = regexp.MustCompile(`[.,;:!?)\]]+$`)
2424 pathLike = regexp.MustCompile(`[\p{L}_.]`)
25+ // the word that links two parts: "@alice write a story, then @bob …"
26+ trailingLink = regexp.MustCompile(`(?i)[\s,;:]+(and then|and|then|after that|et ensuite|et après|et|puis|ensuite|après)$`)
2527 )
2628
2729 // MaxAttachments is how many files a message may join.
@@ -164,32 +166,12 @@ func HandoffPrompt(agent, from, channelName string, unseen []Line) string {
164166 return builder.String()
165167 }
166168
167-// SharedPrompt builds what agent receives for a user message that addresses
168-// several agents (addressed, in the order they answer): small models do not
169-// know their own name, and take "@alice write a story, then @bob sum it up"
170-// for a request to both. Each agent is told who it is, who answers before
171-// and after it, and the part of the message that follows its mention (PartFor).
172-//
173-// SharedPrompt("alice", "#general", "@alice write a story, then @bob sum it up", []string{"alice", "bob"}, nil)
174-func SharedPrompt(agent, channelName, text string, addressed []string, unseen []Line) string {
175- var builder strings.Builder
176- writeUnseen(&builder, agent, channelName, unseen)
177- names := make([]string, len(addressed))
178- for i, name := range addressed {
179- names[i] = "@" + name
180- }
181- fmt.Fprintf(&builder, "The user writes to several agents in %s, who answer one after the other in this order: %s. You are @%s.\n", channelName, strings.Join(names, ", "), agent)
182- fmt.Fprintf(&builder, "The user's message:\n%s\n\n", text)
183- if part := PartFor(text, agent, addressed); part != "" {
184- fmt.Fprintf(&builder, "Your part of it: %s\nDo only your part, the others do theirs. ", part)
185- }
186- builder.WriteString("Answer directly, without your name in front.")
187- return builder.String()
188-}
189-
190169 // PartFor returns what the user asks agent in a message that addresses several
191170 // agents: the words after agent's first mention, up to the mention of
192-// another addressed agent. "" when there are fewer than two words — the
171+// another addressed agent, without the word that links them ("then",
172+// "puis"…). Small models do not know their own name: given the whole
173+// "@alice write a story, then @bob sum it up", Alice waits for a story and
174+// Bob does both, so each agent receives only its part (issue #26). "" when there are fewer than two words — the
193175 // request is then for everyone ("@alice and @bob, tell a joke"). Code is
194176 // not looked into.
195177 //
@@ -212,6 +194,7 @@ func PartFor(text, agent string, addressed []string) string {
212194 return ""
213195 }
214196 part := strings.Trim(text[start:end], " \t\n,;:")
197+ part = strings.Trim(trailingLink.ReplaceAllString(part, ""), " \t\n,;:")
215198 if len(strings.Fields(part)) < 2 {
216199 return ""
217200 }
@@ -22,6 +22,8 @@ var (
22 codePattern = regexp.MustCompile("(?s)```.*?(```|$)|`[^`\n]*`")22 codePattern = regexp.MustCompile("(?s)```.*?(```|$)|`[^`\n]*`")
23 trailingPunct = regexp.MustCompile(`[.,;:!?)\]]+$`)23 trailingPunct = regexp.MustCompile(`[.,;:!?)\]]+$`)
24 pathLike = regexp.MustCompile(`[\p{L}_.]`)24 pathLike = regexp.MustCompile(`[\p{L}_.]`)
25+ // the word that links two parts: "@alice write a story, then @bob …"
26+ trailingLink = regexp.MustCompile(`(?i)[\s,;:]+(and then|and|then|after that|et ensuite|et après|et|puis|ensuite|après)$`)
25 )27 )
26 28
27 // MaxAttachments is how many files a message may join.29 // MaxAttachments is how many files a message may join.
@@ -164,32 +166,12 @@ func HandoffPrompt(agent, from, channelName string, unseen []Line) string {
164 return builder.String()166 return builder.String()
165 }167 }
166 168
167-// SharedPrompt builds what agent receives for a user message that addresses
168-// several agents (addressed, in the order they answer): small models do not
169-// know their own name, and take "@alice write a story, then @bob sum it up"
170-// for a request to both. Each agent is told who it is, who answers before
171-// and after it, and the part of the message that follows its mention (PartFor).
172-//
173-// SharedPrompt("alice", "#general", "@alice write a story, then @bob sum it up", []string{"alice", "bob"}, nil)
174-func SharedPrompt(agent, channelName, text string, addressed []string, unseen []Line) string {
175- var builder strings.Builder
176- writeUnseen(&builder, agent, channelName, unseen)
177- names := make([]string, len(addressed))
178- for i, name := range addressed {
179- names[i] = "@" + name
180- }
181- fmt.Fprintf(&builder, "The user writes to several agents in %s, who answer one after the other in this order: %s. You are @%s.\n", channelName, strings.Join(names, ", "), agent)
182- fmt.Fprintf(&builder, "The user's message:\n%s\n\n", text)
183- if part := PartFor(text, agent, addressed); part != "" {
184- fmt.Fprintf(&builder, "Your part of it: %s\nDo only your part, the others do theirs. ", part)
185- }
186- builder.WriteString("Answer directly, without your name in front.")
187- return builder.String()
188-}
189-
190 // PartFor returns what the user asks agent in a message that addresses several169 // PartFor returns what the user asks agent in a message that addresses several
191 // agents: the words after agent's first mention, up to the mention of170 // agents: the words after agent's first mention, up to the mention of
192-// another addressed agent. "" when there are fewer than two words — the171+// another addressed agent, without the word that links them ("then",
172+// "puis"…). Small models do not know their own name: given the whole
173+// "@alice write a story, then @bob sum it up", Alice waits for a story and
174+// Bob does both, so each agent receives only its part (issue #26). "" when there are fewer than two words — the
193 // request is then for everyone ("@alice and @bob, tell a joke"). Code is175 // request is then for everyone ("@alice and @bob, tell a joke"). Code is
194 // not looked into.176 // not looked into.
195 //177 //
@@ -212,6 +194,7 @@ func PartFor(text, agent string, addressed []string) string {
212 return ""194 return ""
213 }195 }
214 part := strings.Trim(text[start:end], " \t\n,;:")196 part := strings.Trim(text[start:end], " \t\n,;:")
197+ part = strings.Trim(trailingLink.ReplaceAllString(part, ""), " \t\n,;:")
215 if len(strings.Fields(part)) < 2 {198 if len(strings.Fields(part)) < 2 {
216 return ""199 return ""
217 }200 }
modified internal/channels/route_test.go +4 -19
@@ -115,7 +115,7 @@ func TestReferencesAreTheFilesJoinedWithADollar(t *testing.T) {
115115 func TestPartForIsWhatFollowsTheAgentsMention(t *testing.T) {
116116 addressed := []string{"alice", "bob"}
117117 text := "@alice make a story about seven of nine, then @bob make a summary of this story"
118- cases := map[string]string{"alice": "make a story about seven of nine, then", "bob": "make a summary of this story"}
118+ cases := map[string]string{"alice": "make a story about seven of nine", "bob": "make a summary of this story"}
119119 for agent, want := range cases {
120120 if got := channels.PartFor(text, agent, addressed); got != want {
121121 t.Errorf("%s: got %q, want %q", agent, got, want)
@@ -134,26 +134,11 @@ func TestPartForIsWhatFollowsTheAgentsMention(t *testing.T) {
134134 if got := channels.PartFor("@alice and @bob, tell me a joke", "bob", addressed); got != "tell me a joke" {
135135 t.Errorf("got %q", got)
136136 }
137+ if got := channels.PartFor("@alice écris une histoire et ensuite @bob résume-la", "alice", addressed); got != "écris une histoire" {
138+ t.Errorf("got %q", got)
139+ }
137140 // Only the agents that answer cut a part: @carol is just text here.
138141 if got := channels.PartFor("@alice ask @carol about trains", "alice", addressed); got != "ask @carol about trains" {
139142 t.Errorf("got %q", got)
140143 }
141144 }
142-
143-func TestSharedPromptTellsTheAgentWhoItIsAndItsPart(t *testing.T) {
144- text := "@alice make a story, then @bob sum it up"
145- got := channels.SharedPrompt("bob", "#general", text, []string{"alice", "bob"}, []channels.Line{{Author: "alice", Text: "Once upon a time."}})
146- want := "[Messages in #general you have not seen yet]\n" +
147- "alice: Once upon a time.\n" +
148- "[End of the messages]\n\n" +
149- "The user writes to several agents in #general, who answer one after the other in this order: @alice, @bob. You are @bob.\n" +
150- "The user's message:\n" + text + "\n\n" +
151- "Your part of it: sum it up\nDo only your part, the others do theirs. Answer directly, without your name in front."
152- if got != want {
153- t.Fatalf("got:\n%s\nwant:\n%s", got, want)
154- }
155- got = channels.SharedPrompt("alice", "#general", "@alice @bob compare", []string{"alice", "bob"}, nil)
156- if strings.Contains(got, "Your part") || !strings.Contains(got, "You are @alice.") {
157- t.Fatalf("a request for everyone has no part:\n%s", got)
158- }
159-}
@@ -115,7 +115,7 @@ func TestReferencesAreTheFilesJoinedWithADollar(t *testing.T) {
115 func TestPartForIsWhatFollowsTheAgentsMention(t *testing.T) {115 func TestPartForIsWhatFollowsTheAgentsMention(t *testing.T) {
116 addressed := []string{"alice", "bob"}116 addressed := []string{"alice", "bob"}
117 text := "@alice make a story about seven of nine, then @bob make a summary of this story"117 text := "@alice make a story about seven of nine, then @bob make a summary of this story"
118- cases := map[string]string{"alice": "make a story about seven of nine, then", "bob": "make a summary of this story"}118+ cases := map[string]string{"alice": "make a story about seven of nine", "bob": "make a summary of this story"}
119 for agent, want := range cases {119 for agent, want := range cases {
120 if got := channels.PartFor(text, agent, addressed); got != want {120 if got := channels.PartFor(text, agent, addressed); got != want {
121 t.Errorf("%s: got %q, want %q", agent, got, want)121 t.Errorf("%s: got %q, want %q", agent, got, want)
@@ -134,26 +134,11 @@ func TestPartForIsWhatFollowsTheAgentsMention(t *testing.T) {
134 if got := channels.PartFor("@alice and @bob, tell me a joke", "bob", addressed); got != "tell me a joke" {134 if got := channels.PartFor("@alice and @bob, tell me a joke", "bob", addressed); got != "tell me a joke" {
135 t.Errorf("got %q", got)135 t.Errorf("got %q", got)
136 }136 }
137+ if got := channels.PartFor("@alice écris une histoire et ensuite @bob résume-la", "alice", addressed); got != "écris une histoire" {
138+ t.Errorf("got %q", got)
139+ }
137 // Only the agents that answer cut a part: @carol is just text here.140 // Only the agents that answer cut a part: @carol is just text here.
138 if got := channels.PartFor("@alice ask @carol about trains", "alice", addressed); got != "ask @carol about trains" {141 if got := channels.PartFor("@alice ask @carol about trains", "alice", addressed); got != "ask @carol about trains" {
139 t.Errorf("got %q", got)142 t.Errorf("got %q", got)
140 }143 }
141 }144 }
142-
143-func TestSharedPromptTellsTheAgentWhoItIsAndItsPart(t *testing.T) {
144- text := "@alice make a story, then @bob sum it up"
145- got := channels.SharedPrompt("bob", "#general", text, []string{"alice", "bob"}, []channels.Line{{Author: "alice", Text: "Once upon a time."}})
146- want := "[Messages in #general you have not seen yet]\n" +
147- "alice: Once upon a time.\n" +
148- "[End of the messages]\n\n" +
149- "The user writes to several agents in #general, who answer one after the other in this order: @alice, @bob. You are @bob.\n" +
150- "The user's message:\n" + text + "\n\n" +
151- "Your part of it: sum it up\nDo only your part, the others do theirs. Answer directly, without your name in front."
152- if got != want {
153- t.Fatalf("got:\n%s\nwant:\n%s", got, want)
154- }
155- got = channels.SharedPrompt("alice", "#general", "@alice @bob compare", []string{"alice", "bob"}, nil)
156- if strings.Contains(got, "Your part") || !strings.Contains(got, "You are @alice.") {
157- t.Fatalf("a request for everyone has no part:\n%s", got)
158- }
159-}
modified internal/channels/turns.go +7 -3
@@ -460,7 +460,8 @@ func (m *Manager) tryTurn(agent string) bool {
460460 // prompt is what agent receives for item: the command alone, or the text
461461 // with the channel messages it has not seen; when another agent (from)
462462 // handed it the floor, those messages, the user's included, and who
463-// addresses it. The caller holds m.mu.
463+// addresses it. A message for several agents gives each one its part
464+// (PartFor). The caller holds m.mu.
464465 func (m *Manager) prompt(ch *channel, agent string, item *pending, from string, fresh bool) string {
465466 if item.route.Command != "" {
466467 return item.route.Command
@@ -472,10 +473,13 @@ func (m *Manager) prompt(ch *channel, agent string, item *pending, from string,
472473 if from != "" {
473474 return HandoffPrompt(agent, from, place, unseen(ch, agent, nil, fresh))
474475 }
476+ text := textOf(item.message)
475477 if addressed := item.route.Agents; len(addressed) > 1 && ch.info.Direct == "" {
476- return SharedPrompt(agent, place, textOf(item.message), addressed, unseen(ch, agent, item.message, fresh))
478+ if part := PartFor(text, agent, addressed); part != "" {
479+ text = part
480+ }
477481 }
478- return Prompt(agent, place, textOf(item.message), unseen(ch, agent, item.message, fresh))
482+ return Prompt(agent, place, text, unseen(ch, agent, item.message, fresh))
479483 }
480484
481485 // unseen lists the finished user and agent messages of ch that agent has not
@@ -460,7 +460,8 @@ func (m *Manager) tryTurn(agent string) bool {
460 // prompt is what agent receives for item: the command alone, or the text460 // prompt is what agent receives for item: the command alone, or the text
461 // with the channel messages it has not seen; when another agent (from)461 // with the channel messages it has not seen; when another agent (from)
462 // handed it the floor, those messages, the user's included, and who462 // handed it the floor, those messages, the user's included, and who
463-// addresses it. The caller holds m.mu.463+// addresses it. A message for several agents gives each one its part
464+// (PartFor). The caller holds m.mu.
464 func (m *Manager) prompt(ch *channel, agent string, item *pending, from string, fresh bool) string {465 func (m *Manager) prompt(ch *channel, agent string, item *pending, from string, fresh bool) string {
465 if item.route.Command != "" {466 if item.route.Command != "" {
466 return item.route.Command467 return item.route.Command
@@ -472,10 +473,13 @@ func (m *Manager) prompt(ch *channel, agent string, item *pending, from string,
472 if from != "" {473 if from != "" {
473 return HandoffPrompt(agent, from, place, unseen(ch, agent, nil, fresh))474 return HandoffPrompt(agent, from, place, unseen(ch, agent, nil, fresh))
474 }475 }
476+ text := textOf(item.message)
475 if addressed := item.route.Agents; len(addressed) > 1 && ch.info.Direct == "" {477 if addressed := item.route.Agents; len(addressed) > 1 && ch.info.Direct == "" {
476- return SharedPrompt(agent, place, textOf(item.message), addressed, unseen(ch, agent, item.message, fresh))478+ if part := PartFor(text, agent, addressed); part != "" {
479+ text = part
480+ }
477 }481 }
478- return Prompt(agent, place, textOf(item.message), unseen(ch, agent, item.message, fresh))482+ return Prompt(agent, place, text, unseen(ch, agent, item.message, fresh))
479 }483 }
480 484
481 // unseen lists the finished user and agent messages of ch that agent has not485 // unseen lists the finished user and agent messages of ch that agent has not