Skip to content

cc17/aura

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Aura

An AI work assistant that gets smarter the more you use it.

Unlike generic AI chatbots, Aura remembers your context across sessions, understands your industry and role, proactively suggests the right tool for what you're doing, and improves its recommendations over time based on your behavior.

License: MIT Python 3.11+ PRs Welcome


Why Aura

Most AI tools treat every session as a blank slate. Aura is built around the opposite idea.

Generic AI chat Aura
Starts from scratch every session Remembers your colleagues, projects, and preferences across sessions
One-size-fits-all responses Adapts to your industry and role (law, medicine, tech, student, ...)
You have to know what to ask Detects your intent mid-conversation and surfaces the right Skill
Recommendations never change Learns from your behavior β€” what you click, complete, and copy

Core Features

🧠 Long-term Memory

Extracts facts, preferences, and goals from every conversation and stores them in a vector database (pgvector). Recalls the most relevant memories before each response β€” so Aura remembers your manager's name, your project deadline, and that you prefer bullet-point answers.

🎯 Industry Skills (24+ built-in)

Structured task workflows optimized for specific professions:

  • Legal: contract review, case summary, legal research memo
  • Medical: clinical note, patient education sheet, differential checklist
  • Product / Dev: meeting notes, weekly report, bug triage, OKR review
  • Students: essay outline, exam prep, literature summary

Each Skill has a curated prompt template, typed input fields, and example outputs β€” no prompt engineering required.

πŸ“Š Recommendation Pipeline (Home Screen)

A 5-stage RecSys pipeline surfaces the right Skills before you even type:

Context (profile: industry / role / pain-points)
  β†’ Recall       skill_role_mapping priority + universal skills
  β†’ Coarse Rank  max 2 per category (diversity control)
  β†’ Fine Rank    profile_matchΓ—0.40 + CTRΓ—0.25 + affinityΓ—0.25 + recencyΓ—0.10
  β†’ Re-rank      pinned skills injection + cool-down filter

Impression and click events are tracked in skill_signals, so the rankings improve as usage data accumulates.

πŸ” In-conversation Intent Detection (System 2)

While you type, Aura runs a parallel pipeline to detect whether you need a Skill:

Message
  β†’ Hard rules    explicit keyword match β†’ instant trigger
  β†’ Embedding recall   cosine similarity against all skill embeddings (top-5)
  β†’ Fine rank     semantic_simΓ—0.40 + profileΓ—0.20 + qualityΓ—0.25 + affinityΓ—0.15
  β†’ Confidence threshold (< 0.55 β†’ no trigger, no interruption)

Skill embeddings are pre-computed at startup and cached in memory, so latency impact per message is a single embedding call.

πŸ”„ Evolving User Profile

A lightweight background agent infers and updates your profile (industry, role, pain points) from each conversation with confidence accumulation. The profile feeds every ranking and personalization layer.

πŸ’‘ Contextual Suggestions

After each response, a background agent generates 3 follow-up suggestions β€” at least one follow-up question and one Skill action β€” tailored to the current conversation.


Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  FastAPI Backend                                     β”‚
β”‚                                                     β”‚
β”‚  POST /chat                                          β”‚
β”‚    β”œβ”€ Intent detection  (embedding recall, System 2) β”‚
β”‚    β”œβ”€ Context builder   (profile + memory recall)    β”‚
β”‚    β”œβ”€ LLM call          (DeepSeek / Claude via       β”‚
β”‚    β”‚                     LiteLLM, streaming SSE)     β”‚
β”‚    └─ Background tasks:                              β”‚
β”‚         memory extraction β†’ pgvector                 β”‚
β”‚         profile update                               β”‚
β”‚         suggestion generation                        β”‚
β”‚                                                     β”‚
β”‚  GET /api/recommendations   (System 1 pipeline)     β”‚
β”‚  POST /api/recommendations/events  (signal tracking) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
          β”‚
          β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  PostgreSQL + pgvector                               β”‚
