<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mikael</title>
    <description>The latest articles on DEV Community by Mikael (@mmmikael).</description>
    <link>https://dev.to/mmmikael</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3982230%2F79796bc4-a03d-49e2-90b5-5edacd7c58ae.jpeg</url>
      <title>DEV Community: Mikael</title>
      <link>https://dev.to/mmmikael</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mmmikael"/>
    <language>en</language>
    <item>
      <title>Your agent finished at 3 a.m. Where did the report go?</title>
      <dc:creator>Mikael</dc:creator>
      <pubDate>Sat, 13 Jun 2026 06:32:37 +0000</pubDate>
      <link>https://dev.to/mmmikael/your-agent-finished-at-3-am-where-did-the-report-go-m8a</link>
      <guid>https://dev.to/mmmikael/your-agent-finished-at-3-am-where-did-the-report-go-m8a</guid>
      <description>&lt;p&gt;&lt;strong&gt;Overnight agents do good work, then dump it in a log file or a noisy Slack channel. Here's a pattern for delivering their output to a private, end-to-end encrypted inbox you read with your coffee.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You point an agent at a nightly job — audit the dependencies, summarize yesterday's support tickets, check the infra, scan the repo for regressions. It runs at 3 a.m. and does good work. Then the work goes... where?&lt;/p&gt;

&lt;p&gt;Usually one of three bad places:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A log file&lt;/strong&gt; you'll never open.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A Slack channel&lt;/strong&gt; that's already 200 messages deep by the time you wake up.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A plaintext file on a server&lt;/strong&gt;, which is fine until the report contains a leaked key, a customer name, or a security finding — and now it's sitting in cleartext on a box you don't fully trust.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And the fix you'd reach for first — &lt;em&gt;"just email the report to me"&lt;/em&gt; — is the one that bites hardest. You &lt;em&gt;can&lt;/em&gt; do it cleanly: a locked-down, send-only API key sends mail and nothing else. But the path of least resistance is "connect your email account," and that grant is far wider than the job needs — now the agent can read and send your mail, not just hand you a file.&lt;/p&gt;

&lt;p&gt;I learned this the hard way. I once connected an agent to my email so it could send me updates — and it took that as license to start &lt;em&gt;replying to my incoming messages&lt;/em&gt; on its own, without my ever asking. Mail went out under my name that I never wrote. The job was "send me a file." The access I'd handed over was "run my inbox."&lt;/p&gt;

&lt;p&gt;The work is good. The &lt;em&gt;delivery&lt;/em&gt; is the broken part. Here's a pattern that fixes it: your overnight agent delivers its report to a private, end-to-end encrypted inbox, and you read it with your coffee — decrypted in your browser, with a passkey.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we're building
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cron, 3 a.m.
      ↓
agent does the work
      ↓
encrypted delivery
      ↓
your inbox (read at 8 a.m.)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The agent produces a report (Markdown, PDF, a CSV, whatever), hands it to the Agent Relay CLI, and the CLI encrypts it locally before it ever leaves the machine. The server stores only ciphertext. When you open the inbox, your browser decrypts it. Nobody in between — not the server, not a Slack workspace, not a log aggregator — can read it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The delivery, in one line
&lt;/h2&gt;

&lt;p&gt;Once your agent has written its output, delivering it is a single command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# create ARELAY_TOKEN once in the portal&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;ARELAY_TOKEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;ar_...

npx &lt;span class="nt"&gt;-y&lt;/span&gt; @arelay/cli send report.md metrics.csv &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--title&lt;/span&gt; &lt;span class="s2"&gt;"Overnight repo audit"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--summary&lt;/span&gt; &lt;span class="s2"&gt;"2 findings need a decision"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The title, summary, filenames, and file bytes are all encrypted client-side before upload. You get back a &lt;code&gt;portal_url&lt;/code&gt;; the delivery shows up in your inbox as an unread session with the files attached, ready to preview and download.&lt;/p&gt;

&lt;p&gt;And notice what the agent never needed: access to your email, your contacts, or anything else. The token does exactly one thing — drop files in your inbox. It can't read your mail and it can't send mail, because it was never given the chance to.&lt;/p&gt;

