A local, ChatGPT-style web interface wired to Ollama that supports Autonomous Agents (Tool Calling), abliterated models (uncensored), smooth real-time streaming, and a secure "Zero-Dependency" architecture (no external npm modules).
- ChatGPT-style UI (red-team theme): A faithful ChatGPT clone β sidebar with New chat, centered conversation column with user bubbles and assistant replies, an empty-state welcome with suggestion cards, a rounded composer, model picker, agent toggle and live status β all in a dark black-and-red "red team" skin. Live Markdown rendering (headings, lists, links, code blocks with copy buttons). Keyboard:
Entersends,Shift+Enternewline,Escstops a running request. - Chain of Thought: For reasoning models (Qwen3, etc.) the model's
thinkingstream is captured and shown in a collapsible Show reasoning block above the answer, instead of the UI appearing to hang. - Agent Engine (Tools): The model can run real actions on your machine when agent mode is enabled:
web_fetch: read articles from the internet (60s cache to avoid duplicate requests).web_search: search the web via DuckDuckGo (60s cache, redirect handling, link-extraction fallback).read_file/write_file/list_directory: operate on your filesystem (sandboxed).run_command: run commands in PowerShell (non-blocking, viaexecFile).
- Empty-response fallback: If the agent loop produces no visible output (e.g. a small or non-tool model that gets confused by the tool prompt), the server automatically answers once in plain chat mode so you always get a reply.
- Session persistence: Conversation history is stored on the server (in memory, 24h TTL). Opening a new tab restores the context automatically from the server without losing any messages.
- Agent rounds control: A numeric input (1β20) in the top bar controls how many tool rounds the agent may run per response, without editing files.
- Security (Sandboxing):
- Directory-traversal prevention (the model cannot escape the project directory).
- SSRF blocking for IPv4 and IPv6 (the model cannot scan your local network via
web_fetch). - Rate limiting with automatic memory cleanup and protection against oversized payloads.
- Type validation on every message field (
roleandcontent). - CSP headers to prevent XSS.
- Live selector: Switch models on the fly from the interface without restarting the server.
- Efficient streaming: The agent loop and chat mode share the same streaming core (
ollamaStreamRound) β no duplicated code. - Memory management: Sliding history window (last 20 messages) to avoid context overflow in long sessions.
- Disconnect cleanup: If the client closes the tab mid-response, the agent loop and the Ollama request are cancelled immediately.
- Built-in test suite: 59 tests with
npm testusing the native Node.js runner β no external dependencies.
Make sure you have installed:
Copy .env.example to .env and adjust the values for your setup:
copy .env.example .env| Variable | Default | Description |
|---|---|---|
APP_PORT |
4000 |
Web interface port |
OLLAMA_HOST |
127.0.0.1 |
Ollama host |
OLLAMA_PORT |
11434 |
Ollama port |
OLLAMA_MODEL |
richardyoung/qwen2.5-3b-instruct-abliterated |
Default model |
OLLAMA_NUM_GPU |
null (auto) |
GPU layers. 0 = force CPU |
LOG_LEVEL |
INFO |
Log level: DEBUG, INFO, WARN, ERROR |
Open your terminal (PowerShell or CMD) and pull the recommended models. The system auto-detects the ones you have installed.
# Option 1: Qwen3 8B abliterated β reasoning + tool calling, most complete (~6 GB VRAM)
ollama pull huihui_ai/qwen3-abliterated:8b
# Option 2: Josiefied-Qwen3 8B β uncensored without losing tool calling (~6 GB VRAM)
ollama pull goekdenizguelmez/JOSIEFIED-Qwen3:8b
# Option 3: Granite 4.1 3B abliterated β modern, with tools, ideal for standard PCs
ollama pull huihui_ai/granite4.1-abliterated:3b
# Option 4: NeuralDaredevil 8B β best classic 8B on the Open LLM Leaderboard (chat only, no tools)
ollama pull closex/neuraldaredevil-8b-abliterated
# Option 5: Abliterated 3B β for very low-resource PCs (default model)
ollama pull richardyoung/qwen2.5-3b-instruct-abliteratedImportant for Agent Mode: tools only work with models that support tool calling (Qwen2.5/Qwen3, Granite, Gemma families with a
toolstag). Classic Llama 3βbased models like NeuralDaredevil work in chat mode only.
(Note: make sure Ollama is running in the background, by default on port 11434.)
Run it directly:
node server.jsOr use the background control script (also wired to the npm scripts below):
python hack.py start # or: npm start
python hack.py status # ONLINE / OFFLINE + PID
python hack.py stop
python hack.py restartOpen your web browser and go to: π http://127.0.0.1:4000
npm testCovers: message validation, rate limiter, log levels, SSRF protection (20 isPrivateIP IPv4/IPv6 cases + 6 web_fetch guards), path sandboxing, file operations and command execution. No external dependencies β uses the native node:test runner.
This project does not require npm install because it uses only native Node modules (http, fs, path, etc.) for maximum speed and security.
cYHBeriteratus/
ββ server.js # HTTP routes, ollamaStreamRound, agent loop, sessions
ββ tools.js # Agent tools: sandboxing, cache, IPv4/IPv6 SSRF
ββ src/
β ββ config.js # Global config and environment variables
β ββ utils/
β β ββ logger.js # Structured logging, level via LOG_LEVEL
β ββ middlewares/
β ββ security.js # Rate-limiting (with auto-cleanup) and CSP headers
β ββ validator.js # role/content validation on messages
ββ public/
β ββ index.html # ChatGPT-style UI (sidebar, chat column, composer)
β ββ styles.css # Dark red-team theme
β ββ app.js # Frontend orchestrator (ES modules)
β ββ img/
β β ββ wrong.png # README cover / UI screenshot
β ββ modules/
β ββ session.js # Session handling: localStorage + server sync
β ββ ui.js # DOM refs, chat message rows, tool cards, thinking, status
β ββ stream.js # NDJSON streaming parser with callbacks
β ββ markdown.js # Dependency-free, CSP-safe Markdown renderer
ββ hack.py # Background server control: start/stop/status/restart
ββ tests/
β ββ validator.test.js
β ββ security.test.js
β ββ logger.test.js
β ββ tools.isPrivateIP.test.js
β ββ tools.ssrf.test.js
β ββ tools.files.test.js
β ββ tools.command.test.js
ββ detect-abliterated.py # Detects abliterated models via Ollama's REST API
ββ .env.example # Environment variable template
In the top bar you'll find a clickable Agent on/off chip and a rounds input (1β20).
- off: The model acts as a standard chatbot (normal, fast text responses).
- on: The model reasons before answering and may decide to use system tools (search the web, run scripts, etc.) to fulfill your request. Tool executions appear as inline tool cards, and reasoning models show their thinking in the collapsible Show reasoning block.
Tip: Agent mode needs a tool-calling model (e.g.
huihui_ai/qwen3-abliterated:8b). With a chat-only model, turn Agent off for the most reliable replies.
Note: Tools only work with tool-calling models (see the note in Download the models). If a model can't use tools, the agent falls back to a plain answer automatically.
Warning: The model can modify files inside the project. Use it at your own risk!
python detect-abliterated.pyQueries Ollama's REST API (/api/tags) and lists all installed abliterated models with their real size in GB/MB.
