Skip to content

LOCAL GUARDRAILS FOR AI CODING AGENTS

Catch risky actions.
Keep useful work moving.

AgentLint checks proposed file changes and shell commands in supported agent workflows. It can block a risky action, explain the finding, and let the agent correct its next step.

A 53-second overview: what AgentLint checks, one blocked write, a useful correction, and setup. The demonstration evaluates proposed operations as data; it does not execute them or claim a test pass.

Start in your repository

Install with Python 3.11 or newer, then run setup from the project you want to protect:

uv tool install agentlint
cd your-project
agentlint setup codex

Use claude, cursor, gemini, continue, kimi, or grok for another native integration. Restart your agent, follow its hook trust instructions, and make a tool call before checking observation:

agentlint status

The quickstart walks through installation and a first block. The agent setup guides explain each integration's coverage and verification steps.

A blocked mistake should have a next step

A proposed credential assignment in a source file can produce this finding:

[no-secrets] Secret assignment detected: api_key=...
  -> Use environment variables instead of hard-coded secrets.

The agent receives a concrete correction while it is still working. It can revise the proposed change to read a credential from the environment, then let AgentLint evaluate the new action. Under standard severity, errors block; warnings advise. Integration coverage varies by agent.

Choose the next guide

Connect your agent

Start with the native setup and confirm that AgentLint receives hook calls.

Claude Code · Codex · Cursor · Gemini CLI

All integrations

Set your project policy

Inspect the rules, tune paths and options, and use the same checks in CI.

Rules · Configuration · CI · Diagnostics

Agents

How to connect each coding agent, what gets checked and how to verify it.

Agent Guide Integration
Claude Code agents/claude.md Native hooks (also available as a marketplace plugin)
Codex agents/codex.md Native hooks, including apply_patch inspection
Cursor agents/cursor.md Native hooks
Gemini CLI agents/gemini.md Native hooks
Continue agents/continue.md Native hooks
Kimi Code CLI agents/kimi.md Native hooks
Grok CLI agents/grok.md Native hooks
OpenAI Agents SDK agents/openai-agents.md Guardrail code
MCP hosts agents/mcp-hosts.md MCP server
Anything else agents/generic.md JSON in, decision out

Checks that fit your project

Core packs cover common file and command patterns. Language packs add project checks; the security pack is opt-in, and the autopilot pack is experimental. Examples include hard-coded secrets, destructive commands, test weakening, and CI configuration changes. The rule reference lists their exact scope and options.

Hook checks run locally. The optional AgentChute service provides cloud features when configured; its guide explains the data sent. You can also write custom rules for repository-specific needs.

AgentLint is a rule and heuristic layer. It can miss behavior, flag legitimate actions, and be bypassed by a process with broad access. Keep code review, tests, CI, and least-privilege credentials in place. Use diagnostics and narrow configuration adjustments when a finding needs investigation.

Using AgentLint

Extending AgentLint

Read more

Source and issues on GitHub · Releases · Changelog