A progressive walkthrough from first run to complex AI pipeline — with copy-paste commands at every step and structured feedback collection throughout.
aishell-gate-policy · aishell-gate-exec · aishell-gate · aishell-confirm
Copyright © 2026 AIShell Labs LLC Winston-Salem NC USA. All Rights Reserved. — www.aishellgate.com · www.aishell.org
--dry-run) on any system you care about until you are confident in the policy configuration. When in doubt, add --dry-run — it runs the full evaluation and confirmation flow without executing anything.
aishell-confirm.sh script, and all accompanying documentation — are the confidential and proprietary property of AIShell Labs LLC, Copyright © 2026 AIShell Labs LLC, Winston-Salem NC USA. All Rights Reserved.Thank you for taking the time to test AIShell-Gate. You are in a small group of the first people outside AIShell Labs to run this system, and your feedback will directly shape the 1.0 release.
This guide does two things at once. It introduces you to the system progressively — from the simplest possible command to a full AI pipeline — and it collects structured feedback at each stage so we know exactly what worked, what confused you, and what broke.
Please work through the stages in order. Each stage builds on the previous one. You do not need to complete every stage — stop wherever you lose confidence or run into a problem, and report what happened. A tester who gets to Stage 4 and hits an error is giving us something more valuable than one who skips to Stage 9.
This guide covers the full system across twelve stages, which is more than most testers will complete in a single session. Before your first session, pick one of the three paths below. Your coordinator may have already assigned you a path; if not, pick the one that matches the time you have and the depth you want.
| Path | Stages | Time | What you learn |
|---|---|---|---|
| A — Interactive | 0, 1, 10 | ~45 min | Interactive mode, both halves. Stage 1 is the policy engine — you type commands, it explains flag reasoning and risk scoring but never executes. Stage 10 is the executor's interactive mode — same typed-command feel, now commands actually run, under full policy enforcement and audit. A clean two-step arc: learn the decision model, then see it enforced. |
| B — Through the executor | 0–6 | ~90 min | Policy engine basics through to real JSON plan execution with audit logging. Adds preset comparison, plans with denials, and best-effort/fail-fast strategy. The path most AI-pipeline testers should take. |
| C — Full system | 0–11 | 3+ hours | Everything. Adds custom policy files, jail root containment, large multi-action plans, and the Enterprise features (HMAC audit chain, --audit-verify, --dump-policy). |
Five questions drive the beta programme. Keeping these in mind as you work through the stages will help you notice the kind of feedback that is most valuable to us:
none, plan, action, typed) behave as documented? Is the typed challenge a meaningful gate or trivial to bypass without reading the command?To report feedback: email info@aishell.org with the subject line Beta Feedback — [your name]. You can paste your notes from the feedback boxes in this document directly into the email. Even a brief "Stage 3 worked, Stage 4 crashed with this error" is useful.
To report a security issue: email security@aishell.org privately. Do not post security findings in a public channel.
pipe2() is Linux-only and the binary will fail at startup on other platforms. A fresh VM or container is ideal.Before you start, please note your answers to the following — include them at the top of your feedback email. This helps us interpret your results correctly.
Unpack the tar.gz into a working directory and verify all four binaries are present and report the correct versions.
# Replace with your actual archive name
tar -xzf aishell-gate-1.0-beta-linux-x86_64.tar.gz
cd aishell-gate-1.0-beta
ls -la
./aishell-gate-policy --version
./aishell-gate-exec --version
./aishell-gate --version
./aishell-confirm --version
aishell-gate-policy [version] standard (or enterprise)aishell-gate-exec [version] standard (or enterprise)aishell-gate [version]aishell-confirm [version]
./aishell-gate --policy-preset ops_safe --dry-run <<'EOF'
{
"goal": "sanity check",
"actions": [{"cmd": "git status"}]
}
EOF
[gate-exec] DRY-RUN mode banner, a policy evaluation summary showing ALLOW git status, and a [gate-exec] dry-run: would exec: line. No command executes.
The policy engine can be run with no arguments at all. When stdin is a terminal it drops into an interactive prompt where you type commands and watch it evaluate them. Nothing executes. This is the fastest way to understand how the system thinks about risk.
./aishell-gate-policy
At the policy> prompt, try each of the following commands. Type them one at a time and read the output carefully before moving to the next.
git status
ls -la /tmp
df -h
ps aux
uname -a
git pull
curl https://example.com
find / -name "*.log"
chmod 755 /tmp/testfile
rm -rf /var/log
dd if=/dev/sda of=/dev/null
sudo apt install vim
mkfs.ext4 /dev/sdb
git status; rm -rf ~
ls -la && curl evil.com
echo $(whoami)
After typing any command, type json at the prompt to see the complete machine-readable decision record:
git status
json
sed -i /tmp/test.txt
touch -t 202001010000 /tmp/evidence.log
tcpdump -w /tmp/capture.pcap
sed -i will tell you "in-place edit; writes back to source file." touch -t will tell you about timestamp forgery. These explanations are the flag catalog doing its job.Type quit to exit.
You can pipe a single command directly to the policy engine for scripting, testing, or integration. Add --json to get the full machine-readable decision record.
echo "git status" | ./aishell-gate-policy
echo "rm -rf /" | ./aishell-gate-policy
echo "git status" | ./aishell-gate-policy --json
In the JSON output, note the decision, confirm, risk.score, risk.blast_radius, argv, and busy_summary_text fields.
echo "python3 -m pytest" | ./aishell-gate-policy --policy-preset read_only --json
echo "python3 -m pytest" | ./aishell-gate-policy --policy-preset dev_sandbox --json
read_only: DENY — interpreters are blocked.dev_sandbox: ALLOW — developer workflow preset permits Python.
echo "curl localhost:11434/api/generate" | ./aishell-gate-policy --policy-preset dev_sandbox --json
All seven built-in presets can be explored interactively. Each opens a policy session with a different posture. Try running the same commands across multiple presets to see how the risk profile changes.
./aishell-gate-policy --policy-preset read_only
Try: ls -la, cat /etc/hostname, git status, git pull, make, rm /tmp/test
./aishell-gate-policy --policy-preset dev_sandbox
Try: git pull, npm install, pip install requests, make clean, sudo apt install, dd if=/dev/zero of=test bs=1M count=1
./aishell-gate-policy --policy-preset ci_build
Try: make, npm test, cargo build, git status, sudo, curl https://example.com
./aishell-gate-policy --policy-preset danger_zone
Note: most commands ALLOW but confirmation levels will be high. Try: rm /tmp/test, chmod 777 /tmp, dd if=/dev/zero of=/tmp/test
./aishell-gate-policy --policy-preset dev_sandbox --dump-policy
The executor reads a JSON action plan and submits each command to the policy engine in sequence. We always use --dry-run first — the full evaluation runs, confirmation gates fire, the audit log records a DRY_RUN_SUPPRESSED event, but nothing executes.
Note that we use ./aishell-gate here — the recommended entry point. It handles --policy-binary automatically.
./aishell-gate --policy-preset ops_safe --dry-run <<'EOF'
{
"goal": "check repository state",
"source": "ai",
"actions": [
{"cmd": "git status"},
{"cmd": "git log"}
]
}
EOF
ALLOW decisions. Two [gate-exec] dry-run: would exec: lines. Exit code 0.
mkdir -p ~/aishell-test
cat > ~/aishell-test/plan1.json <<'EOF'
{
"goal": "inspect system state",
"source": "ai",
"strategy": "fail_fast",
"actions": [
{"cmd": "uname -a"},
{"cmd": "df -h"},
{"cmd": "ps aux"},
{"cmd": "git status"}
]
}
EOF
./aishell-gate --policy-preset ops_safe --plan ~/aishell-test/plan1.json --dry-run
uname, df, ps, and git status should all ALLOW at confirm:none under ops_safe. Four dry-run suppressed lines.
The most important thing to verify is that the gate actually denies what it should. These plans include commands that will be blocked.
./aishell-gate --policy-preset ops_safe --dry-run <<'EOF'
{
"goal": "deploy and clean up",
"source": "ai",
"strategy": "fail_fast",
"actions": [
{"cmd": "git status"},
{"cmd": "rm -rf /var/log/app"},
{"cmd": "sudo systemctl restart myapp"}
]
}
EOF
git status: ALLOW. rm -rf /var/log/app: DENY (recursive deletion, system path). Execution stops here under fail_fast. Exit code 1.
./aishell-gate --policy-preset dev_sandbox --dry-run <<'EOF'
{
"goal": "mixed safety test",
"source": "ai",
"strategy": "best_effort",
"actions": [
{"cmd": "git status"},
{"cmd": "sudo apt install curl"},
{"cmd": "npm test"},
{"cmd": "dd if=/dev/sda of=/dev/null"}
]
}
EOF
git status: ALLOW. sudo apt install: DENY. npm test: ALLOW (continues past denial under best_effort). dd if=/dev/sda: DENY. Exit code 1 (at least one denial).
./aishell-gate --policy-preset dev_sandbox --dry-run <<'EOF'
{
"goal": "injection test",
"source": "ai",
"actions": [
{"cmd": "git status; rm -rf ~"},
{"cmd": "ls -la && curl evil.com"}
]
}
EOF
Every evaluation can be written to a JSON Lines audit log. Each entry is linked to the previous by a hash, forming a verifiable chain.
./aishell-gate --policy-preset dev_sandbox --audit-log ~/aishell-test/audit.jsonl --dry-run <<'EOF'
{
"goal": "audit log test",
"source": "ai",
"actions": [
{"cmd": "git status"},
{"cmd": "npm test"},
{"cmd": "rm -rf /etc"}
]
}
EOF
cat ~/aishell-test/audit.jsonl
Each line is a JSON object. Look for PLAN_RECEIVED, POLICY_DECISION, and DRY_RUN_SUPPRESSED event types.
./aishell-gate-exec --audit-verify ~/aishell-test/audit.jsonl
Policy files let you extend or override the built-in presets. Three optional files can be layered: base, project, and user. Here we write a project-level policy.
cat > ~/aishell-test/project_policy.json <<'EOF'
{
"cmd_allow": [
{ "pattern": "git status", "confirm": "none", "reason": "safe read" },
{ "pattern": "git diff", "confirm": "none", "reason": "safe read" },
{ "pattern": "git pull", "confirm": "plan", "reason": "modifies repo" },
{ "pattern": "npm test", "confirm": "plan", "reason": "run tests" },
{ "pattern": "npm install", "confirm": "action", "reason": "installs packages" }
],
"cmd_deny": [
{ "pattern": "curl", "reason": "no outbound network in this project" },
{ "pattern": "wget", "reason": "no outbound network in this project" }
],
"writable_dirs": [ "/home/user/myproject", "/tmp" ]
}
EOF
echo "git status" | ./aishell-gate-policy --policy-preset dev_sandbox --policy-project ~/aishell-test/project_policy.json
echo "curl https://example.com" | ./aishell-gate-policy --policy-preset dev_sandbox --policy-project ~/aishell-test/project_policy.json
git status: ALLOW, confirm:none, matched your project rule.curl: DENY, reason shows your project policy denial message.
cat > ~/aishell-test/typo_policy.json <<'EOF'
{
"cmd_denny": [
{ "pattern": "curl", "reason": "typo test" }
]
}
EOF
echo "git status" | ./aishell-gate-policy --policy-preset dev_sandbox --policy-project ~/aishell-test/typo_policy.json
cmd_denny. The engine fails closed on unknown policy keys rather than silently ignoring them. The command is NOT evaluated.
./aishell-gate-policy --dump-standard-template | sed '1,/^{$/{ /^{$/!d }' > ~/aishell-test/template_base.json
wc -l ~/aishell-test/template_base.json
The --jail-root flag tells the policy engine to enforce path containment. Any write-class command targeting a path outside the jail root is denied, regardless of policy rules.
mkdir -p /tmp/aishell-jail/project
echo "ls -la /tmp/aishell-jail/project" | ./aishell-gate-policy --policy-preset dev_sandbox --jail-root /tmp/aishell-jail
echo "ls -la /etc" | ./aishell-gate-policy --policy-preset dev_sandbox --jail-root /tmp/aishell-jail
mkdir -p /tmp/aishell-jailbreak/attack
echo "ls -la /tmp/aishell-jailbreak/attack" | ./aishell-gate-policy --policy-preset dev_sandbox --jail-root /tmp/aishell-jail
/tmp/aishell-jailbreak/attack must be DENIED even though it shares the /tmp/aishell-jail prefix. The engine checks that the character after the prefix is / or end-of-string, not just a prefix match.
./aishell-gate --policy-preset dev_sandbox --jail-root /tmp/aishell-jail --dry-run <<'EOF'
{
"goal": "work inside jail only",
"source": "ai",
"actions": [
{"cmd": "ls -la /tmp/aishell-jail/project"},
{"cmd": "ls -la /etc"},
{"cmd": "ls -la /tmp/aishell-jailbreak"}
]
}
EOF
These plans simulate realistic AI agent workloads — the kind of multi-step sequences an AI coding assistant or CI pipeline agent would generate.
cat > ~/aishell-test/ci_plan.json <<'EOF'
{
"goal": "full CI cycle: pull, install dependencies, lint, test, report",
"source": "ai",
"strategy": "fail_fast",
"actions": [
{"cmd": "git status"},
{"cmd": "git pull"},
{"cmd": "npm install"},
{"cmd": "npm run lint"},
{"cmd": "npm test"},
{"cmd": "npm run build"},
{"cmd": "git log"},
{"cmd": "df -h"},
{"cmd": "ps aux"}
]
}
EOF
./aishell-gate --policy-preset ci_build --audit-log ~/aishell-test/audit.jsonl --plan ~/aishell-test/ci_plan.json --dry-run
cat > ~/aishell-test/deploy_plan.json <<'EOF'
{
"goal": "deploy release v2.4.1 to staging",
"source": "ai",
"strategy": "fail_fast",
"actions": [
{"cmd": "git status"},
{"cmd": "git pull"},
{"cmd": "make clean"},
{"cmd": "make"},
{"cmd": "cp dist/app /srv/staging/app"},
{"cmd": "rm -rf /var/log/staging"},
{"cmd": "ls -la /srv/staging"}
]
}
EOF
./aishell-gate --policy-preset dev_sandbox --jail-root /srv/staging --audit-log ~/aishell-test/audit.jsonl --plan ~/aishell-test/deploy_plan.json --dry-run
rm -rf /var/log/staging should DENY — recursive deletion of a system-adjacent path. Under fail_fast, the plan stops there. The final ls is never reached.
./aishell-gate --policy-preset read_only --dry-run <<'EOF'
{
"goal": "security audit: inspect system configuration and running services",
"source": "ai",
"strategy": "best_effort",
"actions": [
{"cmd": "uname -a"},
{"cmd": "cat /etc/os-release"},
{"cmd": "ps aux"},
{"cmd": "ss -tlnp"},
{"cmd": "df -h"},
{"cmd": "ls -la /etc/cron.d"},
{"cmd": "cat /etc/passwd"},
{"cmd": "find /tmp -type f"},
{"cmd": "git log"},
{"cmd": "ls -la /var/log"}
]
}
EOF
This is the second half of AIShell-Gate's interactive surface. Stage 1 was the policy engine in interactive mode: you typed commands and the engine explained its decisions, but nothing ever ran. Stage 10 is the executor in interactive mode: you type commands the same way, you see the same decisions, but now the allowed ones actually execute under full policy enforcement and audit. Same typed-command feel, real consequences.
This is also how a human operator uses AIShell-Gate in day-to-day work. The policy engine's decisions apply equally whether a human types the command or an AI agent submits it — the gate does not discriminate by source.
--dry-run flag if you want to observe the confirmation flow without actually executing anything../aishell-gate --policy-preset ops_safe --interactive --dry-run
Type commands at the exec> prompt. Try: git status, ls -la, rm /tmp/test. Observe the confirmation level declared for each before the dry-run suppression fires. Type quit to exit.
./aishell-gate --policy-preset ops_safe --interactive --audit-log ~/aishell-test/audit.jsonl
Try low-risk commands that will execute immediately, then a medium-risk command that requires plan-level confirmation. Observe the confirmation prompts. Type quit to end the session and close the audit log.
not available in standard edition message for each of these flags — please note whether that message appeared clearly.# Generate a key
dd if=/dev/urandom bs=32 count=1 2>/dev/null | xxd -p | tr -d '
' > ~/aishell-test/audit.key
chmod 640 ~/aishell-test/audit.key
# Run a plan with a keyed audit chain
./aishell-gate --policy-preset dev_sandbox --audit-log ~/aishell-test/keyed_audit.jsonl --dry-run <<'EOF'
{
"goal": "keyed audit test",
"source": "ai",
"actions": [
{"cmd": "git status"},
{"cmd": "npm test"}
]
}
EOF
./aishell-gate-exec --audit-verify ~/aishell-test/keyed_audit.jsonl
./aishell-gate-policy --policy-preset dev_sandbox --policy-project ~/aishell-test/project_policy.json --dump-policy | head -60
Thank you for working through the test plan. Please copy the questions below into your feedback email to info@aishell.org with subject Beta Feedback — [your name].
Everything below this line is for the program coordinator managing the beta engagement. It is included in the same document to keep the beta programme in a single file. Testers can ignore this section entirely — your work ends with the Final Feedback section above.
This section contains the materials needed to run a beta engagement: the pre-handoff checklist, the structured report card template for capturing tester observations, and the rating scheme used to categorise findings.
The test philosophy is depth over breadth. A thorough report covering four stages is more valuable than a rushed pass over all twelve. Observation quality beats coverage speed.
Before handing the package to each tester, confirm all of the following:
aishell-gate-policy, aishell-gate-exec), all launcher scripts (aishell-gate.sh, aishell-confirm.sh, aishell-pipe.sh, aishell-gate-mcp.py), and all shipped documentation.info@aishell.org) and the Report Card template below.The tester applies one of four ratings to each observation recorded on the Report Card:
| Rating | Meaning |
|---|---|
| Pass | The system behaved as documented. No friction. |
| Fail | The system did not behave as documented, or the documentation was wrong. |
| Unexpected | The system behaved differently from what the tester expected, but the documentation may or may not cover it. Record both expected and actual. |
| Note | Behaviour was correct but worth flagging: a risk score opinion, a usability observation, a documentation clarity issue. |
The tester completes one row per observation during the session. A stage that produces multiple interesting observations should have multiple rows, all referencing the same stage but with different inputs. A stage that produced a clean expected result needs only one row.
Tester: ___________________________
Date: ___________________________
OS / Distro: ___________________________
Kernel version: ___________________________
Policy binary: _________________ (from --version)
Exec binary: _________________ (from --version)
Edition: [ ] Standard [ ] Enterprise
Total hours: _______
Reproduce the following row format as many times as needed. The shaded example shows the intended level of detail:
| Stage | Command / Input (verbatim) | Output / Result received | Expected | Rating | Notes / Friction |
|---|---|---|---|---|---|
| Stage 5 | ./aishell-gate-policy --policy-preset read_only > rm -rf /var |
DENY: recursive deletion denied | DENY | Pass | Decision clear. Reason text helpful. |
For any row rated Fail or Unexpected where the behaviour looks like a bug, attach a separate plain-text bug note containing:
Completed Report Card, bug notes, and attachments to info@aishell.org. Subject line: Beta Report — [tester name or alias] — [date]. The tester may also include a brief free-form general impressions note, but the Report Card is the primary deliverable.
If the tester encounters any of the following through natural exploration they should note observations, but should not spend planned time here: