[Payment due @cretadn22] Make a new agent a full co-pilot of its creator#94602
Conversation
🦜 Polyglot Parrot! 🦜Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues: View the translation diffdiff --git a/src/languages/de.ts b/src/languages/de.ts
index 22e1904cb15..cac520ff07b 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -2846,7 +2846,7 @@ ${amount} für ${merchant} – ${date}`,
defaultAgentName: (displayName: string) => `Agent*in von ${displayName}`,
defaultPrompt:
'Lehne Ausgaben ab, die für Glücksspiele, Kinobesuche oder andere offensichtlich nicht geschäftliche Zwecke sind.\n\nErinnere den:die Nutzer:in daran, immer ein Belegfoto beizufügen, auf dem das Trinkgeld klar erkennbar ist.\n\nGenehmige den Bericht, wenn er früheren Berichten derselben Person sehr ähnlich ist.\n\nLehne Berichte mit mehr als 500 $ an Reisekosten ab.',
- copilotNote: 'Dieser Agent wird als Copilot mit vollem Zugriff auf dein Konto hinzugefügt, sodass er in deinem Namen handeln kann.',
+ copilotNote: 'Dieser Agent wird als vollwertige Assistenz für Ihr Konto hinzugefügt, sodass er in Ihrem Namen handeln kann.',
},
editAgentPage: {
title: 'Agent bearbeiten',
diff --git a/src/languages/es.ts b/src/languages/es.ts
index 01b62f1f765..19654251e3f 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -1753,7 +1753,6 @@ const translations: TranslationDeepObject<typeof en> = {
}
},
[CONST.NEXT_STEP.MESSAGE_KEY.WAITING_TO_MARK_AS_DONE]: (actor, actorType, _eta, _etaType) => {
- // eslint-disable-next-line default-case
switch (actorType) {
case CONST.NEXT_STEP.ACTOR_TYPE.CURRENT_USER:
return `Esperando a que <strong>tú</strong> lo marques como listo.`;
@@ -2718,7 +2717,7 @@ ${amount} para ${merchant} - ${date}`,
defaultAgentName: (displayName: string) => `Agente de ${displayName}`,
defaultPrompt:
'Rechazar gastos por juegos de azar, películas u otras razones claramente no comerciales.\n\nRecordar al usuario que siempre incluya una imagen del recibo que muestre claramente la propina.\n\nAprobar el informe si es muy similar a informes anteriores del mismo usuario.\n\nRechazar informes con más de $500 en gastos de viaje.',
- copilotNote: 'Este agente se añadirá como copiloto con acceso completo a tu cuenta, para que pueda actuar en tu nombre.',
+ copilotNote: 'Este agente se añadirá como copiloto completo de tu cuenta, para que pueda actuar en tu nombre.',
},
editAgentPage: {
title: 'Editar agente',
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index d7d30af598a..69af235edc5 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -1,6 +1,7 @@
/**
* _____ __ __
* / ___/__ ___ ___ _______ _/ /____ ___/ /
+ * / (_ / -_) _ \/ -_) __/ _ \`/ __/ -_) _ /
* \___/\__/_//_/\__/_/ \_,_/\__/\__/\_,_/
*
* This file was automatically generated. Please consider these alternatives before manually editing it:
@@ -862,7 +863,7 @@ const translations: TranslationDeepObject<typeof en> = {
beginningOfChatHistory: (users: string) => `Cette discussion est avec ${users}.`,
beginningOfChatHistoryPolicyExpenseChat: (workspaceName: string, submitterDisplayName: string) =>
`C’est ici que <strong>${submitterDisplayName}</strong> soumettra des dépenses à <strong>${workspaceName}</strong>. Utilisez simplement le bouton +.`,
- beginningOfChatHistoryPolicyExpenseChatTrack: 'C\u2019est ici que vous suivrez vos dépenses',
+ beginningOfChatHistoryPolicyExpenseChatTrack: 'C’est ici que vous suivrez vos dépenses',
beginningOfChatHistorySelfDM: 'Ceci est votre espace personnel. Utilisez-le pour vos notes, tâches, brouillons et rappels.',
beginningOfChatHistorySystemDM: 'Bienvenue ! Procédons à la configuration.',
chatWithAccountManager: 'Discutez avec votre gestionnaire de compte ici',
@@ -2852,7 +2853,7 @@ ${amount} pour ${merchant} - ${date}`,
defaultAgentName: (displayName: string) => `Agent de ${displayName}`,
defaultPrompt:
'Rejeter les dépenses liées aux jeux d’argent, aux films ou à d’autres motifs manifestement non professionnels.\n\nRappeler à l’utilisateur d’inclure systématiquement une image du reçu où le pourboire est clairement visible.\n\nApprouver le rapport s’il est très similaire aux rapports précédents du même utilisateur.\n\nRejeter les rapports contenant plus de 500 $ de frais de déplacement.',
- copilotNote: 'Cet agent sera ajouté comme copilote avec un accès complet à votre compte, afin de pouvoir agir en votre nom.',
+ copilotNote: 'Cet agent sera ajouté comme copilote à part entière de votre compte, afin de pouvoir agir en votre nom.',
},
editAgentPage: {
title: 'Modifier l’agent',
diff --git a/src/languages/it.ts b/src/languages/it.ts
index d0fa1d2ade9..77d91665cc5 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -2841,7 +2841,7 @@ ${amount} per ${merchant} - ${date}`,
defaultAgentName: (displayName: string) => `Agente di ${displayName}`,
defaultPrompt:
"Rifiuta le spese relative a gioco d'azzardo, cinema o altri motivi chiaramente non legati all'attività.\n\nRicorda all'utente di includere sempre un'immagine della ricevuta in cui la mancia sia ben visibile.\n\nApprova il report se è molto simile ai report precedenti dello stesso utente.\n\nRifiuta i report con più di 500 $ di spese di viaggio.",
- copilotNote: 'Questo agente verrà aggiunto come Copilot con accesso completo al tuo account, così potrà agire per tuo conto.',
+ copilotNote: 'Questo agente verrà aggiunto come copilota completo del tuo account, così potrà agire per tuo conto.',
},
editAgentPage: {
title: 'Modifica agente',
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index c7b4be0ad9f..e75c804099a 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -2817,7 +2817,7 @@ ${date} の ${merchant} への ${amount}`,
defaultAgentName: (displayName: string) => `${displayName} さんの代理人`,
defaultPrompt:
'ギャンブル、映画、またはその他明らかにビジネス目的ではない理由による経費は却下します。\n\nチップの金額が明確にわかるレシート画像を必ず添付するよう、ユーザーにリマインドします。\n\n同じユーザーの過去のレポートと非常によく似ている場合は、そのレポートを承認します。\n\n出張費が500ドルを超えるレポートは却下します。',
- copilotNote: 'このエージェントは、アカウントへのフルアクセス権を持つCopilotとして追加され、あなたの代わりに操作できるようになります。',
+ copilotNote: 'このエージェントはお客様のアカウントの正式なコパイロットとして追加され、お客様に代わって操作できるようになります。',
},
editAgentPage: {
title: 'エージェントを編集',
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index 0856c0a62b9..2f4e17498c3 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -2839,7 +2839,7 @@ ${amount} voor ${merchant} - ${date}`,
defaultAgentName: (displayName: string) => `Agent van ${displayName}`,
defaultPrompt:
'Wijs declaraties af die zijn voor gokken, films of andere duidelijk niet-zakelijke redenen.\n\nHerinner de gebruiker eraan altijd een bonafbeelding toe te voegen waarop de fooi duidelijk is.\n\nKeur het verslag goed als het sterk lijkt op eerdere verslagen van dezelfde gebruiker.\n\nWijs verslagen af met meer dan $500 aan reiskosten.',
- copilotNote: 'Deze agent wordt toegevoegd als Copilot met volledige toegang tot je account, zodat hij namens jou kan handelen.',
+ copilotNote: 'Deze agent wordt als volledige copiloot aan je account toegevoegd, zodat hij namens jou kan handelen.',
},
editAgentPage: {
title: 'Agent bewerken',
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 43fa09d6d3a..b8ab6f80669 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -2833,7 +2833,7 @@ ${amount} dla ${merchant} - ${date}`,
defaultAgentName: (displayName: string) => `Agent ${displayName}`,
defaultPrompt:
'Odrzucaj wydatki związane z hazardem, filmami lub innymi oczywistymi celami niezwiązanymi z działalnością biznesową.\n\nPrzypominaj użytkownikowi, aby zawsze dołączał zdjęcie paragonu, na którym wysokość napiwku jest wyraźnie widoczna.\n\nZatwierdź raport, jeśli jest bardzo podobny do wcześniejszych raportów tego samego użytkownika.\n\nOdrzucaj raporty zawierające więcej niż 500 USD wydatków na podróże.',
- copilotNote: 'Ten agent zostanie dodany jako Copilot z pełnym dostępem do Twojego konta, aby mógł działać w Twoim imieniu.',
+ copilotNote: 'Ten agent zostanie dodany jako pełny kopilot twojego konta, dzięki czemu będzie mógł działać w twoim imieniu.',
},
editAgentPage: {
title: 'Edytuj agenta',
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index ed3669b0ed5..96f2ec6b47e 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -2833,7 +2833,7 @@ ${amount} para ${merchant} - ${date}`,
defaultAgentName: (displayName: string) => `Agente de ${displayName}`,
defaultPrompt:
'Rejeite despesas relacionadas a jogos de azar, cinema ou outros motivos claramente não relacionados ao negócio.\n\nLembre o usuário de sempre incluir uma imagem do recibo em que a gorjeta fique clara.\n\nAprove o relatório se ele for muito semelhante a relatórios anteriores do mesmo usuário.\n\nRejeite relatórios com mais de US$ 500 em despesas de viagem.',
- copilotNote: 'Este agente será adicionado como Copilot com acesso total à sua conta, para que possa agir em seu nome.',
+ copilotNote: 'Esse agente será adicionado como copiloto completo da sua conta, para que possa agir em seu nome.',
},
editAgentPage: {
title: 'Editar agente',
diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts
index 74743614a1f..2527714e40e 100644
--- a/src/languages/zh-hans.ts
+++ b/src/languages/zh-hans.ts
@@ -2761,7 +2761,7 @@ ${amount},商户:${merchant} - 日期:${date}`,
defaultAgentName: (displayName: string) => `${displayName} 的代理人`,
defaultPrompt:
'拒绝与赌博、电影或其他明显非商务原因相关的报销。\n\n提醒用户务必附上一张能清楚显示小费金额的收据图片。\n\n如果报销报告与同一用户之前的报告非常相似,则批准该报告。\n\n拒绝包含超过 500 美元差旅费用的报销报告。',
- copilotNote: '该代理将作为对你账户拥有完全访问权限的 Copilot 添加,以便代表你执行操作。',
+ copilotNote: '此代理将被添加为你账户的完整副驾驶,因此它可以代表你采取行动。',
},
editAgentPage: {
title: '编辑代理',
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
|
@MelvinBot apply these translations |
|
@cretadn22 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
I can apply the Polyglot Parrot translation patch (the In the meantime, you can apply the patch yourself by copying the diff from the Polyglot Parrot comment and running |
puneetlath
left a comment
There was a problem hiding this comment.
@yuwenmemon I don't feel strongly, but I feel like maybe it makes more sense to handle this on the back-end? In the future, we're going to have company-owned and personal-owned agents. Company-owned will not get added as copilots by default and personal-owned will. And I kind of feel like it makes sense for the back-end to be the one to make that choice, especially since there is nothing in the UI that is controlling which it is.
I think we are doing it this way for now because of RuleBot, which we don't want to make a copilot for anyone. But maybe we can just pass isRuleBot to the API instead and let it decide? That makes more logical sense to me.
I don't feel super strongly about it, so I'm going to approve anyways since this should work. But if you agree then please update.
|
@puneetlath @yuwenmemon Does this PR need a C+ review and checklist? |
|
@cretadn22 yes, I think that would be idea. But the BE hasn't been merged yet. What do you think about my comment? |
| WRITE_COMMANDS.CREATE_AGENT, | ||
| {firstName, prompt, customExpensifyAvatarID, file, policyID, optimisticAccountID: String(optimisticAccountID)}, | ||
| {firstName, prompt, customExpensifyAvatarID, file, policyID, optimisticAccountID: String(optimisticAccountID), shouldAddAsCopilot: true}, |
There was a problem hiding this comment.
Is there a planned use case for passing shouldAddAsCopilot: false to this command? If it's always intended to be true, we should consider removing this new parameter to keep the API clean
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-07-03.at.12.27.34.movAndroid: mWeb ChromeScreen.Recording.2026-07-03.at.12.20.01.moviOS: HybridAppScreen.Recording.2026-07-03.at.12.21.55.moviOS: mWeb SafariScreen.Recording.2026-07-03.at.12.06.29.movMacOS: Chrome / SafariScreen.Recording.2026-07-03.at.12.04.54.mov |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
Web is on staging, removing HOLD |
|
@cretadn22 bump on this one please! |
| // Flag this as the user's personal agent; the backend makes personal agents a full co-pilot of the creator. | ||
| WRITE_COMMANDS.CREATE_AGENT, | ||
| {firstName, prompt, customExpensifyAvatarID, file, policyID, optimisticAccountID: String(optimisticAccountID)}, | ||
| {firstName, prompt, customExpensifyAvatarID, file, policyID, optimisticAccountID: String(optimisticAccountID), isPersonalAgent: true}, |
There was a problem hiding this comment.
Is there a planned use case for passing isPersonalAgent: false to this command? If it's always intended to be true, we should consider removing this new parameter to keep the API clean
There was a problem hiding this comment.
Yes, workspace agents are a planned future use-case
cretadn22
left a comment
There was a problem hiding this comment.
Just one callout: #94602 (comment)
|
@madmax330 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
🎯 @cretadn22, thanks for reviewing and testing this PR! 🎉 A payment issue will be created for your review once this PR is deployed to production. If payment is not needed (e.g., regression PR review fix etc), react with 👎 to this comment to prevent the payment issue from being created. |
trjExpensify
left a comment
There was a problem hiding this comment.
Core PR for a WN project. 👍
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 puneetlath has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/puneetlath in version: 9.4.29-0 🚀
|
|
🤖 Help site review — changes required This PR changes agent creation so a new agent is automatically added as a full Copilot of its creator's account (so it can act on your behalf, without you adding it as a Copilot by hand). That directly affects the Create and Use Agents help article. The article on Draft help site PR: #95531 What changed in the article (
@yuwenmemon, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR |
|
🚀 Deployed to staging by https://github.com/puneetlath in version: 9.4.31-0 🚀
|
Help site review — changes required ✅This PR makes a newly created agent automatically a full-access Copilot of its creator's account so it can act on their behalf, and adds an on-screen note explaining this before creation. The existing help article Draft help site PR: #95675 What the docs PR updates
UI labels were verified against the existing Copilot help articles and this PR's copy for exact capitalization. @yuwenmemon, please review the linked help site PR and confirm it reflects the current behavior. Then mark the linked help site PR |
|
🚀 Deployed to production by https://github.com/grgia in version: 9.4.31-0 🚀
Bundle Size Analysis (Sentry): |
|
🤖 Payment issue created: #95679 |

@puneetlath please review
Explanation of Change
When you create an agent from Settings > Agents, it's now sent as a full co-pilot of your account so it can act on your behalf without you adding it as a co-pilot by hand. The create screen also says this up front, so the relationship is clear before you create the agent.
Needs the backend pieces to take effect: Auth #22504 and Web-Expensify #54103 (deploy Auth, then Web, then this).
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/651811
PROPOSAL: N/A
Tests
Offline tests
Agent creation is optimistic, so the same steps work offline and reconcile once you're back online.
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)Avatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.