freshcrate
Home > AI Agents > thane-ai-agent

thane-ai-agent

Autonomous AI agent for Home Assistant with multi-model routing, persistent memory, and an OpenAI-compatible API

Description

Autonomous AI agent for Home Assistant with multi-model routing, persistent memory, and an OpenAI-compatible API

README

Thane

CI Go Reference Go Report Card Go Version License Release

An autonomous AI agent that learns, remembers, and acts.

Your home already generates thousands of data points every hour — temperature sensors, motion detectors, door states, power draws. Thane is an AI agent that actually understands them. It knows an open garage door for two hours is unusual, that someone in the kitchen at 2am doesn't want bright lights, and that the dryer finishing three hours ago but still drawing power is worth mentioning. It learns your home, your preferences, and your routines through conversation — and it remembers.

Everything runs on your hardware, behind your firewall. Thane works with any model runner that speaks a standard inference API — local or cloud, your choice. Written in Go. Single binary first, with an optional container image. No Python, no accounts to create.

What Makes Thane Different

Autonomous, not subjected. Home Assistant's Assist can only see entities you pre-select. Thane has full API access — it discovers devices, understands context, and acts on its own.

Memory that persists. Tell it once that you like the lights dim after 10pm and it just knows. Facts, preferences, routines — all learned through natural conversation and remembered across restarts.

Private by architecture. Every conversation, every fact, every contact lives in SQLite on your machine. Cloud models are available but nothing requires them. Privacy is structural, not a policy promise.

Smart about cost. The frontier model thinks; a small free local model does the work. Delegation keeps 90%+ of tool calls at zero API cost.

Single binary. go build and you're done. One command: thane.

Quick Start

git clone https://github.com/nugget/thane-ai-agent.git
cd thane-ai-agent
just build && just init
# Edit ~/Thane/config.yaml with your HA token, Ollama URL, and MQTT broker
just serve

Point Home Assistant's Ollama integration at http://thane-host:11434, select model thane:latest, and start talking.

Your First Thane — Complete onboarding guide with hardware, models, and deployment.

Releases

Tagged releases publish locally prepared release artifacts on GitHub plus a multi-arch container image on ghcr.io/nugget/thane-ai-agent. The intended release path is to build, sign, notarize, staple, and upload the macOS installer product archives alongside the Linux tarballs from a local release workstation via just. Those macOS artifacts install thane into ~/Thane/bin, carry first-party installer metadata for inspection, avoid a machine-wide admin prompt, and can be stapled cleanly after notarization. GitHub Actions publishes the tagged container image and its provenance attestation. The preferred operator workflows are:

  • just release-github 0.9.0
  • just release-github 0.9.0 prerelease
  • just deploy-macos-pkg user@host

See Release Engineering for the full workflow and credential requirements.

Documentation

Understand It

Run It

Extend It

Name

Thane — A Scottish term for a landholder who managed an estate on behalf of the crown. Your home automation estate deserves a capable steward. (Project History)

Contributing

Contributions welcome. See CONTRIBUTING.md.

License

Apache 2.0 — aligned with Home Assistant.

Release History

