agentcontract v0.0.1: A Portable JSON Permission Layer for AI Coding Agents

✍️ OpenClawRadar📅 Published: July 7, 2026🔗 Source
agentcontract v0.0.1: A Portable JSON Permission Layer for AI Coding Agents
Ad

agentcontract v0.0.1 is a tiny, MIT-licensed Python library that defines a portable JSON permission layer for AI coding agents. The core idea is a simple JSON contract that specifies which tools, paths, and network actions an agent is allowed to perform, independent of any specific agent runtime.

Key Features

  • Permission Contract: A JSON structure that lists allowed/denied tools, allowed/denied file paths, network access control, and tools requiring human approval.
  • agc gui: A new local browser UI for interactively writing, validating, and saving a contract, plus dry-running a proposed tool call against it.
  • Portable: The contract can be committed to a repo, code-reviewed like normal config, and reused across different agents/runtimes.
Ad

Example Contract

{
  "allow_tools": ["read_file", "write_file"],
  "deny_tools": ["shell"],
  "allow_paths": ["./src/"],
  "deny_paths": ["~/.ssh/", "~/.env"],
  "allow_network": false,
  "require_approval": ["shell"]
}

The contract enforces that an agent can only read/write files under ./src/, cannot execute shell commands (unless approved), and has no network access. Blocks access to sensitive paths like ~/.ssh/ and ~/.env.

Instead of trusting each tool's internal permission model, you define a single portable policy that any runtime can check before an action touches files, runs commands, calls APIs, or burns tokens.

Who It's For

Developers building agent tooling or running coding agents against real repos who want a boring, portable, and auditable permission layer.

📖 Read the full source: r/openclaw

Ad

👀 See Also

Claude Code vs. Codex: Real-World Build Test – 36 Files vs. 28, Infinite Loop, and $0.46 Cost Difference
Tools

Claude Code vs. Codex: Real-World Build Test – 36 Files vs. 28, Infinite Loop, and $0.46 Cost Difference

A developer pits Claude Code against Cursor's Codex on two real tasks: a PR triage bot and a WebSocket code review UI. Claude built 36 files in 12 minutes with zero TypeScript errors; Codex produced a working UI but hit an infinite React loop. Cost difference: ~$0.46.

OpenClawRadar
Nexus: Open-Source AI-to-AI Protocol with Discovery, Trust, and Payments
Tools

Nexus: Open-Source AI-to-AI Protocol with Discovery, Trust, and Payments

Nexus is a self-hosted protocol that enables AI agents to discover each other, negotiate terms, verify responses, and handle micropayments without human intervention. It includes five layers: discovery, trust, protocol, routing, and federation, with 66 tests and MIT licensing.

OpenClawRadar
Voxlert: Voice Notifications for Claude Code Sessions with Character Voices
Tools

Voxlert: Voice Notifications for Claude Code Sessions with Character Voices

Voxlert is a tool that hooks into Claude Code events and speaks notifications using distinct character voices like StarCraft Adjutant, SHODAN, GLaDOS, and HEV Suit. It uses an LLM via OpenRouter to generate in-character lines and runs locally with npm installation.

OpenClawRadar
AgentPVP: An agent-first competitive LLM arena with ELO, rivalries, and prompt-injection sandbox
Tools

AgentPVP: An agent-first competitive LLM arena with ELO, rivalries, and prompt-injection sandbox

AgentPVP lets LLM agents register, play 5 board games over JSON APIs, maintain per-game ELO, write rivalry files, and flame each other in a global lounge. HTML is optional — the API is the site.

OpenClawRadar