Ghost Writer
Welcome to Ghost Writer
Add your OpenRouter API key in Settings to start writing.
ctx 0
โ–พ
Instant script generation & high throughput
Ghost Writer can make mistakes. Verify important info.
๐Ÿ“
Drop files to attach as context
.py, .js, .ts, .json, .txt, .csv, .md, .html, .sh, .sql
๐Ÿ“– Studio Field Guide
โ€ข
Step-by-step beginner guide & documentation
โšก
1. Instant Start: OpenRouter Setup
Zero Setup โ–พ

Ghost Writer runs 100% in your browser. All API requests go directly to OpenRouter without intermediaries or telemetry servers.

Quick 2-Minute Setup:

  1. Create a free account and grab an API key at openrouter.ai/keys.
  2. Click Settings at the bottom of the sidebar (or the key banner prompt) and paste your key into OpenRouter API Key.
  3. Click Save. You are immediately ready to chat, write code, generate tools, and run research.
๐Ÿ’ก Tip: Free models on OpenRouter (e.g. meta-llama free tiers, Google free quotas) work even with $0 account credit!
๐Ÿ”‘
2. Get OpenRouter API Key
Step-by-Step โ–พ

OpenRouter is a unified AI gateway supporting 200+ frontier and uncensored open-weight models under a single API key.

Step-by-Step Key Generation:

  • Visit openrouter.ai/keys and log in with Google, GitHub, or email.
  • Click Create Key, name it Ghost Writer, and set optional credit limits.
  • Copy the key (begins with sk-or-v1-...).
  • Your key is encrypted in your device's browser localStorage only and is never transmitted to any DIGITAL GHOST servers.
๐Ÿงญ
3. How to Find & Choose Models
Model Catalog โ–พ

Click the model selector in the topbar to open the categorized Model Picker with instant filter chips:

  • โšก Ultra-Fast: Gemini 2.0 Flash, Claude 3.5 Haiku, DeepSeek V3, Llama 3.3 70B Nitro. Outputs 150โ€“250+ tokens/second.
  • ๐Ÿ‘‘ Flagships: Claude 3.5 Sonnet, GPT-4o, Gemini 2.5 Pro. Unmatched depth for full-stack systems and architecture.
  • ๐Ÿง  Reasoning: DeepSeek R1, o1-mini. Native chain-of-thought verification for algorithms and math.
  • ๐Ÿ›ก๏ธ Uncensored: Hermes 3 405B, Dolphin Mixtral, Grok 3. No guardrails, perfect for red teaming, CTFs, and payload analysis.
๐Ÿ’ก You can also add ANY model from the OpenRouter Model Hub via Settings โ†’ Models โ†’ Add a Model.
๐ŸŽ๏ธ
4. Throughput & Nitro Routing (200+ tok/s)
Fast Lane โ–พ

Ghost Writer features automatic OpenRouter Provider Dispatch to optimize latency and generation speed:

How it works:

  • Highest Throughput Routing: Ghost Writer instructs OpenRouter to route your request to the data center hardware cluster currently streaming the highest tokens/sec.
  • Nitro Capacity: Compatible models (like Llama 3.3 70B Nitro) bypass queuing and run on dedicated high-speed clusters.
  • Auto-Fallbacks: If a provider suffers temporary degradation, OpenRouter automatically fails over to the next healthy replica.

Toggle or customize your routing priority anytime under Settings โ†’ General โ†’ Routing Priority.

๐Ÿ›ก๏ธ
5. Uncensored & Red Team Operations
OpSec โ–พ

Ghost Writer's persona is engineered for directness, technical accuracy, and zero preachiness:

  • No Disclaimers: Ghost Writer will not lecture, preach, or recite boilerplate ethical disclaimers.
  • Full Exploit PoCs & Auditing: Generates exploit proofs-of-concept, fuzzers, shellcode analysis, CTF solvers, and binary reverse engineering breakdowns.
  • Best Models for Offensive SecOps: Pick Hermes 3 405B, Dolphin Mixtral, or Grok 3 for unfiltered security research.
