Polaris

An open-source, self-hosted AI Agent system built for 2026+. Strictly follows the six architectural invariants of Polaris Engineering. Runs on a single machine with 8GB RAM, supports mainstream third-party platforms like Telegram / Discord / Slack / Feishu. End users can customize lifecycle behaviors via Shell Script Hooks without modifying source code.

Positioning & Constraints

DimensionDetails
PositioningOpen-source self-hosted AI Agent (2026+)
EnvironmentSingle-machine runnable, consumer laptop, 8GB+ RAM
Core LanguageGo (orchestration/services) + Rust (performance-critical paths)
StorageMulti-engine co-existence: Relational + Vector + Graph + KV + Full-text + Event Stream
ArchitectureMulti-Agent Collaboration: Blackboard pattern + CAS atomic claim + supervisor tree
Core CapabilitiesSelf-learning / Self-evolution / Self-enhancement (Gradient-free mainline + Conditional gradient training)
LLM PoolProvider-agnostic: Supports Flash-class and Reasoning-class models. Adapters implemented for OpenAI / Anthropic / DeepSeek protocols.
Default Recommendation: Out-of-the-box configuration uses DeepSeek V4 series, extensively tested on Tier-0 baseline long-range benchmarks.

Six Invariants of Polaris Engineering

Architecture Design

4-layer architecture / 13 modules / 6 code packages, divided into Infrastructure (L0), Cognitive Core (L1), Collaboration & Learning (L2), and Governance & Interface (L3).

┌──────────────────────────────────────────────────────┐
│ L3  Interface & Scheduler (M13) │ Eval Harness (M12) │
├──────────────────────────────────────────────────────┤
│ L2  Orchestrator (M8) │ Self-Improve (M9) │ RAG (M10)│
├──────────────────────────────────────────────────────┤
│ L1  Agent Kernel (M4) │ Memory (M5) │ Skill (M6) │   │
│     Tool & Action (M7)                               │
├──────────────────────────────────────────────────────┤
│ L0  Inference (M1) │ Storage (M2) │ Observability    │
│     (M3) │ Policy & Safety (M11)                     │
└──────────────────────────────────────────────────────┘

Project Structure

polaris/
├── cmd/polaris/              # Entry point
├── pkg/                      # Core modules
├── internal/                 # Private shared: protocol, config, errors
├── rust/substrate/           # Rust FFI performance paths
├── skills/                   # Built-in skills
├── policies/                 # Cedar policies
├── configs/                  # Default configurations
├── docs/arch/                # Architecture docs
└── Makefile

Installation & Uninstallation

macOS / Linux Install

Default:

curl -sSL https://raw.githubusercontent.com/polarisagi/polaris/main/scripts/install.sh | bash

China Region (Proxy):

curl -sSL https://mirror.ghproxy.com/https://raw.githubusercontent.com/polarisagi/polaris/main/scripts/install.sh | bash

macOS / Linux Uninstall

Default:

curl -sSL https://raw.githubusercontent.com/polarisagi/polaris/main/scripts/uninstall.sh | bash

China Region (Proxy):

curl -sSL https://mirror.ghproxy.com/https://raw.githubusercontent.com/polarisagi/polaris/main/scripts/uninstall.sh | bash

Run & Test

Prerequisites: Go 1.26+, Rust 1.94+

The global working directory is located at ~/.polarisagi/polaris/ in the user's home directory. All runtime state data (including polaris.db), log files, and caches are persisted here.

# Build
make build

# Run
make run

# Test
make test