Documentation menu
Start here
IntroductionGetting startedWrite an agentProject anatomyUnderstand Ayjnt
Harness engineeringTwo runtimesHuman interfacesHow agents workHost bridgeAgent capabilities
Callable methodsState & SQLiteSessions & memorySchedulingWorkflowsDurable executionInter-agent RPCSub-agentsToolsWebAssembly modulesInterfaces & integrations
Browser clientRouting & middlewareVoiceBrowser toolsMCPEmailObservabilityCLI
Command overviewnewdevrunbuildcompilemigratedeployAPI reference
AgentAgentClientWorkflow classesLocal & cloudMigrationsExamplesRoute inbound mail to a durable agent and send replies from the same identity.
Handle mail as an event
Override onEmail() for inbound messages and use native replyToEmail() or sendEmail() for outbound mail. Secure reply routing signs agent identity headers so replies return to the correct durable instance.
Email contents can contain prompt injection. Parse it as untrusted input, limit tools available during mail handling, and require approval before external side effects.