Hiding certain modules from AI

Admin note: Moved out of the announcement thread for Anvil’s AI integration

I’m excited to try it out! I do have one privacy-related question, though:

Is it possible to exclude a specific server module from being accessed by ChatGPT?

1 Like

I hadn’t thought of that: related question I have: is there a way to allow gpt to access a module, but not edit it

Follow-up to the double follow-up question: can I configure AGENTS.md ?

After a quick check to the repo, my understanding is that the AGENTS.md and the skills in that repo are for local Codex use. The online IDE already has the Anvil skills embedded, but I don’t know whether it also reads an app-level AGENTS.md , where that file should be, or how much weight it would give to it.


Here is my understanding about the last two questions: If you use the new AI intergration inside the Anvil IDE, I don’t think you have control of what the language model can access. The model has access to the whole git repo, and all the modules in it.

My question is about how to steer it to give more importance to something rather than to something else, how to beg it not to edit a module and only edit other modules, but AGENTS.md gives directions, not rules. The AI model will try to follow those directions, but it isn’t guaranteed to.

If you really want to use AI and manage granular access to certain folders, I’m not sure about specific files, you should clone the app to your computer, use anvil-cli to keep it synced with the server, and use a local AI tool where you can configure your project by giving read-only or read/write access to specific folders. This also allows you to include other dependency apps or libraries or tools that interact with the app you are editing.

1 Like

If that were available, I think this feature request would also be implemented quickly:

When we run codex or claude
your app is checked out in a container
and anvil-cli is being used under the hood to sync back to the IDE

codex/claude sees your app as the current working directory
if your app has an AGENTS.md or .agents/skills then these will be used by codex in the usual way (and equivalent versions for claude).

There is currently no support for seeing your AGENTS.md in the IDE but it is on our list.

4 Likes

I’ve broken this subthread out for access control questions:

The easiest answer to both is “dependencies”, but the longer version is “I wouldn’t bother”. I don’t think it’s worth jumping through hoops to keep certain code away from these models, if you’re choosing to use them at all. There are settings to make sure OpenAI (link) and Anthropic (link) do not train on your data. If you don’t trust them to abide by their commitments, then you might equally well worry that AWS will suddenly start reading your source code off the EBS volumes where we store it…and if you go that way you’ll end up trying to design for the threat model of a national intelligence agency on a millionth of the budget.

(If you’re doing radical digital self-reliance for fun/homelab purposes, I guess you could grab a DGX Spark and stick Qwen Coder on it, then do it with Pi and the Anvil CLI, I guess? Or the App Server, if you don’t want to be relying on us either :slight_smile: )

For completeness, though, you could absolutely accomplish what you’re asking for with dependencies. At time of writing[*] the scope of an agent’s access is:

  • Read-write access to the source code of the current app, on the branch currently open in the IDE

  • Read-only access to source code of all dependencies

This means that, if you want the agent to be able to see code it can’t edit, put it in a dependency. If you want the agent to be able to see most of your code but not the important bits, give it access to a dependency with the parts that you want.

You could also put certain functions of your app behind an HTTP API, so the agent can see the calling code but not the code being called.


[*] We are looking at allowing you to grant the agent more access to do useful things like mucking with databases and running code, but we know we need to be careful, be safe by default, and avoid surprising users who are relying on existing limits. Safe sandboxing is important, and it’s something that differentiates Anvil’s AI from just grabbing a coding agent and running it on your computer where it can access anything, so we’re motivated to get it right!

3 Likes