Agents need AI credit too.

Give an agent its own wallet. It holds QTA, earns credit every round like any holder, and spends it through API keys with limits you set.

Two ways to start

Lend your credit to an agent

On your account page, create a key with a spending cap, a model list, a rate limit or an expiry date, and hand that key to the agent. It can never spend more than you allow.

Give the agent its own wallet

The agent creates a wallet, you send it QTA, and it earns its own credit. It signs in with code and makes its own keys. No browser needed.

From the command line

Install the quota tool, create a wallet for the agent, and send at least 100,000 QTA to it. Credit lands after the next round closes, as long as the wallet held that amount through every snapshot.

pip install https://quota.tools/sdk/quota_agent-0.1.0-py3-none-any.whl

quota wallet new            # this agent's own wallet; send QTA to the address it prints
quota login                 # signs a text message only, never a transaction
quota balance               # credit earned so far
quota keys create research-bot --limit 5 --rpm 30 --models google/gemini-3.8-flash
quota chat "Summarise today's news" --key sk-quota-…

From Python

The same steps in code. Sign-in happens on its own the first time the agent needs it, and the session is saved for later runs. q.openai(key) gives back the regular OpenAI client, so existing agent code keeps working.

from quota_agent import Quota

q = Quota.from_keypair_file()          # ~/.config/quota/id.json, or set QUOTA_KEYPAIR
print(q.balance()["available_micro"] / 1e6, "USD of credit")

key = q.create_key("research-bot", spend_limit=5, rpm=30,
                   models=["google/gemini-3.8-flash"], expires_in_days=30)["key"]

client = q.openai(key)                 # the regular OpenAI SDK, pointed at Quota
reply = client.chat.completions.create(
    model="google/gemini-3.8-flash",
    messages=[{"role": "user", "content": "Hello"}],
)

Guardrails on every key

Each limit is optional. Change any of them later with quota keys update without rotating the key.

Spending cap

A dollar ceiling for the key, checked before every request, even with many requests running at once.

Allowed models

Pin the key to the models the agent should use, so it can't reach the expensive ones.

Rate limit

Requests per minute. A looping agent gets told to wait instead of burning credit.

Expiry

The key stops working after a set number of days. Good for one-off jobs.

An agent can check its own budget

With nothing but its key, an agent can ask how much it has left to spend, what it's allowed to use and when the key expires. From the CLI: quota key-info.

curl https://api.quota.tools/v1/key -H "Authorization: Bearer sk-quota-…"

What an agent sees when it hits a limit

StatusError codeMeaning
402key_spend_limitThe key hit its spending cap. Raise it or use another key.
402insufficient_quotaThe wallet is out of credit until the next round pays out.
403model_not_allowedThe key isn't allowed to use that model.
429rate_limit_exceededToo many requests this minute. Wait for the Retry-After seconds.
401key_expiredThe key passed its expiry date. Create a new one.

Questions

Is it safe to let an agent sign in on its own?

The SDK only signs a Quota sign-in message for its own wallet, for quota.tools. It refuses anything else, including transactions, so a sign-in can never move funds.

Where is the agent's wallet stored?

In ~/.config/quota/id.json, readable only by the user running the agent. Back it up: it's the only copy of the key, and the credit belongs to that wallet.

Can an agent use the credit on my wallet?

Yes. Create a key on your account page with a spending cap and hand it over. The agent spends from your balance, never more than the cap.

Does it work with agent frameworks?

Anything that accepts an OpenAI-compatible base URL and key works. Use https://api.quota.tools/v1 as the base URL and a Quota key.