Headless Claude Code interaction via email
Project description
Airut
Headless Claude Code interaction via email. Named "Airut" (Finnish: herald/messenger). Created by Pyry Haulos.
What It Does
Send an email with instructions, receive Claude Code's response. Airut runs Claude Code in isolated containers, maintains conversation state, and handles the full email-to-PR workflow.
You → Email → Airut → Claude Code (container) → PR → Email reply → You
Key features:
- Defense-in-depth sandboxing: Container isolation, surrogate credentials, and network allowlist significantly limit blast radius in case of agent misbehavior. Agents run in permissive mode to complete tasks end-to-end, while security controls bound what they can access and where data can go.
- Email-native authentication: DMARC verification with sender allowlist — no API keys to manage
- Model selection via subaddressing: Control costs by choosing the model per
email (e.g.,
airut+haiku@example.comfor fast/cheap,airut+opus@example.comfor complex tasks) - Conversation threading: Reply to continue conversations;
[ID:xyz123]tracks state across sessions - File attachments: Send files to
/inbox; receive files from/outbox - Web dashboard: Monitor running tasks and view network activity logs
Guided Setup
The easiest way to get started is to paste the prompt below into Claude. It will read the docs and walk you through installation interactively.
Copy this prompt into your AI assistant
I want to set up Airut — a headless Claude Code interaction system that
works via email.
Help me install and deploy it step by step, interactively.
Before we start, read these docs to understand the system (fetch all of
them):
- README: https://raw.githubusercontent.com/airutorg/airut/main/README.md
- Deployment guide:
https://raw.githubusercontent.com/airutorg/airut/main/doc/deployment.md
- Repo onboarding:
https://raw.githubusercontent.com/airutorg/airut/main/doc/repo-onboarding.md
- Architecture:
https://raw.githubusercontent.com/airutorg/airut/main/doc/architecture.md
- Agentic operation:
https://raw.githubusercontent.com/airutorg/airut/main/doc/agentic-operation.md
- Security model:
https://raw.githubusercontent.com/airutorg/airut/main/doc/security.md
- Execution sandbox:
https://raw.githubusercontent.com/airutorg/airut/main/doc/execution-sandbox.md
- Network sandbox:
https://raw.githubusercontent.com/airutorg/airut/main/doc/network-sandbox.md
- Example config:
https://raw.githubusercontent.com/airutorg/airut/main/config/airut.example.yaml
After reading, guide me through setup one step at a time. Ask me questions to
determine my environment (OS, email provider, GitHub vs Gerrit, etc.) before
giving specific instructions. Cover both server deployment and onboarding my
first repository.
Why Email?
A Super-Optimized Communication Medium
Email clients have been refined over decades for managing multiple asynchronous communications. For many of us, the inbox is already where our task list lives. Agent interactions integrate naturally into this workflow — you get the benefits of decades of compounded investment in email tooling: threading, search, filters, mobile clients, and notification systems.
Using email also dramatically lowers the barrier to engage with an agent. Send a message from any device, get results when ready. No terminal session to keep open, no custom client to install.
Parallel Agent Management
Running multiple Claude Code agents requires isolation — each needs its own workspace, session state, and credentials. Airut provides this automatically: each email conversation is fully isolated, and a configurable thread pool manages concurrent execution.
Code Review as Feedback
The recommended workflow has agents push PRs for review. You review the PR, leave comments, then reply to the email. The agent reads review feedback and iterates. This provides:
- Human oversight before code lands
- Natural checkpoint for feedback
- Audit trail via git history
You: "Add user authentication"
↓
Agent: works → pushes PR → replies with PR link
↓
You: review PR, leave comments
↓
You: reply to email "Address the review comments"
↓
Agent: reads comments → fixes → updates PR → replies
↓
You: approve and merge
Proof of concept: This project itself is developed exclusively via the email workflow — from the first working version onward, all development has been done by sending instructions to Airut and reviewing the resulting PRs.
Example project: The
airut.org website is a minimal
Airut-managed repository that demonstrates the email-to-deploy workflow with
Cloudflare Pages. Its .airut/ directory and CLAUDE.md serve as a good
starting point for onboarding your own projects.
Documentation
High-Level Documentation
- doc/architecture.md — System architecture and data flow
- doc/security.md — Security model (email auth, isolation, credentials)
- doc/execution-sandbox.md — Container isolation and resource limits
- doc/network-sandbox.md — Network allowlist and proxy architecture
- doc/deployment.md — Installation and configuration guide
- doc/repo-onboarding.md — How to onboard a new repository
- doc/agentic-operation.md — Email-to-PR workflow patterns
Implementation Specifications
- spec/ — Detailed specs for email protocol, config schema, dashboard, and tooling
Agent Instructions
- CLAUDE.md — Operating instructions for Claude Code agents
Quick Start
-
Deploy Airut on a Linux VM (see deployment.md)
-
Create a dedicated email account for each repository — Airut treats the inbox as a work queue and permanently deletes messages after processing (see Dedicated Inbox Requirement)
-
Onboard a repository by creating
.airut/configuration (see repo-onboarding.md) -
Send an email to your configured address:
To: airut@example.com Subject: Fix the typo in README Please fix the typo in the README file. -
Receive the response with results and PR link
Project Structure
airut/
├── CLAUDE.md # Agent operating instructions
├── doc/ # High-level documentation
├── spec/ # Implementation specifications
├── .airut/ # Repo-specific Airut configuration
├── config/ # Server configuration templates
├── lib/ # Library code
│ ├── _bundled/ # Static resources bundled into wheel
│ │ ├── assets/ # Logo SVG
│ │ └── proxy/ # Network sandbox (proxy filter, DNS, AWS signing)
│ ├── sandbox/ # Sandboxed execution (container, proxy, session, image)
│ ├── conversation/ # Conversation directory layout and preparation
│ ├── dashboard/ # Web dashboard server
│ ├── gateway/ # Email gateway service
│ └── gh/ # GitHub API wrappers
├── scripts/ # CLI tools
│ ├── gateway/ # Email gateway CLI
│ ├── ci.py # Local CI runner
│ └── pr.py # PR workflow tool
└── tests/ # Unit and integration tests
Development
This project is developed with Claude Code. See CLAUDE.md for conventions and workflow tools.
# Run local CI (auto-fix + all checks)
uv run scripts/ci.py --fix
# Monitor PR status
uv run scripts/pr.py ci --wait -v
uv run scripts/pr.py review -v
License
This project is licensed under the MIT License. See LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file airut-0.8.0.tar.gz.
File metadata
- Download URL: airut-0.8.0.tar.gz
- Upload date:
- Size: 755.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da241afa885b7104a4ac9d5c57938bf182b5912be165b9d6e44cb0b10f98dc24
|
|
| MD5 |
3302ac2140739a6ed8cd67d8e0076075
|
|
| BLAKE2b-256 |
482713fdddd3845fee143f5450d008a735f10288bf24bec6bc2b38dab6310fed
|
Provenance
The following attestation bundles were made for airut-0.8.0.tar.gz:
Publisher:
publish.yml on airutorg/airut
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
airut-0.8.0.tar.gz -
Subject digest:
da241afa885b7104a4ac9d5c57938bf182b5912be165b9d6e44cb0b10f98dc24 - Sigstore transparency entry: 953474135
- Sigstore integration time:
-
Permalink:
airutorg/airut@a66155980694784399aef5fbb902244bd1c9a570 -
Branch / Tag:
refs/tags/v0.8.0 - Owner: https://github.com/airutorg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a66155980694784399aef5fbb902244bd1c9a570 -
Trigger Event:
release
-
Statement type:
File details
Details for the file airut-0.8.0-py3-none-any.whl.
File metadata
- Download URL: airut-0.8.0-py3-none-any.whl
- Upload date:
- Size: 204.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6d6d5f4d9024d75f68849ca7b97ad62b048f6e340b10d70a7ebad9b842c248c
|
|
| MD5 |
667051e71cf93ada6993df177ade83ce
|
|
| BLAKE2b-256 |
0e68558c3bfa41ff6a6ae392ec4791ff63e2b8b7f8388972d46ece34ddf4079a
|
Provenance
The following attestation bundles were made for airut-0.8.0-py3-none-any.whl:
Publisher:
publish.yml on airutorg/airut
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
airut-0.8.0-py3-none-any.whl -
Subject digest:
f6d6d5f4d9024d75f68849ca7b97ad62b048f6e340b10d70a7ebad9b842c248c - Sigstore transparency entry: 953474136
- Sigstore integration time:
-
Permalink:
airutorg/airut@a66155980694784399aef5fbb902244bd1c9a570 -
Branch / Tag:
refs/tags/v0.8.0 - Owner: https://github.com/airutorg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a66155980694784399aef5fbb902244bd1c9a570 -
Trigger Event:
release
-
Statement type: