Skip to content
Projekte

Über uns

LLM frontend for roleplay and creative writing

Web- und App-Entwicklung

So werden diese Zahlen gemessen

Gemessener Sternzuwachs

in 24h
0
in 7 days
+1
in 15 days
+6
in 1 month
+18

Nettoänderungen in überlappenden Zeiträumen, keine Tagessummen. Fehlende Messwerte bleiben leer. Sterne zeigen Interesse, nicht Qualität.

README.md

Original

otaku — AI roleplay app

CI PyPI Changelog License: AGPL-3.0 Python 3.11+ Platforms

Otaku is a free open source LLM frontend for roleplay. It runs on your machine and connects to your local LLM backends and cloud providers. Otaku offers two interfaces — web (optimized for mobile) and terminal, provides a streamlined UI and requires minimal configuration.

Interactive demos

Fully functional demos are available on the website (all but the agents' background work):

Both demos include two sample stories and a scripted "model", so you can see how the UI works and actually send prompts.

Screenshots

Web interface

Main page:

Web: story with state

More screenshots

Expanded story state (updated by the supervisor agent and injected in the context tail):

Web: story state

Model selection:

Web: model picker

Story list:

Web: stories

Story premise (goes to the system message):

Web: premise

Story messages:

Web: messages

Story scenes (summaries and long-term memory):

Web: scenes

Story cast (some characters are linked to cards in the character gallery):

Web: cast

Tools and injections:

Web: tools

Supervisor agent configuration:

Web: supervisor settings

Character gallery:

Web: character gallery

Context explorer:

Web: context explorer

Terminal interface

Main view:

Terminal: story

More screenshots

Model selection:

Terminal: model picker

Story messages:

Terminal: messages

Story scenes (summaries and long-term memory):

Terminal: scenes

Story cast:

Terminal: cast

Agents, tools and injections:

Terminal: agents and tools

Features overview

Onboarding

Otaku installs in one command with no dependencies and autodiscovers your local LLM backends and models, so you can start playing immediately.

Roleplay features

Terminal interface — in addition to the web interface, you can also play in your terminal window as if it were a coding agent session. Stories and all functions are shared with the web interface. See the terminal user guide.

Memory system — otaku has short-term and long-term memories. Short-term memory is updated after each turn and tracks the current story state (configurable); long-term memory splits the story into scenes and generates two-level summaries — per scene and from the beginning of the story to the scene. Characters also get their long-term memories in the story: summaries are generated from each character's perspective too.

Context management — the first few and the last messages are sent as they are, and as the context grows, the middle messages are replaced by summaries. Character cards and pinned messages are always sent as is. You can see the final context to be sent to the LLM in the "Context" menu section, showing how many tokens will be spent on each context section (system, injections, summaries, etc.). You can also set a custom limit on the overall context size.

Character cards are optional — you can chat and play without them, or import cards in the middle of a story, directly into it or into the library, from online resources and SillyTavern. Characters you have introduced in your story without a card are extracted and added to the list of story characters automatically, and can be linked to a character card later.

No fixed personas — you can switch characters during play just by saying who you are playing for now.

Story mode — when switched to, you can write the story directly on the page and let the LLM continue, as in NovelAI.

Standard roleplay features (short list): sending pictures (always kept in context); dictation; author's notes (story and global reminders injected in the story tail); tool calls (questions, web search, etc.); branching stories from any message; regenerating and undoing messages; splitting a story into chapters; and more.

Agentic support

Agents run in the background; you can disable any agent in the story settings.

Agent When triggered What it does Configuration Where to see results
Supervisor After each turn Creates short-term memory by keeping track of the current story state — place, time, characters leaving, joining, etc. 1. Set what you want to be tracked in the story settings, e.g. world weather, character health, mood, etc.
2. (Optional) Choose a model different from the one you use for writing.
1. The state is injected at the end of the story so that the LLM doesn't mess up story facts.
2. See the state at the top of the transcript and in the expandable state panel.
Extractor After you've been idle for 5 minutes Creates long-term memory — story summaries — and also extracts characters that have been introduced without a card (Optional) Choose a model different from the one you use for writing. Browse the extracted summaries and characters in the story dossier; summaries are editable
Warm-up (only local backends) Your next turn won't use the LLM cache, and therefore will be slow (*) Sends the currently available context to the LLM, so that it's cached None; always sends the context to the writing model Your next turn will be answered fast

(*) Warm-up trigger examples: a new summary kicks in, or you've edited one of the messages at the beginning of the story, e.g. the system message.

Agents are designed not to disturb your roleplay:

  • the supervisor agent is put back into its queue immediately after you've sent a prompt, and will be retried after you get the response;
  • the warm-up agent is canceled immediately after you've sent a prompt, as there's nothing to warm up anymore;
  • the extractor agent is the heaviest, so it's scheduled after 5 minutes of idle time, which usually means you are away and the run won't disturb your play. If you send a prompt, the run stops at its next step and resumes once you've been idle for another 5 minutes.

Installation

Requirements

  • Platform: Windows / macOS / Linux.
  • Python 3.11+.

How to install

The recommended way is the installation script, which first installs the uv package manager — if you don't have it yet — and then installs otaku with it. To run otaku without installing it, from a git checkout, see launch without installation.

# macOS and Linux
curl -LsSf https://otaku.sh/install.sh | sh

# Windows
irm https://otaku.sh/install.ps1 | iex
How to install via uv or brew (expand)
# directly with uv
uv tool install otaku

# with Homebrew
brew trust enclavum/tap
brew install enclavum/tap/otaku

How to update or uninstall:

otaku update
otaku uninstall  # also purges data on request

How to launch

In the terminal, type one of the commands:

otaku  # opens the terminal UI;
otaku serve  # serves the web interface at http://localhost:9600;
otaku serve --any-host  # serves the web interface at http://localhost:9600, available over the network.

You can run the app without installing it, from the checked-out repo (expand)
git clone https://github.com/enclavum/otaku.git
cd otaku

# macOS and Linux
python3 -m venv .venv
.venv/bin/pip install -e .
.venv/bin/otaku          # or: .venv/bin/otaku serve

# Windows
py -m venv .venv
.venv\Scripts\pip install -e .
.venv\Scripts\otaku      # or: .venv\Scripts\otaku serve

Running in Docker

When run from Docker, the terminal interface is not fully functional — you need to install otaku to use the terminal interface as it's intended.

# without checking out
docker compose -f https://github.com/enclavum/otaku.git up -d

# from the checked-out repo
git clone https://github.com/enclavum/otaku.git
cd otaku
docker compose up -d

# then open http://localhost:9600

Configuration

Database and config files

Everything lives in otaku's home folder — ~/.otaku when installed, or data/ when run from a checkout. You can set an alternative OTAKU_HOME to run a separate environment, e.g.: OTAKU_HOME=~/.otaku-alt otaku.

Web interface

By default, the web interface is available on the local machine only. You can make it available over the network by setting the host parameter to 0.0.0.0 in the [web] section of ~/.otaku/configs/config.toml, or run otaku serve --any-host.

If you go public, you should also consider turning on the next two parameters, https and password, for privacy.

The web interface can serve over HTTPS. Turn on https in the config file and otaku generates a self-signed certificate, which you can also replace with your own if you need to. Browsers will show warnings about an untrusted certificate — that is unavoidable with a self-signed certificate, but the encryption is real.

When the web interface is available over the network, protect it with a password — set it in the same config file.

To restyle the web interface, create ~/.otaku/web/custom.css; it overrides styles in the bundled design. The custom properties it can set are listed in docs/web_tokens.md.

Storage and privacy

Stories live in a local SQLite database; the database is backed up daily into a subfolder, keeping the last seven snapshots. Logs (see otaku logs -h) are also rotated and kept for seven days.

Pictures attached to a turn and cards' pictures are kept beside the database, downsized and stripped of their metadata; they are not part of the daily snapshot.

Encryption at rest is disabled by default but can be switched on in the config file, with several options: the key can live in your OS keychain, come from a command of your choice (a password manager, a hardware token), derive from a passphrase, or sit on disk. The request log and the pictures are sealed with the same cipher.

Provider API keys are always stored sealed, their key in the OS keychain.

Details in SECURITY.md.

Contributing

See CONTRIBUTING.md.

License

AGPL-3.0-only.

Ähnliche Projekte entdecken

Wird geladen…