uniichat README

The project's README from github.com/VictorTaelin/uniichat. As one markdown file: README.md.

UniiChat

▶ Watch the announcement video

This repo is vibe-coded. AI agents wrote nearly all of it, and AI agents reviewed it. Read it, run it and fork it as such: expect bugs.

UniiChat is an AI agent with one chat that never ends. There is no "new chat" button: you talk to the same agent for days, weeks, years, and it remembers. The hosted version is at https://uniichat.com. This is its source, to run your own server on your own API keys.

How it works

The design is in the header comment of each file. Start with Memory.ts (the tree and the view), Server.ts (the chat, turns, workers) and AskAI.ts (model calls and the cache).

Run it

You need Bun and an Anthropic API key (or an OpenAI one, below).

export ANTHROPIC_API_KEY=sk-ant-...
bun Server.ts                    # http://127.0.0.1:8788, data in ~/.unii

Then open http://127.0.0.1:8788 and type your email. With no mail key set, the server prints the sign-in link in its output: open it. Or chat from a terminal:

bun Term.ts http://127.0.0.1:8788

It asks for your email, the server prints a link, and the page it opens asks for the code the terminal shows. bun Term.ts help lists the rest.

Other commands:

bun run test                     # the tests, each file on its own
bun run web                      # rebuilds web/app.js from web/src
bun build --compile Term.ts --outfile unii
                                 # one `unii` executable; `unii serve`
                                 # runs the server it carries

Your chats live in ~/.unii/users/, one JSON line per message (main/) and per summary (tree/). They are the memory: back them up.

Config

~/.unii/config.json (optional; the dir is $UNII_DIR). Each key may also be set as the variable UNII_<KEY>:

Keys are read from the environment: ANTHROPIC_API_KEY, OPENAI_API_KEY, RESEND_API_KEY (to email sign-in links; none: they print), APNS_KEY.

With only an OpenAI key, set vendors, pick and compactor to openai-api models, e.g. UNII_VENDORS=openai-api UNII_PICK=openai-api:gpt-6.1-sol:medium:slow UNII_COMPACTOR=openai-api:gpt-6-luna:high:slow.

A self-hosted server is free: it bills no one, shows no prices, and calls only the model vendors. Billing.ts is the one place a hosted server plugs in its billing (uniichat.com sells credits; this repo has none).

The unii terminal

web/install.sh (served at /install.sh) runs the official installer, which installs the released unii executable. unii alone opens uniichat.com; unii <url> opens any server. Run with UNII_COMPUTER=1 on a Mac, the agent may use its screen (it compiles Computer.swift with swiftc; macOS asks for Screen Recording and Accessibility).

Telemetry: once a day the unii terminal asks bend-lang.com's /check for the latest version (Term.ts update_check), sending its version, OS and CPU type, no account and no id; it also says whether this computer has ever self-hosted (set for good the first time it runs unii serve or opens a server other than uniichat.com). It is the one call a self-hosted UniiChat makes to us. UNII_NO_TELEMETRY=1 turns it off.

License

Apache-2.0 (LICENSE). Copyright 2026 Higher Order Company.

uniichat (VictorTaelin/uniichat)

ai-agent
Searching Database…

What is this?UniiChat is a self-hosted AI agent you talk to in a single conversation that never ends - no 'new chat' button, it remembers everything across days, weeks, or years using a built-in memory tree.
Is this a chat app, or is it a framework I build on?It is a self-hosted server app: you run a TypeScript/Bun backend, and any number of clients (a browser tab or the 'unii' terminal) connect as live views of the same ongoing chat.
How do I get it running?Clone the repo and run 'bun Server.ts' to start the server, or 'bun Term.ts' to chat from a terminal; you can also compile a standalone 'unii' executable with 'bun build --compile Term.ts --outfile unii'.
Do I need Bun and an Anthropic API key to run this?Yes, you need Bun installed and an Anthropic API key by default; you can swap to an OpenAI key instead by reconfiguring the vendor, pick and compactor settings.
Is this stable enough to run as my daily agent?The README itself warns that the whole project is 'vibe-coded' - nearly all of it was written and reviewed by AI agents, so bugs should be expected.
Does it work on Windows and Linux too, or only macOS?Since it runs on Bun it works on macOS, Linux, and Windows; only the optional Mac screen-control feature is macOS-only.
Does any of my chat data leave my machine?Your chats are stored locally as JSON lines in ~/.unii/users/; the only outbound call a self-hosted server makes is a daily version-check ping to bend-lang.com with no account or id, and it can be turned off.
How does the memory tree actually work?Every message is summarized into one line, and neighboring lines keep getting merged in pairs into a binary tree, so each call sees recent messages in full detail and older ones compressed into broader summaries - nothing is deleted, and the agent can 'zoom' back into any summary to see the original messages it came from.
Can I import my old ChatGPT or Claude conversations?Yes, UniiChat can import Claude Code and Codex folders, or the website exports from Claude and ChatGPT, and they join the memory tree.
Can the agent control my Mac's screen?Yes, running with UNIICOMPUTER=1 on macOS lets the agent drive the screen; it compiles Computer.swift via swiftc and macOS will prompt for Screen Recording and Accessibility permissions.
Is there a hosted version I can use instead of running my own server?Yes, uniichat.com is the hosted version and sells credits for billing, while a self-hosted server is free and only calls the model vendors you configure.
What are similar projects?brigade, Raven, ruflo, OptMem, aichat, whirl, Athena-Public, pi-optchat
Size
0.4 MB
Stars
301
Updated
CommitOct 19
Age
1d
Commits · 90 Days