VersionChangesUrgencyDate
v0.9.0-rc# v0.9.0 — The Convergence Release > **Note:** This release is tagged `v0.9.0-rc` due to a GitHub immutable releases mishap during the release process. This *is* the v0.9.0 release — the tag name is just a scar from learning that GitHub won't let you delete and recreate a release once assets have been uploaded. v0.9.0 is the first Thane release that represents a deliberate pause for architecture, documentation, and process rather than feature velocity. 540 commits since v0.8.4, focused on Medium4/7/2026
v0.8.4## Highlights ### Content-Addressed Attachment Store (#560, #561, #562) Full attachment pipeline: content-addressed storage with SHA-256 dedup, SQLite metadata index, vision analysis with 3-tier caching, and agent tools for search/list/analyze. Signal bridge integrated; all channels share dedup and metadata. ### Git-Backed Provenance Store (#556) Signed, auditable file store for ego.md and metacognitive.md. Every write is a git commit with SSH signature enforcement, providing a tamper-evident Low3/12/2026
v0.8.3## What's Changed * chore: remove web dashboard package (clean slate for #534) by @thane-developer in https://github.com/nugget/thane-ai-agent/pull/536 * feat: add logs_query tool for SQLite log index by @thane-developer in https://github.com/nugget/thane-ai-agent/pull/533 * feat: loop infrastructure with process registry (#509 phase 1) by @thane-developer in https://github.com/nugget/thane-ai-agent/pull/538 * refactor: reimplement metacog as first loop consumer by @thane-developer in https://giLow3/12/2026
v0.8.2OpenClaw workspace-aware agent behavior, exposed as a faux Ollama model on Thane's existing API. Plus logging field fixes that complete the structured logging work from v0.8.1. **22 files changed, 1,608 insertions, 79 deletions across 7 commits.** ## Highlights ### thane:openclaw Faux Ollama Model (#256, #528) - New `internal/openclaw` package exposes a `thane:openclaw` model on the Ollama-compatible API (port 11434) that replicates OpenClaw v2026.2.9 workspace-aware agent behavior using ThanLow3/10/2026
v0.8.1Structured logging overhaul. Thane's logging system now writes JSON by default, self-manages rotation, propagates trace context through the agent loop, and indexes every log record in SQLite for fast session-scoped queries from the web dashboard. **37 files changed, 2,783 insertions, 230 deletions across 10 commits.** ## Highlights ### Self-Managed Log Rotation (#521) - JSON-structured log output by default — machine-parseable, human-readable with `jq` - Built-in file rotation with configurabLow3/10/2026
v0.8.0Phase 4: Presence. Thane now pushes actionable notifications with human-in-the-loop callbacks, syncs contacts natively via CardDAV, monitors media feeds, and exposes a full web dashboard for operational visibility. **293 files changed, 32,671 insertions, 4,527 deletions across 136 commits.** ## Highlights ### Actionable Notifications & HITL - Provider-agnostic notification routing with pluggable delivery channels - `send_notification` for fire-and-forget push via HA companion app - `request_hLow3/10/2026
v0.7.1# Thane v0.7.1 **39 commits, 71 files changed, +13,656 / -224 lines** A major feature release building on v0.7.0's foundation: native media integration, metacognitive self-monitoring, Signal UX improvements, and infrastructure hardening across the board. ## 🎬 Native Media Integration **`media_transcript` tool** — fetch transcripts from YouTube, Vimeo, podcasts, or any of yt-dlp's 1000+ supported sites. (#354, #360, PR #355) - VTT cleaning pipeline: deduplicates rolling captions, strips timLow2/23/2026
v0.7.0Phase 3: Autonomy. Thane can now read and reply to email, manage its own capabilities, and route decisions based on who's asking. **111 files changed, 21,603 insertions, 842 deletions across 147 commits.** ## Highlights ### Native Email (IMAP + SMTP) - Full IMAP client: `email_list`, `email_read`, `email_search`, `email_folders`, `email_mark`, `email_move` - SMTP send/reply with markdown-to-HTML conversion: `email_send`, `email_reply` - Automatic email polling with UID high-water marLow2/21/2026
v0.6.0## What's Changed * fix: nudge model when tool calls produce empty response by @thane-developer in https://github.com/nugget/thane-ai-agent/pull/168 * fix: detect empty delegate results as failures by @thane-developer in https://github.com/nugget/thane-ai-agent/pull/169 * refactor: intent-based routing profiles (Phase 1) by @thane-developer in https://github.com/nugget/thane-ai-agent/pull/171 * feat: MCP host support for extensible tool integration by @thane-developer in https://github.com/nuggeLow2/16/2026
v0.4.0## Highlights Cost-aware model routing, per-chat conversation isolation for Open WebUI, and extensive hardening against tool call hallucinations. Reduced per-interaction Opus cost from ~$2-5 to ~$0.20 through conversation isolation and cost-penalized routing. ## Router - **Cost-aware scoring** — expensive models penalized by tier × complexity (simple=-45, moderate=-24, complex=-9 for tier 3); free model bonus +15 - **Hint system** — callers supply `channel`, `mission`, `quality_floor`, `modelLow2/12/2026
v0.3.1## Features - **Static context injection** (#87, #88) — New `context.inject_files` config reads files at startup and injects into system prompt. Agent no longer wastes iterations reading key files like `~/.agents.md` or `MEMORY.md`. ## Fixes - **Tilde expansion** (#85) — `file_read`/`file_write` now expand `~` to home directory - **Iteration limit** (#86) — Agent loop limit increased from 10 to 50 - Copilot review fixes: comment ordering, error specificity, tilde edge cases - Sanitized personalLow2/12/2026
v0.3.0## Session Archive & Rich Metadata Thane now remembers everything. Complete immutable transcript archive with full-text search, gap-aware context expansion, and LLM-generated session metadata. ### Session Archive (PR #78) - **Immutable transcript storage** — every message and tool call preserved in `archive.db` - **FTS5 full-text search** with graceful LIKE fallback when FTS5 unavailable - **Gap-aware context expansion** — uses silence detection (default 10min) to find conversation boundaries,Low2/12/2026
v0.2.3## What's New ### httpkit: Centralized HTTP Client (#71) - New `internal/httpkit` package — single source of truth for all outbound HTTP - Shared transport with explicit dial (10s), TLS handshake (10s), response header (15s) timeouts - Connection pooling: 20 max idle, 5 per host, 90s TTL, HTTP/2 - Auto User-Agent injection (`Thane/<version>`) - `ReadErrorBody()` and `DrainAndClose()` utilities for bounded reads and pool hygiene - Migrated all 7 HTTP client packages - 100% test coverage on httpkLow2/11/2026
v0.2.2## What's Changed - Fix streaming timeout during tool calls (#63) - Send SSE keepalive comments during tool execution - Reset write deadline per-event using ResponseController **Full Changelog**: https://github.com/nugget/thane-ai-agent/compare/v0.2.1...v0.2.2Low2/11/2026
v0.2.1## What's Changed - refactor: remove duplicate min/max functions, use Go builtins - Merge pull request #57 from nugget/refactor/remove-duplicate-min-max - fix: replace hand-rolled number formatting with strconv.Itoa - Merge pull request #58 from nugget/fix/replace-hand-rolled-number-formatting - refactor: extract shared LLM types into types.go with proper Go types - test: add wire-format conversion tests for LLM types - feat: replace string StreamCallback with typed StreamEvent - fix: prevent cLow2/11/2026
v0.2.0## What's New ### Native Anthropic Claude Provider (#47) - Direct Anthropic API support — no more Ollama shim for Claude models - MultiClient architecture routes each model to its configured provider - Proper tool_use format, extended thinking support, accurate token counting ### Persona System & Memory Pooling (#49) - Configurable `persona_file` in config.yaml (markdown persona) - `read_only_dirs` for safe symlinked file access - Context window progress bar in web UI (color-coded) - Session rLow2/10/2026

Dependencies & License Audit

Loading dependencies...

Similar Packages

iterateA self-evolving coding agent written in Go. Reads its own source, decides what to improve, writes code, runs tests, and commits — autonomously.0.0.0
AgenvoyAgentic framework | Self-improving memory | Pluggable tool extensions | Sandbox executionv0.19.4
goclawGoClaw - GoClaw is OpenClaw rebuilt in Go — with multi-tenant isolation, 5-layer security, and native concurrency. Deploy AI agent teams at scale without compromising on safety.v3.10.0
career-opsAI-powered job search system built on Claude Code. 14 skill modes, Go dashboard, PDF generation, batch processing.v1.5.0
RustClawLean Rust AI agent: 6MB binary, 7.9MB RAM. OpenClaw replacement. Telegram + Discord + GitHub auto-PR. Ollama/Anthropic support.v0.5.0