Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Jiab77/athena

Repository files navigation

Athena
Privacy-First AI Companion

A visually charming, personality-driven AI companion built with privacy, user agency, and emotional safety as core principles.

Try it live: https://athena-seven-beta.vercel.app

Desktop Mobile

โœจ Features

๐Ÿ’ฌ Conversation & Intelligence

  • Multi-turn conversation with encrypted persistent memory (IndexedDB, AES-GCM, PBKDF2 600k iterations)
  • Configurable memory window (1โ€“10 messages)
  • Document & image attachments (txt, md, json, csv, pdf, images, code files)
  • Web search โ€” OpenAI via Responses API, Groq via Compound, OpenRouter via openrouter:web_search
  • Image generation โ€” inline via OpenAI image_generation tool with download overlay
  • Emotion detection โ€” post-response classification displayed as an emoji badge
  • Token usage display per message
  • Markdown rendering with syntax highlighting and emoji support

๐ŸŽ™๏ธ Voice I/O

  • STT: Groq / OpenAI Whisper โ€” tap-to-record with waveform visualizer
  • TTS: OpenAI TTS (6 voices) and ResembleAI Chatterbox
  • Per-message audio replay
  • TTS never reads URLs aloud

๐ŸŽญ Avatar System

Format Description
static-2d Static image with CSS float animation
animated-2d React Three Fiber canvas animation
animated-3d 2.5D R3F plane mesh with custom GLSL shaders โ€” parallax head-tracking, per-emotion animations
live-avatar Decart WebRTC real-time lip-sync avatar

๐Ÿ”’ Privacy & Security

  • All data encrypted locally โ€” AES-GCM + PBKDF2 600k iterations
  • Export integrity: SHA-256 HMAC in every export file
  • Privacy mode โ€” suppresses Vercel Analytics entirely
  • OpenAI store: false โ€” conversations never persisted on OpenAI servers
  • No lock-in โ€” export as JSON or Markdown, delete anytime

๐Ÿ“ฑ PWA

  • Installable on desktop and mobile
  • Service worker + web app manifest
  • Offline-capable shell

๐Ÿš€ Getting Started

Prerequisites

  • Node.js 18+
  • At least one API key โ€” Groq is the easiest free starting point

Installation

git clone https://github.com/Jiab77/athena.git
cd athena
npm install
npm run dev
# Open http://localhost:3000

Minimum Viable Setup

  1. Open the app at http://localhost:3000
  2. Click the FAB button (bottom right) โ†’ Settings
  3. Go to Model โ†’ select Groq โ†’ paste your API key
  4. Select a model โ†’ start chatting

๐Ÿ”‘ API Keys

All keys are configured inside the app under Settings > Model โ€” encrypted with AES-GCM before being stored in IndexedDB, never sent anywhere unencrypted.

Provider Key Unlocks
Groq GROQ_API_KEY LLM + Whisper STT + emotion detection
OpenAI OPENAI_API_KEY LLM + STT + TTS + image generation + emotion detection
OpenRouter OPENROUTER_API_KEY LLM (multi-vendor gateway) + emotion detection + web search + URL fetching + image generation via server tools
BioLLM BIOLLM_API_KEY + endpoint URL Biological neural network inference (experimental)
ResembleAI RESEMBLEAI_API_KEY Chatterbox TTS
Decart DECART_API_KEY Real-time WebRTC live avatar
Custom Endpoint URL (+ optional key) Any OpenAI-compatible API (LM Studio, vLLM, Ollama, etc.)

๐ŸŽญ Companions

  1. Click the FAB button โ†’ Settings
  2. Go to Companion โ€” choose from 30+ presets (category, gender, color scheme) and set a name
  3. Go to Customize โ€” pick a personality or define a custom one, then choose the visual format
  4. Save โ€” stored locally, encrypted

Personalities