β”‚  users Β· conversations Β· messages                   β”‚
β”‚  user_memories (vector)                              β”‚
β”‚  industry_skills Β· skill_role_mapping               β”‚
β”‚  skill_signals Β· user_skill_affinity                β”‚
β”‚  user_skills Β· user_suggestions Β· skill_executions  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
          β”‚
          β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  React + TypeScript frontend                         β”‚
β”‚  SSE streaming Β· Skill cards Β· Skill panel          β”‚
β”‚  Profile page Β· Suggestion bar                       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

LLM support: any model accessible via LiteLLM (Doubao, DeepSeek, Claude, GPT-4, etc.)


Quick Start

Prerequisites: Python 3.11+, Node.js 18+, PostgreSQL 15+ with pgvector, uv

# 1. Clone
git clone https://github.com/cc17/aura.git && cd aura

# 2. Configure
cp .env.example .env
# Edit .env: set AURA_ARK_API_KEY, AURA_DATABASE_URL, AURA_SECRET_KEY

# 3. Install & migrate
uv venv --python 3.12 && uv pip install -e ".[dev]"
cd frontend && npm install && cd ..

# 4. Run
uv run uvicorn backend.main:app --reload   # http://localhost:8000
cd frontend && npm run dev                  # http://localhost:5173

See docs/SETUP.md for database setup with Docker.


Tech Stack

Layer Technology
Backend FastAPI, SQLAlchemy 2 async, Pydantic
LLM LiteLLM (Doubao / DeepSeek / Claude / any OpenAI-compatible)
Database PostgreSQL 16 + pgvector
Auth JWT (python-jose + bcrypt)
Frontend React 18, TypeScript, Vite
Embeddings Configurable via AURA_EMBEDDING_MODEL (optional)

Changelog

v0.5 β€” Recommendation Pipeline (2026-05-20)

  • System 1: 5-stage home screen recommendation (recall β†’ coarse rank β†’ fine rank β†’ re-rank)
  • System 2: In-conversation intent detection via embedding recall, replacing brittle keyword matching
  • Impression/click tracking with skill_signals; quality signals (completion, adoption, abandonment) feed fine ranking
  • SkillSignalModel + UserSkillAffinityModel ORM; GET /api/recommendations + POST /api/recommendations/events

v0.4 β€” Skill Marketplace & Industry Expansion (2026-05-17)

  • 24+ Skills across 7 industries (legal, medical, corporate law, tech, student, etc.)
  • Skill Marketplace UI: browse, add, pin, and manage your Skill library
  • Industry Γ— role onboarding with dynamic chip selectors
  • skill_role_mapping: many-to-many priority mapping (essential / recommended / optional)

v0.3 β€” Billing & Quota System (2026-05-16)

  • Free / Pro / Max tiers with daily/monthly quota enforcement
  • Quota banner, upgrade flow, pricing modal
  • Conversation history limited to 30 days on Free tier

v0.2 β€” Memory, Profile & Suggestions (2026-05-16)

  • Long-term memory extraction β†’ pgvector storage β†’ similarity recall
  • Async profile updater with confidence accumulation
  • Post-response suggestion bar (questions + Skill shortcuts)
  • Personal profile page: view and edit profile fields, delete memories

v0.1 β€” Foundation (2026-05-15)

  • JWT auth (register / login), user onboarding (3-question flow)
  • Industry Skills framework: industry_skills table, Skill executor (SSE streaming)
  • Profile injected into system prompt for contextual responses
  • PostgreSQL migration from SQLite, pgvector extension

Roadmap

  • Phase 11B β€” Daily cron to aggregate skill_metrics_daily (pre-computed CTR / completion / adoption rates)
  • Phase 11C/D β€” Affinity score update from conversation signals; recommendation cool-down logic
  • Phase 13 β€” Admin dashboard: skill performance metrics, user funnel, A/B experiment support
  • Phase 14 β€” Collaborative filtering recall (users-like-you)
  • Phase 15 β€” Payment integration (Alipay / WeChat Pay)

Contributing

Pull requests are welcome. For large changes, please open an issue first to discuss the direction.

uv run pytest tests/ -v   # run tests

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors