What is AgentGuard?
AgentGuard is an offline-first, zero-configuration codebase safety extension for Visual Studio Code. It functions as an invisible safety companion that continuously observes code edits in memory as you type—before files are saved, committed, or deployed.
Whether code is edited manually or generated by AI coding assistants (GitHub Copilot, Cursor, Claude Code, ChatGPT, or Windsurf), AgentGuard instantly evaluates:
- Untouched File Blast Radius: Did changing an export break dependent files that were never opened in your current editor session?
- Critical Logic Deletions: Did an automated refactoring prompt accidentally strip an
@login_required decorator, an authorization check, an input validation schema, or an error handler?
- Silent Behavior Regressions: Did an edit drop an
await (floating promise), swallow errors with an empty catch {}, or delete a database transaction rollback?
- Diagnostic Delta Tracking: Does this edit introduce brand new compiler errors, or are they pre-existing baseline issues?
Why AgentGuard? (How it Complements Your Workflow)
Developers frequently ask how AgentGuard compares to traditional linters, diagnostics plugins, and Git extensions. AgentGuard is not a generic linter and does not replace your existing tools—it is the missing safety layer that works alongside them:
| Capability |
ESLint / Prettier |
Error Lens |
GitLens |
SonarQube |
AgentGuard |
| Primary Scope |
Style, formatting, single-file AST syntax |
Inline rendering of language server squigglies |
Git history, blame annotations, commit context |
Heavy CI server scans, remote rules, cloud accounts |
In-memory codebase safety as you type |
| Untouched File Blast Radius |
❌ No |
❌ No |
❌ No |
⚠️ Post-commit only |
✅ Yes (Instant cross-file impact) |
| Dropped Auth / Security Guards |
❌ No |
❌ No |
❌ No |
⚠️ Generic SAST |
✅ Yes (Diff-aware logic watchdog) |
| Silent Regressions (Floating Promises, Swallowed Catches) |
⚠️ Partial |
❌ No |
❌ No |
⚠️ Complex rules |
✅ Yes (Immediate behavioral diff) |
| Zero-Config, 100% Offline |
⚠️ Config needed |
✅ Yes |
⚠️ Cloud features |
❌ Server needed |
✅ 100% Local, zero configuration |
| AI Agent Guardrails |
❌ No |
❌ No |
❌ No |
❌ No |
✅ Built for AI multi-file edits |
Analogy:
- Prettier & ESLint ensure your code is cleanly formatted and follows syntax conventions.
- Error Lens makes existing compiler errors obvious on the current line.
- GitLens shows you who wrote the code and when.
- AgentGuard prevents you or an AI agent from breaking dependent files across the repository or accidentally dropping an authentication guard.
Core Capabilities
1. True Live Monitoring While Typing
- Responds to in-memory document modifications via an adaptive 50ms debounce pipeline.
- Does not wait for file saving, tab switching, or manual refreshing.
- Employs a strict stable baseline engine (Git HEAD / disk state): findings remain stable throughout your typing strokes and automatically resolve the instant you restore safety guards.
2. Untouched File Blast-Radius Engine
- When you rename a function, modify an export signature, or delete a type definition, AgentGuard immediately analyzes the AST dependency graph.
- Untouched consumer files broken by the provider diff are flagged instantly with exact call-site line numbers and impact counts.
3. Critical Logic & Safety Watchdog
Detects suspicious deletion or weakening of vital application safeguards:
- Authentication: Removed JWT verification, dropped middleware (
$this->middleware('auth'), passport.authenticate), or deleted decorators (@login_required, [Authorize]).
- Authorization: Removed role checks, permissions, or tenant isolation guards.
- Input Validation: Stripped schema validators (Zod, Joi, Yup, class-validator) or missing sanitization.
- Error Handling: Newly introduced empty
catch {} blocks, dropped transaction rollbacks, or deleted error re-throws.
- Silent Regressions: Removed
await operators creating unhandled floating promises.
4. Dual Native UI Experience
- Activity Bar Sidebar: Clean, minimal, native-themed interface with responsive 2-column filter cards (New Issues, Critical Risks, Affected Files, Resolved) and category accordions.
- Dedicated Issues Panel: Master-detail investigation view registered alongside Problems and Terminal (
AgentGuard Issues). Explains findings via a structured 6-question root-cause breakdown (What happened?, Why?, What changed?, What is affected?, How to fix it?, Verification State) with one-click [Copy AI Fix Prompt] and [Apply Quick Fix] actions.
5. 100% Offline & Zero Telemetry
- Runs completely in local Node.js / VS Code extension runtime.
- Zero API keys, zero cloud services, zero external network requests, zero telemetry trackers.
- All reports sanitize API keys, JWTs, and credentials before writing to disk.
Interactive Demo (Try in 10 Seconds)
Experience AgentGuard's real-time safety pipeline without touching any of your real project files:
- Open the Command Palette (
Ctrl+Shift+P on Windows/Linux, Cmd+Shift+P on macOS).
- Run:
AgentGuard: Try Interactive Demo
- An isolated sandbox simulation launches in your system temporary directory. It demonstrates:
- A breaking contract modification affecting an untouched consumer file.
- An accidental removal of an authentication guard (
verifyToken).
- The interactive Issues Panel opening automatically with root-cause explanations.
- Automatic verification and resolution when the fix is simulated.
Supported Languages & Capability Tiers
AgentGuard ships with built-in adapters for 11 programming languages. All adapters function 100% offline without requiring external CLI tools or language servers:
| Language |
Support Level |
File Extensions |
Manifest Indicators |
Real-Time Scope & Capabilities |
| TypeScript |
Tier 1 (Deep AST) |
.ts, .tsx, .mts, .cts |
tsconfig.json |
Full AST lexical scope parsing, interface contracts, symbol differ, JSX, imports/exports, watchdog checks. |
| JavaScript |
Tier 1 (Deep AST) |
.js, .jsx, .mjs, .cjs |
package.json, jsconfig.json |
AST lexical scope resolution, CommonJS/ESM modules, React hooks, destructured callback tracking. |
| Python |
Tier 2 (Structural) |
.py, .pyi |
pyproject.toml, requirements.txt, setup.py |
@login_required decorators, try/except removals, method signature differ, diagnostic delta correlation. |
| PHP |
Tier 2 (Structural) |
.php |
composer.json |
Laravel/Symfony middleware tracking, auth guard removals, class/method differ. |
| Dart |
Tier 2 (Structural) |
.dart |
pubspec.yaml |
Flutter widget hierarchy tracking, route guard validation, import graph diffs. |
| C# |
Tier 3 (Heuristic) |
.cs |
*.sln, *.csproj |
[Authorize] attribute tracking, controller route changes, Roslyn diagnostic deltas. |
| Go |
Tier 3 (Heuristic) |
.go |
go.mod |
if err != nil error check removals, exported function changes, gopls diagnostic deltas. |
| Rust |
Tier 3 (Heuristic) |
.rs |
Cargo.toml |
Module visibility tracking, Result/Option unwrap regressions, rust-analyzer deltas. |
| Java |
Tier 3 (Heuristic) |
.java |
pom.xml, build.gradle |
Spring Security annotations, exception handling differ, Javac diagnostic deltas. |
| C / C++ |
Tier 3 (Heuristic) |
.c, .cpp, .h, .hpp |
CMakeLists.txt, Makefile |
Header signature differ, structural null check removals, compiler diagnostic deltas. |
Installation & Quickstart
Quick Install (VS Code Quick Open)
Press Ctrl+P (macOS: Cmd+P) and paste:
ext install swe-jahid-agentguard.agentguard
From VS Code Extensions View
- Open VS Code and open the Extensions view (
Ctrl+Shift+X or Cmd+Shift+X).
- Search for
AgentGuard.
- Click Install.
- Open any workspace folder. AgentGuard activates automatically.
Workspace Recommendation (For Teams & Open-Source Projects)
To recommend AgentGuard to all team members and open-source contributors cloning your repository, add the extension identifier to your project's .vscode/extensions.json:
{
"recommendations": [
"swe-jahid-agentguard.agentguard"
]
}
Keyboard Shortcuts & Commands
Access these commands at any time from the Command Palette (Ctrl+Shift+P / Cmd+Shift+P):
| Command Title |
Command Identifier |
Description |
AgentGuard: Try Interactive Demo |
agentguard.tryInteractiveDemo |
Run safe isolated walkthrough demonstrating breaking contract & auth removal. |
AgentGuard: Scan Workspace |
agentguard.scanWorkspace |
Trigger an on-demand comprehensive codebase safety scan. |
AgentGuard: Open Problems Panel |
agentguard.openProblemsPanel |
Reveal the dedicated master-detail AgentGuard Issues Panel. |
AgentGuard: Focus Sidebar View |
agentguard.focusSidebar |
Focus the AgentGuard Activity Bar sidebar panel. |
AgentGuard: Generate Safety Report |
agentguard.generateReport |
Export sanitized .vscode/agentguard-report.md. |
AgentGuard: Clear Findings |
agentguard.clearFindings |
Clear active findings from UI session. |
AgentGuard: Pause/Resume Monitoring |
agentguard.toggleMonitoring |
Toggle background file change monitoring. |
Settings & Configuration
AgentGuard requires zero configuration by default, but provides fine-grained controls under Settings (Ctrl+, / Cmd+,) $\rightarrow$ Extensions $\rightarrow$ AgentGuard:
agentguard.enabled: Enable or disable AgentGuard monitoring (Default: true).
agentguard.autoReport: Automatically generate .vscode/agentguard-report.md on finding changes (Default: false).
agentguard.logLevel: Output logging verbosity: debug, info, warn, or error (Default: info).
AgentGuard is a free and open-source project licensed under the Apache License, Version 2.0. We welcome community contributions, language adapter improvements, and new security rules.
License
Copyright (c) 2026 Md. Jahidul Islam and AgentGuard Contributors.
Licensed under the Apache License, Version 2.0.
| |