Skip to content

NAME0x0/AVA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

AVA - Autonomous Virtual Assistant

AVA Logo

๐Ÿง  Research-Grade AI Assistant with Verified Reasoning

Accuracy over Speed โ€ข Local-First โ€ข Privacy-Preserving

CI Status Rust 1.75+ Python 3.10+ License Release

Stars Forks Issues Downloads

Download Latest Release ย  Documentation


AVA v4.2 implements the Sentinel Architecture โ€” a state-of-the-art cognitive system
that prioritizes verified accuracy over probabilistic token generation.


โœจ Why AVA?

๐ŸŽฏ Accuracy-First Design

Unlike standard LLMs that "guess" tokens, AVA implements:

  • Active Inference for autonomous decision-making
  • Search-First Verification for factual queries
  • Test-Time Learning that improves during use

๐Ÿ”’ 100% Local & Private

Your data never leaves your machine:

  • Runs entirely on your hardware
  • No cloud dependencies
  • No telemetry or tracking

โšก Optimized for Consumer Hardware

Designed for 4GB VRAM GPUs:

  • Layer-wise paging for large models
  • Intelligent routing (fast vs deep)
  • Thermal-aware processing

๐Ÿงช Research-Grade Architecture

Built on cutting-edge research:

  • Titans (Test-Time Learning)
  • Entropix (Entropy-Based Routing)
  • Free Energy Principle (Active Inference)

๐Ÿ—๏ธ Sentinel Architecture

AVA's four-stage cognitive loop ensures accurate, verified responses:

                              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                              โ”‚   USER QUERY    โ”‚
                              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                       โ”‚
                    โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
                    โ•‘      STAGE 1: PERCEPTION            โ•‘
                    โ•‘  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ•‘
                    โ•‘  โ”‚ Embedding โ†’ KL Divergence   โ”‚    โ•‘
                    โ•‘  โ”‚ โ†’ Surprise Score            โ”‚    โ•‘
                    โ•‘  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ•‘
                    โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•คโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
                                       โ”‚
                    โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
                    โ•‘      STAGE 2: APPRAISAL             โ•‘
                    โ•‘  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ•‘
                    โ•‘  โ”‚ Active Inference Engine     โ”‚    โ•‘
                    โ•‘  โ”‚ G(ฯ€) = -Pragmatic           โ”‚    โ•‘
                    โ•‘  โ”‚      - Epistemic + Effort   โ”‚    โ•‘
                    โ•‘  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ•‘
                    โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•คโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
                                       โ”‚
              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
              โ”‚                        โ”‚                        โ”‚
              โ–ผ                        โ–ผ                        โ–ผ
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚    MEDULLA      โ”‚      โ”‚     SEARCH      โ”‚      โ”‚     CORTEX      โ”‚
    โ”‚   Fast Path     โ”‚      โ”‚     Tools       โ”‚      โ”‚    Deep Path    โ”‚
    โ”‚   โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€     โ”‚      โ”‚   โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€     โ”‚      โ”‚   โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€     โ”‚
    โ”‚   gemma3:4b     โ”‚      โ”‚   DDG/Google    โ”‚      โ”‚   qwen2.5:32b   โ”‚
    โ”‚   <200ms        โ”‚      โ”‚   Bing/Brave    โ”‚      โ”‚   3-30s         โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
              โ”‚                        โ”‚                        โ”‚
              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                       โ”‚
                    โ•”โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•งโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•—
                    โ•‘      STAGE 4: LEARNING              โ•‘
                    โ•‘  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ•‘
                    โ•‘  โ”‚ Titans Memory Update        โ”‚    โ•‘
                    โ•‘  โ”‚ M_t = M_{t-1} - ฮทโˆ‡ฮธL       โ”‚    โ•‘
                    โ•‘  โ”‚ (Surprise-Weighted)         โ”‚    โ•‘
                    โ•‘  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ•‘
                    โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•คโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
                                       โ”‚
                              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                              โ”‚ VERIFIED OUTPUT โ”‚
                              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿš€ Quick Start

