Running a business with agents: what they should and should not do alone
AI agents should handle development, deploys, and data scraping alone, but humans must retain control over live money, secrets, and legal filings.
On this page 7 sections
- What agents should do independently
- What agents should never touch without human approval
- Full access versus limited keys: how permission boundaries work
- Keeping production secrets out of agent prompts
- Enforcing financial guardrails and daily spend caps
- Managing granular permissions when an agent needs more
- FAQ
AI agents should be allowed to build code, run tests, deploy applications, and read development data autonomously, but they should never touch production credentials, move live money, or submit legal filings alone. Giving an agent broad autonomy over implementation allows builders to ship software rapidly without getting bogged down in repetitive execution. At the same time, hard system-level boundaries must isolate your production database, company filings, and bank payouts from automated tasks.
Balancing speed and safety comes down to giving agents environments where mistakes are cheap and making dangerous actions fail predictably with clear escalation paths.
What agents should do independently
Agents excel at generative and iterative tasks where output can be validated against tests, schemas, or human review before going live. When connected through tools like Claude Code, Cursor, or Codex, you can safely hand them the following responsibilities:
- Writing code and managing dependencies. Agents can scaffold features, configure libraries like
@vibiz/app, and run test suites. - Managing development databases. Agents should create schemas, run migrations, and inspect mock data in an isolated development database branch where no production customer data exists.
- Deploying builds and preview environments. An agent should be free to trigger builds, deploy preview URLs, and inspect deployments to verify changes visually or programmatically.
- Running web data extraction and research. Calling actions like
web.scrape, running keyword research, auditing SEO on a target URL, or searching the Meta Ad Library can run autonomously without risking core operations. - Generating media and assets. Creating marketing images, product descriptions, or voice clips can happen on demand. When an agent creates media, the assets should land in project storage with a permanent URL automatically.
By restricting autonomous execution to these boundaries, an agent can build an entire product while keeping live assets untouched. For a deeper look at managing multiple services under a single roof, see the one-key stack for indie builders.
What agents should never touch without human approval
Certain actions carry irreversible financial, operational, or legal consequences. An agent should never be permitted to execute these tasks autonomously:
- Handling production secrets. An agent should never read live database connection strings, production API tokens, or server keys. If an agent holds production secrets, any prompt injection or errant script can leak customer data.
- Initiating live financial transactions. Moving money, withdrawing funds to a bank account, executing live refunds, or changing payment processor settings should always require human authentication.
- Filing legal documents. Submitting company formation drafts, paying statutory registration fees, and signing tax documents (such as SS-4 or Form 8821) must be signed and authorized by the account owner.
- Deleting production infrastructure. Removing active domains, revoking API credentials, or deleting live projects should be blocked for non-owner keys.
When an agent needs to perform an action in these categories, the platform should reject the request programmatically and provide a console link for the owner to complete the step manually.
Full access versus limited keys: how permission boundaries work
In thelastapi, permission boundaries are enforced at the API key level. Signing in (vibiz login) or generating an API key presents two distinct access levels:
- Full-access keys (
access: owner): Intended for human owners, CI systems, or highly trusted terminals. Full-access keys can read production variables, execute live refunds, withdraw funds, register domains, and file company documents. - Limited keys (
access: agent): Designed for autonomous AI agents. A Limited key can create projects, run deploys, send transactional email, execute AI queries, and inspect development environments, but it can never hold production secrets or move live money.
| Capability | Limited Key (access: agent) | Full-Access Key (access: owner) |
|---|---|---|
| Create projects, deploy, promote | Yes | Yes |
| Run actions, scrape web data, use AI | Yes | Yes |
| Inspect development database and env | Yes | Yes |
| View production env values | Names only (?names=1) | Yes |
| Live refunds, withdrawals, payouts | No | Yes |
| Change auto-recharge and safety caps | No | Yes |
| Create or revoke API keys | No | Yes |
| File company formation documents | Drafts only (cannot submit) | Yes |
You can create a Limited key directly from the CLI:
vibiz keys create coding-agent --limitedWhen a Limited key calls a restricted endpoint, the API returns a 403 forbidden status with an owner_only error code. Rather than silently failing, the JSON payload supplies structured data explaining what is missing:
{
"error": {
"code": "forbidden",
"message": "This action requires owner permissions.",
"details": {
"reason": "owner_only",
"permission": "payments.live:write",
"grant_url": "https://thelastapi.dev/keys/key_123/allow?permission=payments.live:write",
"console_url": "https://thelastapi.dev/billing",
"next_step": "Give the user details.grant_url to approve this action."
}
}
}This response allows an agent to hand a clean approval URL directly to you in chat, preserving safety without stalling the development workflow. For more on routing agent queries across providers, see what an AI gateway can and cannot do.
Keeping production secrets out of agent prompts
Chat contexts and agent logs are insecure places to store sensitive tokens. If an agent needs a third-party token (such as a host deployment token or a payment provider key), the secret must never pass through the chat interface.
Instead, the agent requests a secure input link using the API or MCP tools. For example, using the CLI:
vibiz env link STRIPE_SECRET_KEYThis returns a dedicated URL:
Paste STRIPE_SECRET_KEY here: https://thelastapi.dev/projects/prj_123/secrets/new?name=STRIPE_SECRET_KEY&env=production&kind=env . It goes straight to thelastapi, never through this chat.The user opens the link and pastes the value directly into the dashboard. Production environment variables remain write-only: their variable names appear when listing configuration (vibiz env vars), but their secret values are never printed in terminal outputs, agent tool calls, or chat responses. When files need protection instead of environment variables, you can store them as private files with signed links.
Enforcing financial guardrails and daily spend caps
Autonomous loops can accidentally consume compute, run recursive web actions, or burn through model tokens. To protect against runaway costs, all accounts use prepaid billing and strict daily ceilings.
Every account comes with a daily safety cap (set to $5 per UTC day by default), which limits total spend across AI models and actions. If an agent enters an infinite loop, requests stop processing as soon as the daily cap is reached, returning 429 rate_limited with details.reason: "daily_spend".
The account owner can inspect limits or raise the daily cap using a full-access key:
vibiz billing limit 50Account owners receive email notifications when usage hits 80% and 100% of any limit. Furthermore, individual projects can have their own daily AI budgets set to prevent a single service from depleting shared credits:
vibiz ai budget 10 --project prj_123Because paid calls draw from a prepaid credit balance, an agent can never run up unexpected post-paid invoices on your credit card. Agents can check the remaining credit balance (vibiz billing) and generate top-up links (vibiz billing top-up 25), but only a human can enter card details or enable auto-recharge.
Managing granular permissions when an agent needs more
When an agent demonstrates reliability on a specific task, you do not have to choose between keeping it completely blocked or granting full owner privileges. A Limited key can receive targeted permissions or read-only scopes.
For example, to allow an analytics agent to inspect production records without giving it write access, you can grant the database.production:read permission:
vibiz keys access key_123 allow database.production:readAlternatively, you can assign the read_all preset to give the key access to production variables, payment metrics, and company details without granting permissions to move money or alter infrastructure:
vibiz keys access key_123 readTo review every available permission and verify what an agent can currently do, inspect the key's status:
vibiz keys permissions
vibiz keys accessIf an agent's task is finished or its access needs to be curtailed, revoke the key instantly with vibiz keys revoke key_123.
To start building software with isolated agent permissions and prepaid limits, review the What is thelastapi guide and configure your team's environments under Keys and environments.
Frequently asked questions
Can a Limited key deploy changes to production?
Yes, a Limited key can deploy code, create previews, and promote builds to production. It is only barred from viewing production secrets, altering domains, modifying billing, and moving live money.
What happens if an agent exhausts the daily spend limit?
Calls to paid actions and AI models return a 429 status code with details indicating the daily spend limit was reached. Running sites, databases, sign-in, and analytics remain operational while the owner decides whether to raise the limit.
How does an agent handle database schema migrations without seeing production data?
Running `vibiz dev` creates a development branch containing identical tables and schemas without any production rows. The agent runs migrations and test suites against this empty copy safely.
Can an agent set up payment checkouts on a Limited key?
Yes, an agent can define products and generate hosted checkout URLs in development mode. However, issuing live refunds, modifying bank payout accounts, or changing live webhooks requires an owner key.