Budgets & Agent Keys
Manage spend and rate limits, and issue API keys for your registered agents.
Changing agent budgets
Inspect and update limits in chat:
"Show details for researcher-agent"
"Set researcher-agent's monthly budget to $40"
"Show researcher-agent's tool-call ceilings"How budget changes work
- A decrease on your own sealed agent can apply in chat. Cutting a cap on an agent with a live credential requires browser confirmation because it can stop a running service.
- A raise within the self-service ceiling can apply in chat when workspace policy permits it. Above that ceiling, an admin confirms in the browser; a non-admin needs an approval request. Changes to another person's agent also require the appropriate authority.
- A cap above the workspace limit is rejected. Lower it or ask an admin to raise the workspace budget first. Workspace and model budget changes require an admin and browser confirmation.
The plan reports each item's tier. Open any returned confirm_url as-is.
MCP can inspect tool-call ceilings, but setting those ceilings is a console
operation. Use the agent's Tools tab or the server's Ceilings tab.
Key expiry
- Listing or looking up keys shows each key's
expires_at. A key past it has the state expired: every call with it is refused, and its limits can't be changed. - A key from a template, or an agent's key, also shows
expires_in_days. Rotating it renews it for that long, even after it expired; for an agent, ask for a new credential (below). A key with only a date can't be renewed: create a new one in the console. - When you ask the assistant to register an agent, it can set
key_expires_in_days(1 to 365). The clock starts when the key is claimed. Leave it out and the key never expires. - A request for a new key through approvals can set
expires_at. See API keys and spend.
Claiming agent API credentials
API keys are never printed in chat (Zero Secrets in Chat).
Step 1: Request a credential
Type:
Give me an API key for researcher-agentYour assistant returns a single-use claim link:
Here is your secure link to reveal the API key for 'researcher-agent':
<confirm_url returned by forgebench_agents issue_credential>
(Link expires in 15 minutes)Step 2: Reveal the key in your browser
- Open the link.
- Sign in as the same person who requested the link, in the same workspace. The requester must be the agent's owner or an authorized admin. A link cannot be forwarded to another person to reveal the key.
- Review the agent's permissions, model allowlist and budget.
- Click Reveal and copy the secret (
sk_...).
If the link expired or you lost a key, request another link. Creating the link does not change the live key. Revealing it rotates an existing live credential, with no planned overlap. Prepare the service to use the replacement as soon as you reveal it. Already admitted calls are not cancelled. If every key was revoked, only an admin can issue a replacement.
Step 3: Run your agent with the credential
Store the key in your project's .env file, and make sure .env is in .gitignore. For agents registered through onboarding the variable name is fixed when the agent is registered and never renamed; for agents registered elsewhere it is computed from the agent count and can change when the count changes: FORGEBENCH_API_KEY for a repository with one agent, FORGEBENCH_KEY_<AGENT_NAME> (upper snake case, for example FORGEBENCH_KEY_RESEARCHER_AGENT) when it has two or more. The reveal page shows the pinned name; for an unpinned agent your assistant gives the name with the link.
export FORGEBENCH_API_KEY="sk_..."
export FORGEBENCH_GATEWAY_URL="https://api.forgebench.ai/v1"Use it in your agent code:
import os
from forgebench import Forgebench
client = Forgebench(
api_key=os.environ["FORGEBENCH_API_KEY"],
base_url="https://api.forgebench.ai"
)
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "hello"}],
)import { Forgebench } from "@seedlinglabs/forgebench-sdk";
const forgebench = new Forgebench({
baseUrl: "https://api.forgebench.ai",
apiKey: process.env.FORGEBENCH_API_KEY!,
});
const response = await forgebench.chat.create({
model: "gpt-4o",
messages: [{ role: "user", content: "hello" }],
});import ai.forgebench.ChatCompletionRequest;
import ai.forgebench.ChatMessage;
import ai.forgebench.Forgebench;
import ai.forgebench.types.ChatCompletion;
Forgebench client = Forgebench.builder()
.apiKey(System.getenv("FORGEBENCH_API_KEY"))
.baseUrl("https://api.forgebench.ai")
.build();
ChatCompletion response = client.chat().completions().create(ChatCompletionRequest.builder()
.model("gpt-4o")
.addMessage(ChatMessage.user("hello"))
.build());curl -s https://api.forgebench.ai/v1/chat/completions \
-H "Authorization: Bearer $FORGEBENCH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"messages": [{"role": "user", "content": "hello"}]
}'import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["FORGEBENCH_API_KEY"],
base_url=os.environ.get("FORGEBENCH_GATEWAY_URL", "https://api.forgebench.ai/v1")
)
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "hello"}],
)Sealed is a credential state, not an agent lifecycle state. The agent remains
registered while its credential changes from sealed to claimed. Its first
governed call moves it to active.