Prerequisites

# 1. Install Ollama (required)
# Download from: https://ollama.ai

# 2. Pull models
ollama pull gemma3:4b              # Fast responses
ollama pull nomic-embed-text       # Surprise calculation
ollama serve                       # Start server

Installation

๐Ÿ“ฆ Option A: Download Release (Recommended)

Download the installer from Releases:

  • AVA_x64-setup.exe โ€” Windows Installer
  • AVA_x64_en-US.msi โ€” MSI Package

๐Ÿ”ง Option B: Build from Source

git clone https://github.com/NAME0x0/AVA.git
cd AVA/ui
npm install
npm run tauri build

Run AVA

# Desktop App (GUI)
./AVA.exe                    # or double-click

# Terminal UI (Power Users)
cd AVA && pip install -e .
python -m tui.app

# API Server Only
python server.py             # http://127.0.0.1:8085

๐ŸŽฎ Features


Policy Selection
Free Energy minimization for autonomous behavior

Test-Time Learning
Neural memory updates during inference

Verified Facts
Web search before generation

Embedding-Based
KL divergence, not heuristics

Interfaces

Interface Description Launch
๐Ÿ–ฅ๏ธ Desktop App Native GUI with neural visualization AVA.exe
โŒจ๏ธ Terminal UI Keyboard-driven power-user interface python -m tui.app
๐ŸŒ HTTP API REST + WebSocket for integrations http://127.0.0.1:8085

TUI Keybindings

Key Action Key Action
Ctrl+K Command palette Ctrl+S Force search
Ctrl+L Clear chat Ctrl+D Deep thinking
Ctrl+T Toggle metrics Ctrl+E Export chat
F1 Help Ctrl+Q Quit

๐Ÿ”Œ API Reference

# Health check
curl http://127.0.0.1:8085/health

# Send message
curl -X POST http://127.0.0.1:8085/chat \
  -H "Content-Type: application/json" \
  -d '{"message": "Explain quantum computing"}'

# Get cognitive state (entropy, surprise, varentropy)
curl http://127.0.0.1:8085/cognitive

# WebSocket streaming
wscat -c ws://127.0.0.1:8085/ws
Endpoint Method Description
/health GET Server health & Ollama status
/chat POST Send message, get response
/ws WS Real-time bidirectional chat
/cognitive GET Entropy, surprise, confidence
/belief GET Active Inference belief state
/memory GET Memory statistics

๐Ÿ“ Project Structure

AVA/
โ”œโ”€โ”€ ๐Ÿ“‚ config/               # Configuration files
โ”‚   โ”œโ”€โ”€ cortex_medulla.yaml  # Main config
โ”‚   โ””โ”€โ”€ tools.yaml           # Tool definitions
โ”œโ”€โ”€ ๐Ÿ“‚ docs/                 # Documentation
โ”‚   โ”œโ”€โ”€ GETTING_STARTED.md   # Quick start guide
โ”‚   โ”œโ”€โ”€ ARCHITECTURE.md      # Sentinel architecture
โ”‚   โ””โ”€โ”€ API_EXAMPLES.md      # API reference
โ”œโ”€โ”€ ๐Ÿ“‚ src/                  # Python source (TUI/tools)
โ”‚   โ”œโ”€โ”€ core/                # Cortex-Medulla system
โ”‚   โ”œโ”€โ”€ hippocampus/         # Titans memory
โ”‚   โ””โ”€โ”€ tools/               # Tool implementations
โ”œโ”€โ”€ ๐Ÿ“‚ tui/                  # Terminal UI (Textual)
โ”œโ”€โ”€ ๐Ÿ“‚ ui/                   # Desktop GUI (Tauri + Next.js)
โ”‚   โ””โ”€โ”€ src-tauri/           # Rust backend
โ”‚       โ””โ”€โ”€ src/engine/      # Cognitive engine
โ”œโ”€โ”€ ๐Ÿ“‚ tests/                # Test suite
โ””โ”€โ”€ ๐Ÿ“„ README.md             # You are here

