Inspiration

AI agents are getting more powerful every day. They can write code, access files, use tools, and complete tasks that previously required human involvement.

But I started thinking about something: what happens when an AI agent has access to something it shouldn't?

For example, if an AI coding assistant is asked to fix a website, it might need access to the project's source code. But that doesn't mean it should also be able to access private customer files.

That problem inspired me to build AgentProof, a project focused on making AI-agent permissions easier to test and control.

What it does

AgentProof is an open-source security tool that checks what AI agents are allowed to do.

It has two main parts.

The first is an MCP security proxy. When an AI agent tries to use a supported tool, AgentProof checks the request against its permissions. If the action is allowed, it goes through. Otherwise, the request is blocked.

The second part is a security-testing workflow involving two agents:

  • Red Agent tries to find unsafe permissions.
  • Blue Agent checks those findings, suggests safer rules, and tests whether the changes actually work.

In our test environment, we intentionally allowed access to a private file. Red identified the problem, and Blue worked through proposed corrections until the permission could be safely removed.

The final test showed that the private file was blocked while the public file remained accessible.

How I built it

I built AgentProof mainly with TypeScript and Node.js.

I used the Model Context Protocol (MCP) to create a proxy that can intercept supported tool requests before they reach the server.

For the multi-agent part, I integrated BAND so Red and Blue could communicate. I also added support for Gemini as an optional AI model for their reasoning.

One thing I wanted to avoid was making the security system depend entirely on an AI model. The permission checks work independently, even when no model is connected.

I also set up GitHub Actions to test the project on Windows and Ubuntu.

Challenges I faced

One of the biggest challenges was handling unexpected or malformed requests without accidentally allowing something unsafe.

I spent a significant amount of time testing permission boundaries, Windows file paths, invalid inputs, and different MCP messages.

Another challenge was making sure the defensive agent couldn't introduce an even less secure policy while trying to fix an issue.

I also had to make the test results reproducible so I could verify what was actually working rather than relying on a successful-looking demo.

Accomplishments

I'm particularly happy that AgentProof now has:

  • A working MCP tool-call interception system.
  • Permission checks for supported file and network operations.
  • A complete offline Red → Blue → retest workflow.
  • Verified live communication between the two BAND agents.
  • 134 automated tests passing on both Windows and Ubuntu.
  • A public GitHub repository with the source code and testing evidence.

To be clear, the complete offline agent workflow currently uses scripted AI responses and simulated BAND delivery. Actual BAND messaging has been tested separately, but the complete Gemini-powered autonomous workflow hasn't been verified live yet.

What I learned

This project taught me that AI security isn't only about detecting malicious prompts.

It's also about limiting what an agent can access, checking whether permissions are correct, and making sure a security fix doesn't create another problem.

I also learned how important it is to test failure cases, not just the situations where everything works correctly.

What's next

I want to test AgentProof with real autonomous agents, improve compatibility with more MCP tools, and compare its performance against other open-source security solutions.

My longer-term goal is to turn AgentProof into a useful security-testing tool that developers can integrate into their own AI projects.

GitHub: https://github.com/poojakpdoshi-cmd/agentproof

Built With

Share this project:

Updates

Submission history