You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[DOCS] AgentMail inbox and API key for Markdown agents #1126
The agent editor has an Email section: inbox address, AgentMail API key, allowed recipients, and a Create inbox action that provisions a <name>@agentmail.to inbox through AgentMail. Mock mode answers provisioning locally.
The agent file's frontmatter gains two desktop-only keys: email (the inbox address) and email_to (comma-separated addresses the agent may send to). The API key is never written into the file: it is stored in ~/.infer/auth.yaml under AGENTMAIL_API_KEY_<agent>, which Export and Import refuse to carry.
A chat with an agent that has an inbox gets the hosted AgentMail MCP server with the agent's API key in the x-api-key header and AGENTMAIL_API_KEY in the worker environment, so the agent (and any run it spawns) can send, read and reply mail as that identity once the CLI applies per-thread mcp_servers and env on resume_conversation ([cli] resume_conversation: apply per-thread mcp_servers and env to workers cli#1754).
The sidebar agent row, the composer chip and the agent's preamble show or state the address and the send whitelist.
Affected pages
The Markdown agents documentation where the agent file's frontmatter keys are listed: add email and email_to as desktop-only keys and note the API key never travels in the file.
The agent editor walkthroughs, if they enumerate its sections.
The credentials or export documentation, if any, noting agent API keys live in auth.yaml beside the provider keys and never travel in exports.
Key names changed in desktop#458 before merge: agent files use allowed_recipients (a YAML block list of addresses or domains) instead of email_to. ~/.infer/config.yaml gains an optional agent_mail.allowed_recipients cap that applies to every agent. An agent with no allowed recipient can only mail itself. Threads get an inbox-scoped key that expires after 7 days, never the owner key.
Documented the AgentMail inbox for Markdown agents
Read the issue and the maintainer's key-name correction (allowed_recipients, not email_to)
Located the page: desktop.md - Your own agents frontmatter table and the API keys section
Added email and allowed_recipients to the frontmatter table as desktop-only keys
New Agent email section under Your own agents
Note in API keys that auth.yaml also holds per-agent keys, and exports leave them behind
bun run lint:md, bun run format:check, bun run build - all clean
Committed and opened the PR
What the new section covers
The editor's Email section: inbox address, AgentMail API key, allowed recipients, and Create inbox provisioning <name>@agentmail.to (answered locally in mock mode).
A frontmatter example with allowed_recipients as a block list of full addresses or bare domains, plus the safe default: an agent with no allowed recipient can only mail itself.
The machine-wide agent_mail.allowed_recipients cap in ~/.infer/config.yaml.
AGENTMAIL_API_KEY_<agent> in ~/.infer/auth.yaml, never in the agent file, and refused by both export and import.
The hosted AgentMail MCP server a chat gets, handed an inbox-scoped key that expires after 7 days rather than the owner key.
Where the address and whitelist show up: sidebar agent row, composer chip, and the agent's preamble.
I kept this to one new ### section rather than touching the editor walkthrough separately - the walkthrough does not enumerate editor sections, so there was nothing to extend there. No x-api-key header detail: that is an implementation detail of the MCP wiring, not something a reader acts on.
The wiring paragraph changes: the CLI will not apply mcp_servers and env on resume_conversation (inference-gateway/cli#1754 closed with the rationale). The agent reaches AgentMail through a hosted server entry in mcp.yaml (inference-gateway/cli#1755) and the key comes from the computer the agent runs on, a Kubernetes workspace Secret (inference-gateway/cli#1756) or the local auth.yaml. The editor, frontmatter and export parts of this ticket still hold. The CLI-side docs are tracked in a separate [DOCS] issue linked from those two.
Correction to my previous comment: the local ~/.infer/auth.yaml is not a source for the agent's key. Only the gateway and A2A supervisors read that file, and ${VAR} in the CLI's mcp.yaml expands from the process environment. On a local machine the key has to be in the environment infer daemon runs with, and on a Kubernetes workspace it comes from that workspace's secrets (inference-gateway/cli#1756).
PR #1127 is updated to match: the page no longer says a chat gets the hosted AgentMail server with a 7-day key, because the CLI never applied that. It now says an agent's chats cannot send or read mail yet. The desktop side of the new wiring is inference-gateway/desktop#473.
Activity
edenreich commentedon Nov 8, 2026
Key names changed in desktop#458 before merge: agent files use
allowed_recipients(a YAML block list of addresses or domains) instead ofemail_to.~/.infer/config.yamlgains an optionalagent_mail.allowed_recipientscap that applies to every agent. An agent with no allowed recipient can only mail itself. Threads get an inbox-scoped key that expires after 7 days, never the owner key.edenreich commentedon Nov 8, 2026
@claude can you document this?
inference-gateway-maintainer commentedon Nov 8, 2026
Claude finished @edenreich's task in 2m 23s —— View job •
docs/issue-1126-20261108-1342Documented the AgentMail inbox for Markdown agents
allowed_recipients, notemail_to)desktop.md- Your own agents frontmatter table and the API keys sectionemailandallowed_recipientsto the frontmatter table as desktop-only keysauth.yamlalso holds per-agent keys, and exports leave them behindbun run lint:md,bun run format:check,bun run build- all cleanWhat the new section covers
<name>@agentmail.to(answered locally in mock mode).allowed_recipientsas a block list of full addresses or bare domains, plus the safe default: an agent with no allowed recipient can only mail itself.agent_mail.allowed_recipientscap in~/.infer/config.yaml.AGENTMAIL_API_KEY_<agent>in~/.infer/auth.yaml, never in the agent file, and refused by both export and import.I kept this to one new
###section rather than touching the editor walkthrough separately - the walkthrough does not enumerate editor sections, so there was nothing to extend there. Nox-api-keyheader detail: that is an implementation detail of the MCP wiring, not something a reader acts on.Create a PR - already opened as #1127.
| Branch
edenreich commentedon Nov 8, 2026
The wiring paragraph changes: the CLI will not apply
mcp_serversandenvonresume_conversation(inference-gateway/cli#1754 closed with the rationale). The agent reaches AgentMail through a hosted server entry inmcp.yaml(inference-gateway/cli#1755) and the key comes from the computer the agent runs on, a Kubernetes workspace Secret (inference-gateway/cli#1756) or the localauth.yaml. The editor, frontmatter and export parts of this ticket still hold. The CLI-side docs are tracked in a separate[DOCS]issue linked from those two.edenreich commentedon Nov 8, 2026
Correction to my previous comment: the local
~/.infer/auth.yamlis not a source for the agent's key. Only the gateway and A2A supervisors read that file, and${VAR}in the CLI'smcp.yamlexpands from the process environment. On a local machine the key has to be in the environmentinfer daemonruns with, and on a Kubernetes workspace it comes from that workspace'ssecrets(inference-gateway/cli#1756).PR #1127 is updated to match: the page no longer says a chat gets the hosted AgentMail server with a 7-day key, because the CLI never applied that. It now says an agent's chats cannot send or read mail yet. The desktop side of the new wiring is inference-gateway/desktop#473.
inference-gateway-releaser commentedon Nov 8, 2026
🎉 This issue has been resolved in version 0.9.24 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