โš™๏ธ Configuration

Edit config/cortex_medulla.yaml:

cognitive:
  fast_model: "gemma3:4b"        # Medulla (fast)
  deep_model: "qwen2.5:32b"      # Cortex (deep)
  surprise_threshold: 0.5        # Routing threshold

search:
  enabled: true
  min_sources: 3                 # Verify with N sources

agency:
  epistemic_weight: 0.6          # Curiosity level
  pragmatic_weight: 0.4          # Goal focus

thermal:
  max_gpu_power_percent: 15      # Safe for laptops

See CONFIGURATION.md for all options.


๐Ÿ“Š Hardware Requirements

Component Minimum Recommended
GPU VRAM 4GB 8GB+
System RAM 8GB 16GB+
Storage 10GB 50GB
OS Windows 10 / Linux Windows 11 / Ubuntu 22.04

VRAM Budget (4GB GPU)

Component           โ”‚ Resident  โ”‚ Peak
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
System Overhead     โ”‚   300 MB  โ”‚   300 MB
Medulla (gemma3:4b) โ”‚ 2,000 MB  โ”‚ 2,000 MB
Embedding Model     โ”‚   200 MB  โ”‚   200 MB
Titans Memory       โ”‚   100 MB  โ”‚   100 MB
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Total               โ”‚ 2,600 MB  โ”‚ 2,600 MB
Headroom            โ”‚ 1,400 MB  โ”‚ 1,400 MB

๐Ÿ› ๏ธ Troubleshooting

โŒ "Ollama is not running"
# Start Ollama server
ollama serve

# Verify it's running
curl http://localhost:11434/api/tags
โŒ "No models available"
# Pull required models
ollama pull gemma3:4b
ollama pull nomic-embed-text

# Verify models
ollama list
โŒ "Port 8085 already in use"
# Windows
netstat -ano | findstr :8085
taskkill /F /PID <pid>

# Linux/macOS
lsof -i :8085
kill -9 <pid>
โŒ "Out of GPU memory"
# Use smaller model
export OLLAMA_MODEL=gemma2:2b

# Or limit GPU memory
export AVA_GPU_MEMORY_LIMIT=3000

See TROUBLESHOOTING.md for more solutions.


๐Ÿ“š Documentation

Document Description
Getting Started Installation & first steps
Architecture Sentinel architecture deep-dive
Configuration All configuration options
API Examples HTTP/WebSocket examples
TUI Guide Terminal UI reference
Environment Variables All env vars
Troubleshooting Common issues

๐Ÿค Contributing

Contributions are welcome! Please read our Contributing Guide first.

# Fork the repo, then:
git clone https://github.com/YOUR_USERNAME/AVA.git
cd AVA
pip install -e ".[dev]"
pre-commit install

# Make changes, then:
pytest                    # Run tests
cargo test               # Rust tests
git commit -m "feat: your feature"
git push origin your-branch

๐Ÿ“œ License

This project is licensed under the MIT License โ€” see LICENSE for details.


๐Ÿ™ Acknowledgments

Research Technology
  • Titans โ€” Test-Time Learning (Google, 2025)
  • Entropix โ€” Entropy-Based Routing
  • Active Inference โ€” Free Energy Principle (Friston)
  • Mamba โ€” State Space Models
  • Ollama โ€” Local LLM inference
  • Tauri โ€” Desktop framework
  • Textual โ€” TUI framework
  • Next.js โ€” React framework

Built with โค๏ธ for the research community

โญ Star this repo โ€ข ๐Ÿ› Report Bug โ€ข ๐Ÿ’ก Request Feature

About

AVA, Afsah's Virtual Assistant, a JARVIS like assistant to automate my daily life.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Contributors 2

  •  
  •