ARIA is a terminal-native, local-first relationship and inbox agent built in Python.
It connects to real Gmail and Google Calendar, syncs relationship context into a local store, drafts and sends email, tracks leads, reads local lead files, creates calendar events, and exposes the whole system through both a deterministic CLI and a Gemini-powered natural-language REPL.
The interactive model target is fixed to gemini-3.1-flash-lite-preview.
ARIA combines these operating loops into one tool:
- inbox triage
- relationship memory
- lead pipeline tracking
- drafting, rewriting, sending, and scheduling email
- calendar awareness and calendar event creation
- daily and weekly operator briefings
- local file ingestion for lead discovery and import
The product is local-first:
- Gmail is the live mail source of truth
- Google Calendar is the live scheduling source of truth
- Gemini is the reasoning layer for natural-language turns
- ARIA's working state lives on your machine
- real Gmail OAuth desktop auth
- browser auth with manual fallback
- real inbox sync
- incremental sync with Gmail history IDs
- full thread fetch
- real send through Gmail
- safe new-thread behavior for ad-hoc emails
- live sync while the REPL is running
- calendar connection through the same Google auth flow
- calendar overview for today, tomorrow, or the week
- open-slot calculation
- scheduling-aware draft suggestions
- calendar event creation from natural time ranges
Examples:
tomorrow morning 5-9am isttomorrow 9amin 2 hours
- thread classification:
ACTION REQUIRED,LEAD,FOLLOW-UP NEEDED,WAITING ON REPLY,NOISE - latest-email handling by recency, not just priority
- today-only inbox views
- same-day prioritization
- "why this matters" reasoning per thread
Current "why this matters" reasons include:
- investor
- partner
- active lead
- direct ask
- replied today
- deadline mention
- meeting coordination
- deal risk
ARIA maintains per-contact memory buckets such as:
- facts
- preferences
- promises
- topics
- next steps
That memory is extracted from synced conversation history and then reused in:
- contact views
- draft generation
- summaries
- briefings
- add leads
- move stages with confirmation
- score leads
- see pipeline summaries
- auto-stage on reply
- stage history for pipeline change reporting
Default stages:
PROSPECTCONTACTEDREPLIEDQUALIFIEDPROPOSALCLOSEDLOST
- follow-up drafts
- cold outreach drafts
- proposal drafts
- breakup drafts
- one-off custom drafts
- draft editing
- tone softening
- bulk drafts by tag
- send latest draft without specifying an ID
- schedule sends using natural time input
Draft generation is also hardened so the model does not add duplicate closings like Best regards if you already have a saved signature.
- daily brief
- weekly brief
- replied since last check
- heating up leads
- cooling relationships
- pipeline changes
- top actions for today
- at-risk relationship view
- wins view
- usage stats
- read a file or preview a folder
- search inside files or folders
- extract leads from
CSV,TSV,JSON,JSONL,TXT, andMD - import those leads into contacts and pipeline
aria doctoraria doctor --json- local logs
- schema-versioned state
- automatic migration backups
- atomic local writes
- corrupt JSON recovery
ARIA v1 is strong, but still intentionally narrow.
Not included yet:
- non-Gmail mail providers
- editing or deleting existing calendar events
- background daemon for always-on scheduled email delivery
- hosted multi-user SaaS deployment
- web UI
- encrypted local storage at rest
Windows PowerShell:
python -m venv .venv
.venv\Scripts\Activate.ps1
pip install .
Copy-Item .env.example .env
ariamacOS / Linux:
python3 -m venv .venv
source .venv/bin/activate
pip install .
cp .env.example .env
ariaIf you want the full non-technical walkthrough, use SETUP.md.
When you run aria without a completed setup, ARIA walks you through:
- Gemini API key
- Gmail / Google OAuth client setup
- browser sign-in
- manual OAuth fallback if browser callback does not complete
- name
- timezone
- signature
For users who want explicit auth commands:
aria auth status
aria auth gmail
aria auth gmail --link
aria auth gmail --manualAfter Google scopes change, run aria auth gmail again to re-consent.
- Python
3.11+ GEMINI_API_KEY- Google Cloud project with Gmail API enabled
- Google Calendar API enabled
- Google OAuth desktop client
By default ARIA stores state in:
- Windows:
C:\Users\<user>\.aria - macOS:
/Users/<user>/.aria - Linux:
/home/<user>/.aria
Override with:
ARIA_HOME
Typical files:
.envaria.config.jsondb.jsongmail-token.jsonaria.log- optional
gmail-client-secret.json
GEMINI_API_KEY
Use either:
GOOGLE_CLIENT_IDGOOGLE_CLIENT_SECRET
Or:
GMAIL_CLIENT_SECRETS_FILE
Optional:
GOOGLE_PROJECT_ID
ARIA_HOMEARIA_ENV_FILEGMAIL_OAUTH_HOSTGMAIL_OAUTH_PORTGMAIL_OAUTH_TIMEOUT_SECONDSGMAIL_INITIAL_SYNC_MAX_THREADSGMAIL_SYNC_MAX_THREADSGMAIL_LIVE_SYNC_INTERVAL_SECONDS
Run aria help for the current command summary.
aria inbox
aria inbox --leads
aria inbox --cold --days 4
aria inbox --today
aria inbox --today --latest
aria inbox --today --summarize-latest
aria inbox --thread <thread-id>
aria inbox --summarize <thread-id>aria contacts
aria contacts --search Sarah
aria contact sarah@acme.ai
aria contact sarah@acme.ai --history
aria contact sarah@acme.ai --add-note "Met at SaaS meetup"
aria contact sarah@acme.ai --tag lead
aria contact sarah@acme.ai --deletearia leads
aria leads --stage QUALIFIED
aria lead add someone@example.com
aria lead sarah@acme.ai --move PROPOSAL
aria lead sarah@acme.ai --score
aria pipeline --summaryaria draft sarah@acme.ai --type follow-up
aria draft sarah@acme.ai --type cold-outreach
aria draft sarah@acme.ai --type proposal
aria draft sarah@acme.ai --type breakup
aria draft --to aaryan@example.com --name "Aaryan" --subject "Launch sync" --body "ARIA launches today. Can we connect ASAP to finalize launch strategy?"
aria draft --edit <draft-id> --body "Updated body"
aria draft --bulk investor
aria draft --soften <draft-id>
aria send [<draft-id>]
aria schedule [<draft-id>] --at "tomorrow 9am"
aria outreach --sequence sarah@acme.aiaria calendar
aria calendar --tomorrow
aria calendar --week
aria calendar --availability --days 3
aria calendar --create --title "Coding session" --time-range "tomorrow morning 5-9am ist"aria brief
aria brief --weekly
aria brief --yesterday
aria insights
aria insights --at-risk
aria insights --wins
aria statsaria file "leads.csv"
aria file "notes.md" --search "launch"
aria file "export-folder" --extract-leads
aria import leads "leads.csv" --stage QUALIFIED --tag investor,warmaria doctor
aria doctor --json
aria helpThe best way to use ARIA is not as a single command launcher, but as a daily operator loop.
- start with the brief
aria brief- inspect today's most important threads
aria inbox --today --latest- open the most important thread and inspect why it matters
aria inbox --thread <thread-id>- inspect the contact memory before you draft
aria contact <email>- draft from context
aria draft <email> --type follow-up- send or schedule with human-time phrasing
aria send
aria schedule --at "tomorrow 9am"- check relationship health and pipeline drift
aria insights --at-risk
aria pipeline --summaryRun:
ariaThen use short natural instructions:
summarize my latest important email from todayshow me why it mattersdraft a replyrewrite it softersend itshow me heating up leadsfind open slots tomorrowschedule a coding session for tomorrow morning 5-9am ist
Inside the REPL, literal CLI commands also work:
aria auth gmailaria calendar --weekaria doctor
When you run aria with no subcommand:
- ARIA loads local state
- ARIA starts the Gemini REPL
- Gemini chooses local tools
- ARIA executes real handlers
- ARIA returns grounded results from your local DB, Gmail, Calendar, and files
The REPL is not freeform fake chat. It is a tool-calling layer over the real product.
Internal tool families include:
- inbox triage
- contact lookup and update
- lead pipeline
- draft creation and edit
- send and schedule
- outreach sequence generation
- briefings and insights
- auth control
- calendar access
- local files
While the REPL is open, ARIA starts a background sync loop.
That means:
- new Gmail mail can appear during the session
- due scheduled sends can be processed during the session
- the local DB updates without restarting ARIA
This is live polling, not Gmail webhook push.
ARIA confirms risky actions before mutating important state:
- send email
- schedule email
- delete contacts
- move leads
In non-interactive contexts, those confirmations now fail closed instead of crashing.
ARIA persists:
- contacts
- semantic memory
- notes
- tags
- threads
- drafts
- scheduled drafts
- lead stages
- stage history
- auth state
- counters
- config
ARIA does not vanish when you close it.
Recent hardening work includes:
- schema-versioned config and DB
- automatic migration backups
- atomic writes for config, DB, and env
- corrupt JSON recovery
- local runtime logs
aria doctordiagnostics- safer non-interactive confirmations
- timezone-correct schedule parsing and rendering
- direct REPL passthrough for literal
aria ...commands
Compile check:
python -m compileall src test evalSmoke tests:
python test\smoke.pyQuick evals:
python eval\run_evals.py --scale quickStandard benchmark:
python eval\run_evals.py --scale standardFullest currently implemented eval:
python eval\run_evals.py --scale full --with-live-modelEval artifacts are written to eval/runs/.
Most useful output:
summary.svg
Eval coverage includes:
- inbox recency
- lead import
- draft/send safety
- transcript continuity
- persistence
- adversarial resilience
- optional live-model turns
See eval/README.md for the benchmark details.
src/
aria.py
aria_core/
app.py
defaults.py
gmail.py
parser.py
runtime.py
storage.py
time_utils.py
test/
smoke.py
eval/
run_evals.py
scenarios.py
SETUP.md
README.md
how-it-works.md
pyproject.toml
-
src/aria.py Entry point, env discovery, and startup routing.
-
src/aria_core/app.py Main application logic, REPL, drafting, inbox, leads, briefings, calendar handlers, and auth control.
-
src/aria_core/gmail.py Gmail and Calendar OAuth, sync, send, event creation, and Google API surface.
-
src/aria_core/storage.py App-home resolution, bootstrap, migrations, atomic persistence, and corruption recovery.
-
src/aria_core/runtime.py Runtime logging and diagnostics helpers.
-
test/smoke.py Regression coverage for core product behavior.
-
eval/run_evals.py Deterministic benchmark runner and visual scorecard generation.
If something feels off, start with:
aria doctorCommon fixes:
- rerun
aria auth gmailafter Google scope changes - rerun
pip install .after code updates - check
aria.loginARIA_HOME - check
aria doctor --json
If you want the tightest product demo, use this structure:
-
aria inbox --today --latestShow that ARIA surfaces what matters and explains why. -
aria contact <priority-contact>Show semantic memory, not just raw thread history. -
aria briefShow the operator view: replied since last check, heating up, cooling, pipeline changes, and today's actions. -
aria draft <priority-contact> --type follow-upShow relationship-aware drafting. -
aria calendar --availability --days 3Show calendar context. -
aria calendar --create --title "Coding session" --time-range "tomorrow morning 5-9am ist"Show natural-time calendar creation. -
ariaAsk one strong natural-language instruction such as:summarize my latest important email from today and draft the reply
I’ve also included a fresh, tighter demo plan in the response to your current request below.