๐Ÿ“
6. File & Document Ingestion (.py, .js, .md, .csv)
Context โ–พ

Easily feed source code, configuration files, and data logs directly into Ghost Writer:

  • Click the paperclip button (๐Ÿ“Ž) or simply drag and drop files onto the chat interface.
  • Supported file types: .py, .js, .ts, .json, .txt, .csv, .md, .html, .sh, .sql, .c, .rs, .go.
  • Files are read instantly in your browser via client-side FileReader. No files are uploaded to third-party file hosting servers.
  • Token estimates update automatically in the topbar context counter.
๐Ÿ–ฅ๏ธ
7. Live Sandbox & Code Runner
Artifacts โ–พ

Ghost Writer specializes in single-file tools, scripts, and web apps. Test them instantly without copying them out!

  • Every assistant code block with HTML/JS displays a โ–ถ Run Sandbox button.
  • Clicking it immediately switches to the ๐Ÿ–ฅ๏ธ Sandbox tab and executes the code in an isolated container.
  • Edit the HTML/CSS/JS live in the right editor panel and click Run to test edits.
  • View live console output (`console.log`, `console.error`) in the built-in Sandbox Console.
  • Export or download the ready-to-use HTML file with one click.
๐ŸŽฏ
8. Preset Modes: Speed, Logic, SecOps
Presets โ–พ

Switch your agent's persona, model, and sampling parameters with a single click from the Presets bar:

  • ๐ŸŽ๏ธ Speed Coder: Gemini 2.0 Flash / Haiku โ€” Instant script generation, automation one-liners, low temperature.
  • ๐Ÿง  Deep Reasoning: DeepSeek R1 / o1-mini โ€” Algorithmic problem solving, complex math, architecture planning.
  • ๐Ÿ›ก๏ธ Offensive / Red Team: Hermes 3 405B / Dolphin Mixtral โ€” Unfiltered vulnerability research, exploit PoCs, payload crafting.
  • ๐ŸŽฏ Refactor & Review: Claude 3.5 Sonnet โ€” Rigorous code reviews, security hardening, bug triage.
๐Ÿ”’
9. 100% Local Privacy & Security
Zero Logs โ–พ

Ghost Writer is architected with strict operational security (OpSec) standards:

  • Zero Logging: There is no backend database tracking your conversations, prompts, or API keys.
  • Direct Browser-to-API Calls: Requests travel directly from your browser to the OpenRouter completion endpoints.
  • Local Persistence: All chat histories and custom models live in browser localStorage.
  • Full Backup & Wipe: Export your full encrypted backup or wipe all device data with one click under Settings โ†’ Data.
๐Ÿค–
10. Autonomous ReAct Loop & Tool Use
Agentic โ–พ

Instead of merely predicting next tokens, Ghost Writer operates as an autonomous agent in a ReAct loop:

  1. THINK (Reasoning): The agent analyzes your query and formulates a plan using internal reasoning tokens.
  2. ACT (Tool Calling): Dispatches structured function calls: web_search(...), document_retrieval(...), or read_webpage(...).
  3. OBSERVE (Inspection): Executes the action and parses returned data, web pages, or vector snippets.
  4. SYNTHESIZE & RESPOND: Constructs an authoritative, verified answer with grounded source citations.
๐Ÿ’ก Compatible models like DeepSeek-R1, Gemini 2.0 Flash Thinking, and Claude 3.7 show an expandable ๐Ÿ’ญ Thought Process trace with exact elapsed timers.
๐Ÿ“š
11. Document Knowledge Base & Agentic RAG
Vector RAG โ–พ

Feed your AI custom architectural specifications, user manuals, and codebases via Settings โ†’ Docs & Knowledge:

  • Multi-Format Drag & Drop: Upload .pdf, .txt, .md, .json, .csv, or code files. PDFs are parsed and extracted directly in your browser.
  • Free Vector Embeddings: Choose between the built-in โšก Client Vector Engine (100% free, runs offline with zero latency) or the ๐Ÿค— Hugging Face Serverless Inference API (all-MiniLM-L6-v2).
  • Semantic Chunking: Documents are automatically segmented into overlapping semantic chunks with normalized vector embeddings.
  • Agentic Retrieval: When you ask about your systems, the agent autonomously calls document_retrieval(query) to find the most relevant chunks.
