Faithful
FSAR is the character you configured — name, personality, scenario, emotion state — talking to the user you described. It does not drift into “generic assistant”.
It belongs to you,not to a vendor.
FSAR is a local-first AI companion. Conversations, memories, decisions and tools all run on your own machine, in a SQLite database under~/.fsar/. Nothing is uploaded to any FSAR server.
It remembersevery word you said to it,and every strategy it learned along the way.When it wakes up next time,none of it is lost.
FSAR is four letters and four constraints that have to hold at the same time. Remove one, and the rest is no longer the same thing.
FSAR is the character you configured — name, personality, scenario, emotion state — talking to the user you described. It does not drift into “generic assistant”.
Every tool call passes through layered checks: a hardline guard blocks destructive commands first, a risk engine classifies each tool, a workspace gate contains file access, and a subprocess env scrubber strips keys and tokens before skills run.
Every tool call is logged. A strategy injector synthesises a ## Learned Strategies block from the decision log and user model. An experience store makes one session’s MCP install the next session’s recall.
Three reflection modes re-read conversations and update the user model: explicit preferences, inferred profile, recurring behavioral patterns. The next session opens with that context already in the prompt.
Tools, memory, rooms, sandbox, social bridges — they share the same safety gates and the same ~/.fsar/.
PowerShell on Windows, bash elsewhere. Destructive commands are stopped by the hardline guard before any other check runs.
Read, edit and search inside a scoped workspace. Going out of bounds triggers a sandbox-escape confirmation, not a silent pass.
Search and fetch the web through the free Exa MCP server — no API key required.
Analyse images and PDFs locally. The content does not enter a third-party queue.
Screenshot, click, type and press keys. Gated separately from ordinary conversation.
Several characters share one room and elect who speaks next; @-naming one hands them the floor.
A plan board, one turn per member in that member’s own copy of the repo, patches you land or refuse by hand, snapshots you publish.
Talk through Telegram, Feishu or WeChat and keep the same conversation going when you are away from the desk.
fsar run for a single turn; fsar room say / read against a room’s API.
From the browser to a character speaking: six explicit gates. If any one refuses, nothing after it happens.
The frontend sends JSON over /ws. ws_server._dispatch tries each handler in turn; chat.send lands in handlers/chat.py, which spawns ChatEngine.handle_send.
Bind the session to a workspace, resolve the character card, emit chat.thinking. Route by content: slash command, multi-model ensemble, companion mode, or the agent loop.
Take the agent tier and build the system prompt from AGENT_SYSTEM_PROMPT + character/user cards + ## Learned Strategies + ## Experiences, then load short-term memory and trim it to the context window.
Up to max_tool_turns iterations: compact context when needed, call the model (server-side prompt caching where supported), execute tool calls when present. Higher tiers add adversarial checks and micro-reflection.
MCP gate → sandbox gate WorkspaceGate → risk gate RiskEngine → execute → post-execution review and redaction. Sequential, and the first refusal stops the chain.
Feed tool results back until the model answers without one; stream the answer (optionally TTS), run task reflection by tier, advance idle reflection, lazily name the session.
Everything about you lives in ~/.fsar/: configuration, conversations, decision logs, the user model, experiences, semantic embeddings, caches and audit logs.
No account, no cloud sync, no “uploaded to improve the service”. Copy the folder and the whole of FSAR goes with it.
~/.fsar/ ├── config/ yaml configuration └── data/ ├── memory.db chats · decisions · profile · experience ├── chroma/ semantic embeddings ├── llm_cache.db provider prompt-cache accounting ├── tts_cache.db TTS audio cache ├── scheduler.db scheduled jobs └── logs/ rolling logs + audit.log
You need Python 3.11+ and Node.js 18+. The first launch installs frontend dependencies and builds the UI; later launches only do an incremental build.
The browser opens to http://127.0.0.1:8765. If it does not, navigate there manually.
On macOS, Computer Use needs Accessibility access for your terminal app and Python in System Settings → Privacy & Security.
A full-screen Textual TUI: same ~/.fsar/ data, same tools, same safety gates, no browser. Start in a mode directly with fsar character or fsar companion.
From a one-page overview, to every key in fsar.yaml, to the responsibilities and key files of 18 source modules. Available in Chinese and English.
What FSAR is, the four pillars, the capability list, the stack and the architecture at a glance.
Overview →01 PAGEEvery section of fsar.yaml, its defaults and its range, including the full security block.
Setup, install, launch, frontend work, tests and CI, code style and how to contribute.
Development →19 PAGESserver, core, memory, tools, security, sandbox, skills, frontend, skin — one page per module.
Module index →