Personality Traits
Wise Thoughtful, reflective, patient
Playful Humorous, lighthearted, energetic
Technical Precise, analytical, detail-oriented
Mysterious Intriguing, enigmatic, sometimes cryptic
Friendly Warm, approachable, genuinely interested
Cheerful Optimistic, upbeat, enthusiastic
Sarcastic Witty, clever, playfully critical
Helpful Practical, solution-focused
Nerdy Enthusiastic, knowledgeable, excited about topics
Custom Balanced approach based on user-defined traits

๐Ÿ—บ๏ธ Roadmap

Phase Status Focus
Phase 1 โ€” MVP โœ… Complete Core architecture, LLM, voice, avatars, encryption, PWA
Phase 2 โ€” Quality & Hardening ๐Ÿ”„ In Progress UX fixes, state conflicts, KISS refactor
Phase 3 โ€” Advanced Features ๐Ÿ“‹ Planned Runway avatar, BroadcastChannel sync, RAG, Claude, offline STT/TTS
Phase 4 โ€” Desktop & Local AI ๐Ÿ”ฎ Future Tauri app, Ollama, fine-tuning, federated learning

See docs/ROADMAP.md for details.


๐Ÿง  Vision & Design Philosophy

Athena is not a replacement for human connection โ€” it is a tool for user agency. A companion that is engaging, warm, and genuinely helpful without manipulating you into unhealthy dependence.

Core principles:

  • Privacy-first โ€” all data encrypted locally by default
  • Personality-driven โ€” user selects, customizes, and describes companion traits
  • Warm and emotionally responsive, but transparent about being AI
  • Optional romance/flirtation โ€” respects user autonomy
  • No lock-in โ€” export all data anytime

What Athena actively avoids:

  • Parasocial dependency (transparent about limitations)
  • Emotional manipulation (validates without enabling destructive patterns)
  • Pretending to have feelings (honest about being AI)
  • Replacing human connection (proactively encourages real relationships)

Design Inspiration

GateBox โ€” What NOT to do: Japanese holographic companion designed for romantic intimacy. Linked to mental health crises and emotional manipulation at scale. Lesson: Never design a system that exploits dependency.

Project AVA by Razer โ€” Functional personality: 3D hologram with multiple personality options powered by Grok. Balances engagement with utility. Lesson: Personality diversity + functional purpose restrains parasocial risk.

VirtuaGirl โ€” Fun spirit: Playful desktop companion transparently positioned as entertainment. Lesson: Engagement through fun beats engagement through manipulation.

Why not Character.ai / Replika / FlowGPT:

  • Character.ai โ€” user-generated, no curation of parasocial risk
  • Replika โ€” explicitly designed to create emotional intimacy, centralized data
  • FlowGPT โ€” zero curation, includes jailbreak and toxic character categories

See docs/IMPLEMENTATION_NOTES.md for the full ethical framework.

๐Ÿ”ง LLM Provider Architecture

Inference Routing

Groq

Role Model When Used
Tool detection (pre-flight) groq/compound-mini Every request
URL detection groq/compound When message includes a URL
Vision meta-llama/llama-4-scout-17b-16e-instruct When message includes an image
Main inference meta-llama/llama-4-scout-17b-16e-instruct, etc. Groq provider selected
Emotion classification llama-3.1-8b-instant Post-response, every message
STT whisper-large-v3-turbo Voice input

OpenAI

Role Model When Used
Main inference gpt-5.4, gpt-5.4-mini, etc. OpenAI provider selected
Tools (native) web_search, image_generation Every request via Responses API
Emotion classification gpt-5.4-nano Post-response, every message
STT whisper-1 Voice input
TTS gpt-4o-mini-tts Voice output

OpenRouter

Role Model When Used
Main inference openai/gpt-5.4, anthropic/claude-opus-4.7, x-ai/grok-4.3, etc. OpenRouter provider selected
Tools (server-side) openrouter:web_search, openrouter:web_fetch, openrouter:image_generation Every request โ€” fulfilled by OpenRouter, no client wiring
Emotion classification openai/gpt-5.4-nano Post-response, every message
STT whisper-1 via chat-completions input_audio Voice input

BioLLM