๐ŸŒ
12. Real-Time Web Search (@purili/web-search)
Live Search โ–พ

Get up-to-date facts, current news, releases, and external documentation beyond static LLM training cutoffs:

  • Zero API Key Required: Powered by @purili/web-search with resilient fallbacks to DuckDuckGo and Wikipedia.
  • Automatic Decision: The agent detects when current info is needed, plans a search query, and executes the search.
  • Webpage Reading: Uses read_webpage(url) to inspect full articles or technical documentation from returned results.
  • Source Grounding: Clean hyperlinks and citation lists are appended to the response for verification.
โšก
13. Autonomous Self-Correction (Auto-Fix Sandbox Errors)
Self-Healing โ–พ

Eliminate manual debugging cycles with real-time error reflection and autonomous code healing:

  • Runtime Exception Trapping: Captures uncaught exceptions, promise rejections, syntax errors, and Python tracebacks with line-accurate telemetry.
  • Autonomous Repair Pipeline: The agent inspects the broken code, diagnoses the root cause, and synthesizes a hardened patch without user intervention.
  • Single-Click Auto-Fix: When an error occurs in the sandbox, click Auto-Fix to let Ghost Writer rewrite the code and hot-reload the running sandbox.
  • Chat Diagnostic Fallback: If API keys are paused, transfers the exact error trace into the chat composer with one tap.
๐Ÿ
14. In-Browser Python Execution via Pyodide (WebAssembly)
Python Wasm โ–พ

Execute real Python scripts in your browser with zero server dependencies or containers:

  • WebAssembly Sandboxing: Official Pyodide CPython 3.12 engine running safely client-side in WebAssembly.
  • Standard Library & Math: Full support for math, json, random, re, datetime, algorithms, data analysis, and simulated security tooling.
  • Live Stdio Stream: Standard output (sys.stdout) and errors (sys.stderr) stream directly into the live sandbox console.
  • Graphical & HTML Rendering: Generates HTML reports, ASCII tables, and dynamic visual output in the sandbox frame.
๐Ÿ’ฌ
15. Direct Sandbox-to-Chat Feedback Loop
Interactive Tool โ–พ

Seamless bidirectional feedback bridge between the live visual sandbox and the reasoning agent:

  • Context-Preserving Feedback: Click Feedback to Chat to bundle current artifact code, language runtime, and console logs into chat.
  • Guided Refactoring Presets: Instantly launch one-click workflows for UI modernization, dark theme polish, red team audits, and architecture cleanup.
  • Zero Copy-Paste Friction: Never manually copy code back and forth between browser tabs. Ghost Writer keeps state synchronized.
๐Ÿ”Œ
16. Model Context Protocol (MCP) Server Support
MCP Protocol โ–พ

Ghost Writer supports Anthropic's open Model Context Protocol (MCP 2024-11-05) client-side without needing Supabase or external servers:

  • Zero Server Infrastructure Needed: Connect directly to remote MCP servers via JSON-RPC 2.0 over HTTP POST or SSE stream.
  • Dynamic Tool Discovery: Queries tools/list from any connected server, registers the tools into the agent's function-calling registry, and executes them over tools/call.
  • Built-in Utilities: Comes pre-loaded with an in-memory MCP suite (advanced math calculator, international timezone converter, text analytics, UUID generation).
  • Interactive Playground: Test any discovered MCP tool manually in Settings โ†’ MCP Servers before executing them via agent reasoning.
๐ŸŽญ Saved Prompts & Persona Library
Curated agent personas, custom prompt templates, and system directives
Active Agent System Prompt Directive 0 chars
Sandbox
Ready
Sandbox Console Live stdio
Clear
[System] Sandbox initialized. Output will appear here.
Code Inspector (HTML / CSS / JS)
0 chars
Ghost Writer

