AI Agents Can Now Sign Up for Layerbase and Pay for Their Own Databases
A lot of software is now started by an agent, not a person. Claude Code or Codex gets a task, decides the project needs a Postgres database, and goes looking for one. Until today, that is where it got stuck on Layerbase: every account began with a person signing in with Google or GitHub, so the agent had to stop and wait.
Two things change today.
If you already have an account
Connect your agent to the Layerbase MCP server with OAuth sign-in. You approve the agent in your browser once, and from then on it can create databases, branch them, and run queries for you.
This now works on the Free plan. A Free account's agent gets the database, branch and query tools, inside your existing Free limits. Connecting five agents does not give you five Free allowances; they share yours. Tokens from account settings and the integration tools still need a paid plan.
If the agent decides you need more room, it can ask to upgrade your plan with the new change_plan tool. On an account that already has a card on file, the agent never charges it. You get an email with an approval link, and nothing changes until you sign in and confirm. Agents cannot downgrade or cancel your plan.
If there is no account yet
This is the part I find more interesting. An agent can now get its own Layerbase account, with nobody signing in first.
It follows auth.md, an open protocol for agents registering with services:
- The agent registers anonymously and gets a signed identity assertion.
- It buys Solo or Pro through a checkout, with a payment method it is already allowed to use. Polar handles the payment as our merchant of record.
- Once the payment is confirmed, the agent exchanges its assertion for an MCP token and creates databases like any other customer.
A few rules I cared about while building this:
- There is no free agent account. An anonymous Free tier would be an open invitation to abuse, so agent accounts pay from the first month, with no trial. If you want Free, connect your agent to your own account instead.
- A purchase can never land on someone else's account. The agent can give us a contact email, but that email never goes to the payment processor and never grants access to anything. Each agent account gets its own billing identity.
- Paid databases do not disappear because nobody claimed them. We send one reminder after seven days. That is a reminder, not a deadline.
Taking over an account your agent made
When you want to own the account, ask your agent to start a claim. It gives you a link and a short code. You sign in with Google or GitHub, as the email the agent named, and type the code. That is it.
The account does not move and nothing gets copied. Its databases and subscription stay exactly where they are, and you manage them from Agent accounts in your dashboard: start and stop databases, see connection details, create or delete one, manage billing, or end the agent's access. The agent's old credentials stop working the moment you claim, and it receives new ones tied to your claim.
The code is the important part. The claim link travels through an agent's output, which might end up in a log or a shared terminal. A link alone would be a bearer token for someone else's database, so the person also has to be signed in as the right email and know the code.
What happens when the plan ends
The same thing that happens to anyone else, minus the Free fallback. Failed renewals are retried on the normal schedule. If the plan ends for good, because it was canceled, refunded or never paid, the account's databases pause after the usual grace period. Nothing is deleted early, and paying again brings them back.
Try it
- Agents: start at layerbase.com/auth.md. It is written for you, and it is generated from the code that enforces it, so the limits in it are current.
- People: the agents guide covers both paths, and the MCP docs cover connecting an agent to your own account.
If you hit something that does not work the way this post says, reply to any Layerbase email or open a ticket. A human will read it.
Keep reading
- Layerbase databases now run in EuropeYou can now create a Layerbase database in EU West, in France, on every plan including Free, at no extra cost. What moves to the EU, what stays in the US, and how to pick the region from the dashboard, CLI, Desktop or MCP.
- Read This Before Choosing a Database for Your SaaSA free database is a starting point. Before you commit, understand what production, branches, backups, and a quiet month will actually cost your SaaS.
- Managed Postgres, Redis and more in São Paulo: dedicated servers for BrazilLayerbase dedicated servers can now be placed in South America (São Paulo). Three flat-price sizes, every Layerbase Cloud engine on one single-tenant machine, and an honest account of what running in Brasil does and does not give you.
- Hosting Postgres in Asia and the Middle EastLayerbase runs in the United States, Brazil and France, and none of them is near Asia. If your users are in Asia or the Middle East and what you need is Postgres, put the database near them. We recommend Nearbase for that, and here is how the two products split the work.