CharacterVault 1.4.0
This release adds the Agent: a chat that reads and edits the open character or lorebook through tools, instead of you copying text out of Orion. It works in the character workspace and in the standalone lorebook vault.
Try it: https://vault.charactervault.app
Docs: https://vault.charactervault.app/docs/
Highlights
Agent
A tool-using alternative to Orion. You describe the fill, rewrite, or cut; the Agent looks at the card (or book) and applies the edits.
- Character workspace — works on spec fields, alternate greetings, and the lorebook on the card. One session is shared across workspace tabs, so it keeps context as you move between sections.
- Standalone lorebooks — the same Agent in a vault book, with tools to list, read, add, update, snippet-edit, and delete entries.
- Snippet edits — unique-match replace on fields and entries, instead of rewriting the whole value. Matching tolerates quote styles and section spans.
- Whole-book & whole-card tools — search across entries and spec fields, replace a phrase everywhere with one call, and audit the book or card for totals: token counts, duplicate keys, empty fields, recursion edges and cycles. On the card: append to a field without rewriting it and move an alternate greeting to reorder. Entry writes accept the usual SillyTavern activation and recursion flags.
- Readable tool results — tool calls render as short color-coded lines so you can see what it looked at and changed, without dumping full field text into the thread. Searches and audits stay off the transcript entirely.
- Live token count — the context meter updates as the prompt grows, including tool results.
- Own model — Settings → Prompts → Agent can bind a provider and model independent of Orion and the toolbar. Default still follows AI Config.
- Native function calling — when the provider accepts OpenAI-style
tools, the Agent uses them. If the provider rejects that, it falls back to XML tool calls. Agent completions use a larger output budget than the Sampler Max Tokens slider so calls are less likely to cut off. - Cleaner chat — flatter message chrome, streamed Thinking (starts expanded while it is live), visible lorebook entry ids, and no extra turns for lookup-only reads.
- Reply timing — time-to-first-token and tokens-per-second on the assistant tooltip, same as Orion.
- Default chat — Settings → Studio → Chat panel can open Ask AI on Orion or the Agent. The header toggle still switches for the current session.
The Agent writes once when the run finishes (one snapshot first). Until then, the editor keeps the previous text.
AI Agent → · AI Setup → Prompts
Also in this release
- NanoGPT cache routing — a new Cache-capable provider routing toggle under Settings → AI Config → NanoGPT Options sends
caching: trueon chat completions, so NanoGPT routes to a provider that supports prompt caching for lower cost and latency. Sticky provider routing is on by default; if no cache-capable provider serves a model, the request fails rather than silently falling back. Works alongside an explicit Provider choice. - Shared Thinking fold — the same Thinking control is used in Orion, the Agent, and the inline editor toolbar. Live chat thinking starts expanded; the toolbar stays collapsed.
- History — the snapshot of the card you currently have open stays pinned to the end of the list (newest saves still appear at the top).
Fixes and performance
- Streaming memory leak — a finished AI reply could leave its stream hanging open on gateways that keep the connection alive, slowly growing memory while the app sat idle. Streams now stop when the reply signals its end.
- Leaving mid-run — closing a character or leaving the editor aborts an in-flight Orion or Agent run cleanly, and pending edits save first.
- Snapshots — History, pruning, and image cleanup read a lightweight metadata index instead of loading every snapshot payload into memory. Snapshot hashes no longer include the card’s base64 image. Selecting a revision keeps only what is on screen in RAM.
- Long AI sessions — token streams buffer in chunks instead of recopying the full text on every token. Agent chats keep the last 100 messages. Committed thinking is clipped to a generous tail, and a runaway thinking stream rotates its buffer instead of growing forever.
- Agent meter — while a live prompt count is on screen, the idle catalog estimate is skipped so the meter does not rebuild after every message.
- Token estimates — AI features reuse one encoder instead of allocating a new one on every call.
- Toolbar — the ✕ next to a running operation is gone (Stop covers it). A ✕ appears only on errors, where it dismisses them.
- Lorebook links — attaching or deleting a vault-linked book keeps the vault’s link list in sync.
- Agent writes — lorebook edits flush to the attached vault book instead of being left pending. Alternate greetings are numbered from 1, matching the editor. Duplicate same-name
add_entrycalls collapse into one entry. - Lorebook entries — the entry list holds a stable order (sorted by id) while you filter, so rows no longer shuffle as you type.
- Chat — stopping mid-thinking no longer jams the composer (the turn is retryable and Send works again). Messages no longer clip while scrolling.
Upgrade
Client-only app. Open the hosted site or rebuild locally; no server migration.
git clone https://github.com/spaceman2408/CharacterVault
cd CharacterVault
npm install
npm run devLocal data from 1.3.x keeps working. IndexedDB gains snapshot metadata index tables the first time you open this build (schema version 10). Existing snapshots are indexed in place; you do not need to export first.
Hard refresh if the UI looks stale after deploy.
Docs
- AI Agent — expanded with a tool-calling troubleshooting guide for models that ignore or break tool calls
- AI Setup
- Snapshots & Rollback
- FAQ
- What's New
- Changelog