Comment by bluesnowmonkey

19 days ago

> The Digital Twin Universe is our answer: behavioral clones of the third-party services our software depends on. We built twins of Okta, Jira, Slack, Google Docs, Google Drive, and Google Sheets, replicating their APIs, edge cases, and observable behaviors.

Came to the same conclusion. I have an integration heavy codebase and it could hardly test anything if tests weren't allowed to call external services. So there are fake implementations of every API it touches: Anthropic, Gemini, Sprites, Brave, Slack, AgentMail, Notion, on and on and on. 22 fakes and climbing. Why not? They're essentially free to generate, it's just tokens.

I didn't go as far as recreating the UI of these services, though, as the article seems to be implying based on those screenshots. Just the APIs.

how are you implementing agentmail? would love to know more

  • I'm building a platform of AI agents, and each agent can have its own email address. AgentMail handles that. You create an inbox via their REST API and they POST to your webhook when mail arrives.

    On the agent side, it just gets tools: send email, reply to email, list inbox, read message. Those tools call the AgentMail API. So the fake implements the same interface.. same send/reply/list/read methods, but recording calls instead of making HTTP requests. You can pre-populate inboxes with test messages, simulate "username taken" errors, etc.

    AgentMail is actually one of the simpler fakes because there's no internal state to maintain. Sending a message doesn't affect what you'd read back from your own inbox. Some of the other fakes (like the database or file storage) need to actually simulate state in memory so writes are visible to subsequent reads. This one is closer to a stub.