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