openhands

An OpenHands integration that adds ToolShield safety instructions as an always-active microagent. OpenHands is an open-source platform where AI agents perform software-development tasks, and a microagent is a small instruction file loaded into the agent's context.

In plain words
What is it for?
Use it to import safety instructions for tools such as databases, terminals, or files into OpenHands, or to remove those instructions later.
Why use it?
It keeps imported tool-safety guidance available to the agent without requiring a keyword or manual activation for each task.

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/pegasi-ai/reins/openhands
Clone the repo
git clone --depth 1 https://github.com/pegasi-ai/reins
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 363 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.00363
Opus 5 $0.00000 $0.00181
Sonnet 5 $0.00000 $0.00073
Haiku 4.5 $0.00000 $0.00036

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

Security

Grade A, and why

openhands 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.

src/core/toolshield/docs/agents/openhands.md · 62 lines

What it actually says

ToolShield + OpenHands

OpenHands is an open-source AI-driven development platform. ToolShield injects safety guidelines as a microagent that is always loaded into the agent's system prompt.

How It Works

OpenHands supports microagents — specialized markdown files that enhance agents with domain-specific knowledge. ToolShield creates a user-level microagent at ~/.openhands/microagents/toolshield.md with type: repo, which means it is always active (no keyword triggers needed).

Import

toolshield import \
  --exp-file postgres-mcp.json \
  --agent openhands

You can import multiple tools — each appends to the same microagent file:

toolshield import --exp-file terminal-mcp.json --agent openhands
toolshield import --exp-file filesystem-mcp.json --agent openhands

Unload

toolshield unload --agent openhands

This deletes the toolshield.md microagent file entirely.

File Location

Platform Path
All ~/.openhands/microagents/toolshield.md

Microagent Format

The generated file follows the OpenHands microagent spec:

---
name: toolshield
type: repo
version: 1.0.0
agent: CodeActAgent
---

## Guidelines from Previous Experience
...

Disabling Without Unloading

You can temporarily disable the microagent without deleting it by adding to your OpenHands config.toml:

[agent]
disabled_microagents = ["toolshield"]
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 · 62 lines · 0 tokens per session scan A 73eebe006837

Subscribe to this mod's changes

openhands is an agent published in the GitHub repository pegasi-ai/reins (408 stars, last pushed 3mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 363 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.