gitwtfhub

wtf is jailbreak-lab?

joshfischer1108/jailbreak-lab — explained in plain English

Analysis updated 2026-05-18

1TypeScriptAudience · developerComplexity · 3/5LicenseSetup · moderate

TL;DR

An educational red-teaming toolkit for testing how well locally-run AI models resist jailbreak and prompt injection attacks.

Mindmap

mindmap
  root((Jailbreak Lab))
    What it does
      Model jailbreak testing
      Agent injection testing
      Canary-safe by design
    Tech stack
      TypeScript
      Node.js
      Ollama
    Use cases
      Practice red teaming
      Compare models
      Study prompt injection
    Audience
      Developers
      Security learners
    Setup
      Install Ollama model
      npm install
      npm run dev

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Practice authorized red teaming of a locally-run LLM to learn common jailbreak techniques.

REASON 2

Compare how different open models resist the same jailbreak attempt side by side.

REASON 3

Learn how prompt injection can trick a tool-using AI agent into a forbidden action, using mock tools.

REASON 4

Study reasoning-trace leaks in models like DeepSeek R1 that expose a visible thinking channel.

What's in the stack?

TypeScriptNode.jsOllamaVite

How it stacks up

joshfischer1108/jailbreak-lab0xkinno/neuralvault0xmayurrr/ai-contractauditor
Stars111
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderatehardeasy
Complexity3/54/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires a locally running model via Ollama (or similar) and Node.js 20.19+.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

Wtf does this do

This project is a learning kit for practicing authorized security testing against AI language models that you run yourself on your own computer. It is meant for educational red teaming, meaning safely testing how well a model resists attempts to bypass its safety guardrails, not for attacking systems you do not own or have permission to test. It covers two categories of attack. The first is trying to trick the model itself into ignoring its own safety rules, using known techniques like pretending the request is fictional, asking the model to roleplay as a character without restrictions, or encoding the request in a different form. The second category targets AI agents that can use tools, showing how a hidden instruction buried in some content the agent reads can trick it into calling a tool it should not, like deleting something or leaking information. To keep this safe, the model is only ever asked to protect a fake secret, and any tools the agent can call are fake stand ins, so nothing real is ever exposed or damaged even when an attack succeeds. The tool works with any model that speaks the OpenAI-compatible API format, including popular locally run models like Llama, Mistral, Qwen, Gemma, and DeepSeek R1, run through software like Ollama, LM Studio, or vLLM. Because it works with many models, you can compare how differently each one resists the same attack, for example testing a reasoning focused model against a heavily safety tuned one and a lightly guarded one side by side. To try it, you first install and run a local model through Ollama, then start the included web app, which opens in your browser and connects to your local model automatically. The interface lets you attempt your own custom attacks, browse a catalog of known techniques, and watch each attempt happen in a live visual flow. It requires Node.js 20.19 or newer and is released under the MIT license.

Yoink these prompts

Prompt 1
Set up a local Ollama model and connect it to an OpenAI-compatible chat completions endpoint.
Prompt 2
Explain how a reasoning-trace attack could leak information through a model's visible thinking channel.
Prompt 3
Build a mock tool-using agent to demonstrate indirect prompt injection safely.
Prompt 4
Compare guardrail strength between a safety-tuned model and a lightly-guarded one on the same jailbreak prompt.

Frequently asked questions

wtf is jailbreak-lab?

An educational red-teaming toolkit for testing how well locally-run AI models resist jailbreak and prompt injection attacks.

What language is jailbreak-lab written in?

Mainly TypeScript. The stack also includes TypeScript, Node.js, Ollama.

What license does jailbreak-lab use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is jailbreak-lab to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is jailbreak-lab for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.