r/Agent_AI • • 2d ago

Discussion Metered Cloud Usage for AI

Hi all. I’m looking to get feedback on an idea I’ve just started implementing. It’s SaaS to give AI agents, and I suppose some human users, access to AWS, GCP, Azure, etc. but with some sort of rate limiter/allowance that makes sure the agent can only spend, say, $20 a month. The initial main use case would be parallel integration testing during vibe coding, using AWS Lambda.

Do other people besides me find themselves waiting around quite a bit for Claude Code, or whatever, to run tests?

How are people currently hooking up their AI tools to AWS, etc.? Are people concerned about their agents spending too much?

Any other thoughts on this?

Thanks!

5 Upvotes

6 comments sorted by

1

u/Johneice-Yarden 2d ago

This actually solves a real concern as AI agents become more autonomous. Spending limits would give developers peace of mind. I'd be interested in seeing how you handle billing and permissions.

1

u/Intelligent-Wing-605 2d ago

Thanks! Basic idea would be that the agents don’t hold AWS credentials but instead have credentials to a gate service which holds the user’s actual AWS credentials. The gate service would then keep track of the AWS calls made and block things that would potentially blow the budget. Would probably also need to run another proxy to keep track of data egress fees.

Are you using anything like this already?

1

u/radim11 1d ago

We're kind of working on a related problem with Stashbase, more from the access control side. The agent runs in a sandbox and uses credentials through a proxy without having access to the actual keys.

Ideally probably combine spending limits with restrictions on which resources and operations the agent can access. An operation doesn't necessarily need to be expensive to cause damage.

How are you planning to estimate the cost of an operation before allowing the API request? Kind of curious especially about resources that keep generating costs after creation.

1

u/Intelligent-Wing-605 1d ago

So for things that keep generating cost after creation, if the (e.g.) monthly cost fits into the monthly budget (minus whatever our existing monthly costs are and whatever ad-hoc costs have been used) that's allowed. If it doesn't fit into the budget, then we are gong to need some sort of reaper process to clean things up (and also require that the client specifies how long they want the thing up for). Still working out a lot of the details. Am also going to need some sort of proxy to keep track of egress data costs.

1

u/radim11 1d ago

Makes sense. You could build some basic proxy that would measure egress. If I'm not mistaken there are many existing solutions doing this (LLM Gateways)

1

u/YayaXuner 2d ago

this is a genuinely useful idea, especially as AI coding agents become more autonomous. Giving agents access to cloud infrastructure can speed up testing and development, but cost control is a real concern. A fixed spending limit is a good starting point, though I think combining it with per-task budgets, usage monitoring, and permission controls would make it even more useful. The goal should be to let agents execute tasks independently without giving them unlimited access to cloud resources.