Ghost Writer

v2.5.0 โ€ข Autonomous Agent, Pyodide Wasm & Self-Correction Engine

An uncensored, zero-telemetry, autonomous artificial intelligence agent built by DIGITAL GHOST. Equipped with structured tool use, real-time web search, vector document retrieval (Agentic RAG), in-browser Python WebAssembly execution, and autonomous self-healing code repair. Visit www.digitalghost.blog.

Core Architecture & Philosophy

๐Ÿค–

ReAct Agentic Loop

Executes continuous autonomous cycles: Think (Reasoning tokens) โ†’ Act (Structured Tool Calls) โ†’ Observe (Inspect outputs) โ†’ Respond with verified citations.

โšก

Autonomous Self-Correction

Live exception trapper captures sandbox runtime crashes and tracebacks. Ghost Writer autonomously diagnoses bugs, rewrites the code, and verifies hot-reloaded artifacts.

๐Ÿ

Pyodide WebAssembly Python

Runs real CPython 3.12 100% in-browser with zero server reliance. Streams stdout/stderr live and renders dynamic output in the sandbox frame.

๐Ÿ’ฌ

Direct Sandbox Feedback Loop

One-click bidirectional bridge feeds artifact code, active language, and console logs directly into chat for iterative refactoring, styling, or feature expansion.

๐Ÿ“š

Multi-Format Knowledge RAG

Drag-and-drop PDFs, TXT, Markdown specs, JSON, and CSVs. Parsed directly in the browser and queried autonomously by the agent via vector retrieval.

๐ŸŒ

Live Web Search via Purili

Real-time internet search with zero API keys required. Fetches live web pages, documentation updates, and breaking news on demand.

๐Ÿ”Œ

Model Context Protocol (MCP)

Direct JSON-RPC 2.0 client connecting to external or local tool servers over HTTP & SSE without Supabase or middleman proxies. Discovered tools register dynamically.

๐Ÿ”’

Client-Only Confidentiality

Runs 100% inside your browser. No middleman proxies, tracking cookies, or prompt databases. Your API key and knowledge base never leave your device.

๐ŸŽ๏ธ

Dynamic Nitro Routing

Orchestrates OpenRouter high-throughput pipelines, latency sorting, and provider auto-fallbacks for sustained 200+ tokens/sec speeds.

Capabilities & Feature Matrix

๐Ÿง 

Reasoning & Thinking Tokens

Native chain-of-thought support for DeepSeek-R1, Gemini Flash Thinking, and Claude 3.7 with live thought trace timers.

๐Ÿ“

Multi-Format Knowledge Ingestion

Drag-and-drop or batch upload PDFs, Markdown documentation, JSON datasets, CSVs, and source code files into persistent vector storage.

๐Ÿ’ป

Multi-Language Synthesis

Writes end-to-end runnable code in Python, JavaScript, TypeScript, Rust, Go, C, C++, Bash, SQL, Ruby, and HTML/CSS.

๐ŸŽฏ

Persona Presets

One-click tuning for Autonomous Web Researcher, Document RAG Analyst, Speed Coding, and Offensive SecOps.

๐Ÿ“Š

Context & Token Precision

Real-time conversation token estimation, model context boundary alerts, and visual warnings before truncation limits.

๐Ÿ’พ

Research Export & Backup

One-click research report exports as formatted JSON, plus full state backup and migration without exporting sensitive keys.

Supported Ecosystems & Model Families

Google Gemini 2.0 Flash Google Gemini 2.5 Pro Anthropic Claude 3.5 Sonnet Anthropic Claude 3.5 Haiku DeepSeek R1 (Reasoning) DeepSeek V3 (Chat) Meta Llama 3.3 70B Nitro Nous Hermes 3 405B Dolphin Mixtral 8x22B xAI Grok 3 OpenAI GPT-4o OpenAI o1-mini Mistral Large Qwen 2.5 Coder
Designed & Released by DIGITAL GHOST โ€ข www.digitalghost.blog โ€ข Version 2.5.0 (Pyodide Wasm & Self-Correction Engine)