๐ Language: English | ็ฎไฝไธญๆ
"An AI companion that remembers, grows, and maintains emotional continuity"
๐ Quick Start โข โจ Features โข ๐ธ Screenshots โข ๐ Documentation
ATRI is an Android app + cloud backend AI companion project. Unlike ordinary chatbots, she has:
|
Chat with her anytime, anywhere |
She records what happened today |
Diaries become "memories" |
| ๐ค Traditional Chatbots | ๐ ATRI's Approach |
|---|---|
| Every conversation starts fresh | Remembers everything important via diary + vector memory |
| Emotions change instantly | PAD 3D emotion model + natural decay, emotions have inertia |
| One-size-fits-all responses | Intimacy system affects speaking style, relationships grow |
| May fabricate memories | Tool registration mechanism, actively verifies when needed |
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ฑ Android App (Kotlin) โ
โ Jetpack Compose โข Room โข DataStore โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ HTTPS + Token Auth
โผ
โโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โผ โผ
โโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ๏ธ Cloudflare Workers โ OR โ ๐ฅ๏ธ VPS / Zeabur Server โ
โ D1 + R2 + Vectorize โ โ PostgreSQL + pgvector + Node โ
โโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ค AI Model Service (Swappable) โ
โ OpenAI โข Claude โข Gemini โข DeepSeek โข Local Models โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
| Option | Best For | Features | |
|---|---|---|---|
| โ๏ธ | Cloudflare Workers | Beginners, low cost | Serverless, free tier, simple setup |
| ๐ฅ๏ธ | VPS / Zeabur | Advanced users | Web admin panel, PostgreSQL, more control |
-
Click the button above
-
Fill in only 2 variables:
DOMAIN- Public domain bound to the API service (must match the publicly exposed domain)PASSWORD- Your password (used for admin login and client auth)
๐ก
PASSWORDcan be a strong password (special characters like@ : / # ?are safe)โ ๏ธ Important:DOMAINmust match the actual public domain, otherwise the admin panel may fail with CORS /bad_origin -
Wait for deployment to complete
-
Visit your domain to access the admin panel
-
Configure upstream API (OpenAI/Claude/Gemini) in the admin panel
๐ Note: The Android client and web frontend use the same public API paths on both backends (Cloudflare Workers and VPS/Zeabur), so switching backends is just changing the base URL.
๐ช Windows One-Click Deploy
- Double-click
scripts/deploy_cf.bat - Follow the prompts to enter:
- Worker name (press Enter for default)
- D1 database name (press Enter for default)
- R2 bucket name (press Enter for default)
- Vectorize index name (press Enter for default)
- OPENAI_API_KEY (required)
- EMBEDDINGS_API_KEY (required for vector memory)
- The script will automatically create resources and deploy
- Copy the Worker URL when done
๐ macOS / ๐ง Linux Manual Deploy
# 1. Clone and install
git clone https://github.com/MIKUSCAT/ATRI.git
cd ATRI/worker && npm install
# 2. Login to Cloudflare
npx wrangler login
# 3. Create resources
npx wrangler d1 create atri_diary
npx wrangler r2 bucket create atri-media
npx wrangler vectorize create atri-memories --dimensions=1024 --metric=cosine
# 4. Update wrangler.toml with database_id from step 3
# 5. Initialize and deploy
npx wrangler d1 execute atri_diary --file=db/schema.sql
npx wrangler secret put OPENAI_API_KEY
cd .. && python3 scripts/sync_shared.py
cd worker && npx wrangler deploycd server
cp .env.example .env
# Edit .env with your configuration
docker-compose up -d๐ See server/README.md for detailed VPS deployment guide.
| Step | Action |
|---|---|
| 1๏ธโฃ | Download APK from Releases |
| 2๏ธโฃ | Install and open the app |
| 3๏ธโฃ | Set your nickname on the welcome screen |
| 4๏ธโฃ | Go to Settings (โ๏ธ) and configure: API URL, App Token, Model |
|
๐ญ In-Character Authentic personality defined in prompts.json |
๐ฌ Context Memory Today's conversations inform responses |
๐ Auto Diary Nightly reflections from her perspective |
๐ง Long-term Memory Vector-stored memories awakened when needed |
๐ผ๏ธ Rich Media Send images or docs she understands them |
| Feature | Description |
|---|---|
| ๐จ PAD Emotion Model | 3D emotion coordinates (Pleasure/Arousal/Dominance) + natural decay |
| ๐ Intimacy System | Relationship temperature affects reply style, fades without maintenance |
| ๐ง Tool Registration | Model actively verifies memories, doesn't fabricate |
| ๐ Split Architecture | Chat and diary can use different upstreams independently |
| ๐ Web Admin Panel | (VPS only) Configure everything via browser |
.
โโโ ๐ฑ ATRI/ # Android App
โ โโโ app/src/main/
โ โ โโโ java/me/atri/
โ โ โ โโโ data/ # Data layer (API, DB, Repository)
โ โ โ โโโ di/ # Dependency Injection
โ โ โ โโโ ui/ # UI layer (Compose)
โ โ โ โโโ utils/ # Utilities
โ โ โโโ res/ # Resources
โ โโโ build.gradle.kts
โ
โโโ โ๏ธ worker/ # Cloudflare Worker Backend
โ โโโ src/
โ โ โโโ routes/ # API routes
โ โ โโโ services/ # Core services
โ โ โโโ utils/ # Utility functions
โ โโโ db/schema.sql # Database schema
โ โโโ wrangler.toml # Worker config
โ
โโโ ๐ฅ๏ธ server/ # VPS Backend (Node.js + PostgreSQL)
โ โโโ src/
โ โ โโโ routes/ # API routes
โ โ โโโ services/ # Core services
โ โ โโโ admin-ui/ # Web admin panel
โ โโโ db/init.sql # Database schema
โ โโโ docker-compose.yml
โ โโโ Dockerfile
โ โโโ zeabur.yaml # Zeabur deployment config
โ
โโโ ๐ shared/ # Shared Config
โ โโโ prompts.json # Personality and prompts
โ
โโโ ๐ scripts/ # Deployment Scripts
โโโ deploy_cf.bat # Windows CF deploy
โโโ sync_shared.py # Sync prompts
| ๐ Document | ๐ Content |
|---|---|
| ๐๏ธ Tech Architecture Blueprint | Design philosophy, data flow, API contracts |
| ๐ VPS Deployment Guide | Docker, Zeabur, 1Panel, Baota deployment |
| ๐ญ Personality Definition | ATRI's personality and prompts |
This project is licensed under the PolyForm Noncommercial License 1.0.0.
- โ Personal learning, research, non-commercial use allowed
โ ๏ธ Commercial use requires separate authorization




