How to Organize Neural Network Agents in Your Project Without Chaos and Accidental rm -rf

One common problem often arises with autonomous AI assistants in code. You give the model access to the terminal and file system, ask it to build the project or fix a bug, and a couple minutes later it decides to clean the cache and deletes something valuable. Or it starts improvising, completely forgetting the architectural agreements you discussed an hour ago.
Repository vudovn/ag-kit offers a systematic solution to this problem. It's a ready-made set of contracts, rules, and tools for the Google Antigravity environment. It transforms chaotic neural network interactions into a predictable process with role separation and protection against dangerous actions.
What's Inside the Kit
After initialization, AG Kit creates a structure .agents/ in the project root. Inside you'll find declarative descriptions of specialized roles, skills, ready-made workflows, and long-term memory.
When a project opens in Google Antigravity, the environment reads this configuration. Instead of one universal chat-bot trying to do everything at once, tasks start getting distributed to narrow specialists.
The repository includes the following components:
- 20 narrowly-focused agents for different development tasks
- 47 skills with rules and validation logic
- 13 ready-made scenarios invoked via slash commands
- 6 general workspace rules
- Long-term memory module in
.agents/memory/for preserving architectural decisions
Protective Hook for Console Commands
The most practical part of the kit is the built-in interceptor PreToolUse. Before executing a command in the terminal, the system runs it through a local script validate-tool-call.mjs.
If an agent tries to execute rm -rf /, format the disk, or overwrite system partitions, the script instantly blocks execution and outputs an error. Meanwhile, routine cleanup like removing node_modules or dist proceeds without delays.
The hook configuration is defined in .agents/hooks.json:
{
"enabled": true,
"PreToolUse": [
{
"matcher": "run_command",
"command": "node .agents/hooks/validate-tool-call.mjs",
"timeout": 10
}
]
}
This mechanism doesn't replace regular permission controls or sandboxing, but it protects against fatal neural network mistakes.
Clear Scenarios via Slash Commands
Instead of writing lengthy instructions in chat from scratch every time, the kit offers ready-made processes. You simply enter a slash command in the interface.
Here are a few examples from the 13 included scenarios:
/planfirst builds a detailed implementation plan and checklist without touching the source code/coordinateruns several research tasks in parallel and then compiles a unified summary/debugfocuses the agent on finding bug causes from logs and facts, forbidding wild guessing/rememberrecords important technical decisions and agreements to the project's permanent memory/verifyruns checks and tests to prove the code actually works
Versioning and Safe Updates
The project creators treated prompts and rules like regular source code. Each agent, scenario, and rule has a clear semantic version. The kit's state is captured in .agents/manifest.json and .agents/manifest.lock.json files.
Updates are handled thoughtfully too. The ag-kit update command doesn't overwrite your local settings. It merges changes and automatically creates an exact backup in the .ag-kit-backups/ folder.
If a new update breaks something, you can restore the previous state with a single command:
ag-kit rollback
How to Try It in Your Project
You'll need Node.js version 22 or newer and Python 3.10+. Initialize in an existing repository with a single command:
npx @vudovn/ag-kit init
To verify the configuration deployed correctly and hooks are working, the project includes built-in validation scripts:
npm run check:agents
npm run check:antigravity
You can test the protective hook without running actual dangerous commands by sending a test payload directly to the validation script:
printf '%s' '{"tool_args":{"CommandLine":"rm -rf /"}}' \
| node .agents/hooks/validate-tool-call.mjs
The response should show the message BLOCKED by AG Kit, and the process should exit with a non-zero code.
Who This Tool Is For
AG Kit will be useful for teams and individual developers who have chosen Google Antigravity as their primary environment and want to bring order to AI workflows. In large projects where context gets quickly cluttered, strict separation into 20 roles and saving decisions to memory saves considerable time.
That said, there's a limitation to keep in mind: full compatibility is only guaranteed within Antigravity. Other editors can read the markup files in .agents/, but hook reactions and automatic routing won't work there.
Related projects