AGENTS-example

A project rule requiring shell commands to run through agentsh, a tool that executes commands inside a managed sandbox session.

In plain words
What is it for?
Use it when running tests, builds, scripts, or other shell commands in the project; each command must include the agentsh session syntax.
Why use it?
It makes command execution follow the project's required session and safety setup instead of running commands directly.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/canyonroad/agentsh/agents-example
Clone the repo
git clone --depth 1 https://github.com/canyonroad/agentsh
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 434 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00434
Opus 5 $0.00000 $0.00217
Sonnet 5 $0.00000 $0.00087
Haiku 4.5 $0.00000 $0.00043

Measured 2d ago against content hash 02602f1afec8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

AGENTS-example scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

examples/agents/AGENTS-example.md · 72 lines

What it actually says

Command Execution via agentsh

All shell commands in this project MUST be executed through agentsh.

When using the Bash tool, wrap every command with agentsh exec:

Required Syntax

agentsh exec SESSION_ID -- COMMAND [ARGS...]

The -- separator is required between the session ID and the command.

Examples

Instead of:

ls -la
npm install
go build ./...

Use:

agentsh exec my-session -- ls -la
agentsh exec my-session -- npm install
agentsh exec my-session -- go build ./...

When AGENTSH_SESSION_ID is set, pass all command arguments after exec:

export AGENTSH_SESSION_ID=my-session
agentsh exec -- ls -la
agentsh exec -- npm install

Auto-Creating Sessions

Use --root to auto-create a session if it doesn't exist:

agentsh exec my-session --root /path/to/workspace -- ls -la

Or set the environment variable:

export AGENTSH_SESSION_ROOT=/path/to/workspace
agentsh exec my-session -- ls -la

Common Flags

Flag Description
--timeout 30s Command timeout (e.g., 30s, 5m)
--output json JSON structured output
--stream Stream output as produced
--pty Interactive PTY mode

Environment Variables

Variable Description
AGENTSH_SESSION_ID Default session ID (avoids passing as argument)
AGENTSH_SESSION_ROOT Root directory for auto-creating sessions
AGENTSH_SERVER Server URL (default: http://127.0.0.1:18080)
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 72 lines · 0 tokens per session scan A 02602f1afec8

Subscribe to this mod's changes

AGENTS-example is an agent published in the GitHub repository canyonroad/agentsh (378 stars, last pushed 26d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 434 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

team-reviewer

Multi-dimensional code reviewer that operates on one assigned review dimension (security, performance, architecture, testing, or accessibility) with structured finding format. Use when performing parallel code reviews across multiple quality dimensions.

wshobson/agents · 43 tokens

backend-api-security-backend-security-coder

Expert in secure backend coding practices specializing in input validation, authentication, and API security. Use PROACTIVELY for backend security implementations or security code reviews.

wshobson/agents · 40 tokens

agent-orchestration-context-manager

Elite AI context engineering specialist mastering dynamic context management, vector databases, knowledge graphs, and intelligent memory systems. Orchestrates context across multi-agent workflows, enterprise AI systems, and long-running projects with 2024/2025 best practices. Use PROACTIVELY for complex AI…

wshobson/agents · 66 tokens

basic-agents

A basic agent uses a predefined strategy with a simple execution flow that works for most common use cases. It accepts a string input (a question, request, or task description) and sends this input to the configured LLM. The LLM may decide to call provided tools. The agent will execute the tools and send the results…

JetBrains/koog · 0 tokens

cli-flags

A new flag touches only the layers that need to understand it. Stop at the layer where it stops mattering — threading it further is the common failure, not stopping too early.

callstack/agent-device · 0 tokens

explainer

Code explanation and architecture walkthroughs. Helps developers understand complex code and systems.

AgentWorkforce/relay · 18 tokens