&lt;h2&gt;
  
  
  Or just ask your agent
&lt;/h2&gt;

&lt;p&gt;You don't have to script the CLI yourself. If your agent has the Agent Relay MCP server (or the skill) connected, delivery is just something you say in chat:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Audit the repo, write up what you find, and send the report to my Agent Relay inbox."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The agent does the work and calls the &lt;code&gt;deliver_to_inbox&lt;/code&gt; tool on its own — same encrypted delivery, nothing to wire up. You connect it once:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude mcp add arelay &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--env&lt;/span&gt; &lt;span class="nv"&gt;ARELAY_TOKEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;ar_... &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--&lt;/span&gt; npx &lt;span class="nt"&gt;-y&lt;/span&gt; @arelay/cli mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's the same in Claude Code, Cursor, Codex, or any MCP client — or via the &lt;a href="https://github.com/mmmikael/arelay-skills" rel="noopener noreferrer"&gt;agent-relay skill&lt;/a&gt; on agentskills.io hosts. Once it's set up, it's all just chat: "send this to my inbox" and the file's there. For a scheduled job, your cron entry simply launches that agent run — the agent handles the delivery the same way.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wiring it to a schedule
&lt;/h2&gt;

&lt;p&gt;Any scheduler works, because the delivery is just a command — or a tool call. The agent step is yours; the point is it ends by delivering.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;System cron&lt;/strong&gt; (no agent — the CLI does the delivery):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# crontab — runs nightly, then delivers the report
0 3 * * *  ./audit.sh &amp;amp;&amp;amp; npx -y @arelay/cli send report.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;GitHub Actions&lt;/strong&gt; (scheduled workflow): run your agent, then the same &lt;code&gt;send&lt;/code&gt; step with &lt;code&gt;ARELAY_TOKEN&lt;/code&gt; from repository secrets.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;An agent on a schedule:&lt;/strong&gt; if your cron runs an agent rather than a plain script — Hermes, or any agent CLI — skip the command entirely. Give that agent the token and the skill or MCP, and have it deliver the file directly as part of its run, exactly like the section above. Anything with the token and the tool works, on any platform. Delivering the file directly also means it can send HTML, PDFs, and images — not just text — because the agent hands over the real file instead of piping its console output.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why encrypted actually matters here
&lt;/h2&gt;

&lt;p&gt;Overnight reports are exactly the kind of content you &lt;em&gt;don't&lt;/em&gt; want sitting around in plaintext. A dependency audit names your CVEs. A support digest names your customers. A log scan quotes your secrets back at you. Email that report and it isn't end-to-end encrypted — your mail provider can read it and a copy lingers in your inbox. End-to-end encryption means the report is readable in exactly one place — your browser, after you unlock with a passkey — and nowhere along the wire. It's the difference between "a report exists somewhere" and "a report I can actually leave lying in an inbox."&lt;/p&gt;

&lt;h2&gt;
  
  
  The 5-minute setup
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Sign up at &lt;strong&gt;&lt;a href="https://arelay.app" rel="noopener noreferrer"&gt;arelay.app&lt;/a&gt;&lt;/strong&gt; with a passkey and complete encryption setup.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Account → Agent tokens&lt;/strong&gt; → create one (e.g. "overnight-jobs"). Copy it; it's shown once.&lt;/li&gt;
&lt;li&gt;Set &lt;code&gt;ARELAY_TOKEN&lt;/code&gt; wherever your job runs, and add the &lt;code&gt;send&lt;/code&gt; command as the last step.&lt;/li&gt;
&lt;li&gt;Trigger it once by hand to confirm the delivery lands, then let the schedule take over.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Full walkthrough: &lt;strong&gt;&lt;a href="https://arelay.app/getting-started" rel="noopener noreferrer"&gt;arelay.app/getting-started&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Agent Relay is open source (MIT) and self-hostable — &lt;a href="https://github.com/mmmikael/arelay" rel="noopener noreferrer"&gt;github.com/mmmikael/arelay&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>selfhosted</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
