Science Fiction Writing Assistant

Status: Active (runs locally)

Multi-agent world-building assistant that answers questions about a narrative using selected context documents and tiered OpenRouter models.

View on GitHub

Why I Built It

I use the OpenAI API Playground and the free ChatGPT app when I'm brainstorming science-fiction world-building ideas. I noticed that the API Playground consistently underperformed compared to the free ChatGPT app. I was able to dramatically improve the Playground's performance by connecting a vector store with RAG, but the ChatGPT app maintained an edge. What I really needed was better context. That's what makes this tool shine.

Of all my recent projects, this tool is my favorite because of its simplicity and ease of use.

Technology

How to Use It

  1. Add an OpenRouter API key to your .env file.
  2. Paste a portion of your narrative into the right panel and ask your question in the bottom-center panel.
  3. Select a folder containing context documents in the left panel.
  4. To add new context:
    1. Put the file name on the first line and press Enter.
    2. Add your context and click Save in the bottom right of either the Question or Narrative window.
    3. The new context then appears in the world-building context list.
    4. New context is not selected automatically.
  5. Selecting a context displays it in the preview panel.
    1. To read an already-selected context, deselect it and select it again.
  6. Choose models from the three dropdowns at the top of the window.
    1. Left: the lowest-level agents (6 agents).
    2. Middle: their managers (2 agents).
    3. Right: the final agent that delivers the output.
    4. Note: because the agents work in a loop, responses are not streamed.
  7. My favorite workflow: flesh out a science idea, refine it, then create a document and add it to the world-building context.

Screenshots

Main window annotated: model dropdowns at the top, response panel, prompt panel, narrative panel, and the New Conversation button that clears history.
Main window: select models, add narrative text, and ask a question. Start a new conversation to clear history.
World-building context panel annotated: folder selection, a newly saved context that must be checked to be included, and the title-then-content save flow.
Context panel: select a folder, save new context (first line is the title), and check it to include it. Cmd+Enter sends.

Technical Details

Known Limitations