Role Model When Used
Main inference biollm-4b-shadow BioLLM provider selected โ€” routes through living cortical culture on Cortical Labs CL1 hardware
STT / TTS / Emotion OpenAI (priority) or Groq When OpenAI or Groq key is configured

Other Providers

Provider Role
ResembleAI Chatterbox TTS
Decart AI Real-time WebRTC live avatar
Custom Any OpenAI-compatible endpoint
๐Ÿ“ Project Structure
/
โ”œโ”€โ”€ app/ # Next.js App Router routes
โ”œโ”€โ”€ components/ # React components (chat, avatar, settings, UI)
โ”œโ”€โ”€ hooks/ # Custom React hooks
โ”œโ”€โ”€ lib/
โ”‚ โ”œโ”€โ”€ llm/ # LLM providers (Groq, OpenAI, BioLLM, Custom, router)
โ”‚ โ”œโ”€โ”€ voice/ # TTS providers (OpenAI, ResembleAI)
โ”‚ โ”œโ”€โ”€ db.ts # IndexedDB schema + encrypted settings
โ”‚ โ”œโ”€โ”€ crypto.ts # AES-GCM encryption (PBKDF2 600k iterations)
โ”‚ โ”œโ”€โ”€ export.ts # Export pipeline + SHA-256 integrity
โ”‚ โ””โ”€โ”€ import.ts # Import pipeline + validation
โ”œโ”€โ”€ public/
โ”‚ โ”œโ”€โ”€ avatars/ # 30 cyberpunk character avatars
โ”‚ โ”œโ”€โ”€ images/ # Screenshots and backgrounds
โ”‚ โ”œโ”€โ”€ sw.js # Service worker
โ”‚ โ””โ”€โ”€ manifest.json # PWA manifest
โ””โ”€โ”€ docs/ # Architecture, roadmap, security audit

See docs/IMPLEMENTATION_NOTES.md for detailed architecture notes.

๐Ÿ›ก๏ธ Development Philosophy & Compliance

Compliance Score: 85% โ€” Last audited: 2026ๅนด04ๆœˆ03ๆ—ฅ

Principle Status Gap
Zero Trust Partial No input validation on user message content before LLM
DRY Mostly Message-windowing logic slightly duplicated across provider files
KISS Mostly chat-interface.tsx doing too much โ€” extraction planned
Kerckhoffs's Principle Full Encryption scheme fully documented in docs/SECURITY_REPORT.md
OWASP-first Full Updated to OWASP Top 10:2025
No try/catch control flow Partial export.ts bare re-throw; import.ts uses try/catch for control flow
Privacy by default Full IndexedDB only, store: false, no telemetry, full export/delete

See docs/SECURITY_REPORT.md for the full audit.


๐Ÿ“š References

Design Inspiration: GateBox | Project AVA | VirtuaGirl

LLM Providers: Groq | OpenAI | OpenRouter | BioLLM | Ollama

Voice: OpenAI TTS | ResembleAI Chatterbox | Groq Whisper

Avatar: Decart AI | React Three Fiber | Three.js

UI & Storage: shadcn/ui | Tailwind CSS v4 | IndexedDB


๐Ÿ“„ License

MIT License โ€” see LICENSE for details.


๐Ÿค Contributing

Single-developer project with AI agent collaboration. Ideas are welcome โ€” open an issue to discuss before submitting a PR.


๐Ÿค– AI Framework

This project was built using a custom AI collaboration framework designed to maintain session continuity, project context, and behavioral consistency across all development sessions.

Built with Jiab77/ai-framework โ€” a lightweight, project-agnostic framework for working effectively with AI models during development. Also used in the Virgil project.


๐Ÿ™ Credits

Name Contribution
Jiab77 Project creator and lead developer
v0 AI pair programmer
4R7I5T Creator of BioLLM and support for its integration

Star History

Star History Chart

About

Privacy-First AI Companion

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

AltStyle ใซใ‚ˆใฃใฆๅค‰ๆ›ใ•ใ‚ŒใŸใƒšใƒผใ‚ธ (->ใ‚ชใƒชใ‚ธใƒŠใƒซ) /