| --- |
| license: mit |
| language: |
| - en |
| tags: |
| - agent |
| - personal-ai |
| - local-llm |
| - tool-use |
| - function-calling |
| - ollama |
| - lm-studio |
| - apple-intelligence |
| - privacy |
| - local-first |
| - voice-assistant |
| pretty_name: Cognitive Twin — a local-first personal AI twin |
| --- |
| |
| # Cognitive Twin |
|
|
| > *This repository is **not** a model.* It is the **model card / project home** for |
| > [Cognitive Twin](https://github.com/sinhaankur/cognitive-twin-agent) — a |
| > local-first personal AI twin. Published here so anyone running a local LLM can |
| > understand, fork, or critique the agent without cloning first. The runnable code |
| > lives on GitHub; nothing here downloads weights. |
|
|
| A **personal AI twin** that runs on your own machine — a digital version of *you*. |
| It learns who you are (a persona you create), reasons with a local model, and calls |
| **skills** to do real things. Local-first by default; nothing leaves the machine |
| unless you allow it. |
|
|
| ## What it does |
|
|
| - **Be you** — a persona (likes, dislikes, values, style) so it reasons and speaks |
| as you, not a generic assistant. |
| - **Remember you** — private, on-device memory of how you actually behave. Clearable |
| anytime. |
| - **Pick the right brain** — routes each request to the best local model by task. |
| - **Talk** — a native macOS Siri-style app: speak to it, it speaks back. |
| - **Act** — bounded, permissioned tool-calling (web research, screen reading, open |
| apps/URLs) with confirmation. |
|
|
| ## Choose your model backend |
|
|
| The twin drives more than one local backend and lets you switch models live: |
|
|
| | Backend | How models appear | Notes | |
| | --- | --- | --- | |
| | **Ollama** (default) | `llama3.2`, `qwen2.5:3b` | bare names | |
| | **OpenAI-compatible** | `lmstudio/qwen2.5-7b-instruct` | **LM Studio**, `llama.cpp --api`, **Jan**, vLLM, LocalAI | |
| | **Apple Intelligence** | `Apple Intelligence (on-device)` | fully on-device, no server | |
|
|
| Tool/function calling is translated between the Ollama and OpenAI APIs, so skills |
| work the same on either backend. Enable the OpenAI-compatible backend: |
|
|
| ```bash |
| # LM Studio: load a model, then Developer ▸ Start Server (defaults to :1234) |
| CTWIN_USE_LMSTUDIO=1 python -m cognitive_twin voice --web |
| # …or any OpenAI-compatible base URL: |
| CTWIN_OPENAI_BASE=http://localhost:8080/v1 python -m cognitive_twin voice --web |
| ``` |
|
|
| ## Quick start |
|
|
| ```bash |
| git clone https://github.com/sinhaankur/cognitive-twin-agent |
| cd cognitive-twin-agent |
| # Ollama path: install Ollama (https://ollama.com) and pull a tool-capable model |
| ollama pull llama3.2 |
| python -m cognitive_twin "good morning" |
| ``` |
|
|
| See the [GitHub repo](https://github.com/sinhaankur/cognitive-twin-agent) for the |
| full README, the native macOS **Twin Voice** app, model routing, and the skill |
| system. |
|
|
| ## Why local-first |
|
|
| Local models already handle a large share of everyday queries. The gap is the |
| *software around them*: a persona, a skill system, and a reliable loop that turns |
| "do X" into real actions — locally, privately, on hardware you own. |
|
|
| ## License |
|
|
| MIT. Inspired by [OpenJarvis](https://github.com/open-jarvis/OpenJarvis) |
| ("Personal AI, on personal devices") — an original implementation, same spirit. |
|
|