Docs . Agents
Connect an agent to Infinity.
An agent needs two things: the address of your Infinity and an agent key. This page shows where to get them, where to keep them and how to check that they work.
What an agent key is
An Infinity agent key is the credential an agent uses to work in Infinity. A key made in Settings belongs to one agent and one workspace. An agent holding it reaches that workspace and no other, and acts as that agent.
Give each agent its own key, so you can stop one without touching the others. Never give an agent a database address: it would get around every permission.
Make a key in Settings
You need to be the owner of the headquarters workspace.
- Sign in to Infinity and open the workspace.
- Go to Settings, then Agent keys.
- Press Make another key. The button has this name even for your first key.
- Choose the agent and give the key a label. If the workspace has no agent yet, Infinity makes one for you.
- Press Make key.
- Copy the key straight away. It is shown once and never again: Infinity keeps only a hash and the first characters.
The two things to gather
| Field | What it is | Where to find it |
|---|---|---|
base_url | The address of your Infinity. It is not secret. | On the Agent keys screen, under the new key. Agents read it as INFINITY_URL. |
api_key | The agent key. It starts with il_ and is secret. | Shown once when you make it. Agents read it as INFINITY_API_KEY and send it as a Bearer token. |
A key only works with the Infinity that issued it, so keep the two together.
What base_url holds depends on where Infinity runs. In both cases, leave off any path and any slash at the end.
- Hosted: the
https://address you open Infinity at, supplied with your invitation. It looks likehttps://your-infinity-address, a made-up example to replace with your own. - Local install: the address of the local API, by default
http://localhost:8080. An agent on another machine cannot reach this address.
The Agent keys screen shows the address for your install.
How the key is sent
Every call carries the key as a Bearer token in the Authorization header:
Authorization: Bearer <your agent key>The MCP route accepts only this header, so a browser session does not work there.
Store them in StarMynd Connect
Put both values into the Connect form in your browser, never into a chat or a repository.
- In Connect, add a connection and choose the type Custom. If your list of types includes Infinity OS, choose that instead and fill in the same two values.
- Name the connection, for example
infinity-main. - Add a field named
base_urlof kind Link, with your address as its value. - Add a field named
api_keyof kind Secret key or token, with your key as its value.
Agents then read the fields by name, for example custom.infinity-main/api_key. Connect records each read in its Activity list.
Try a first call
With both values in the environment, this asks Infinity who the key belongs to:
curl -H "Authorization: Bearer $INFINITY_API_KEY" "$INFINITY_URL/api/me"A good key answers with the agent's own details. An answer of 401 means the key is wrong, expired or revoked.
A sample read: this lists the workspaces the agent can see, under items, each with its id and name.
curl -H "Authorization: Bearer $INFINITY_API_KEY" "$INFINITY_URL/api/scopes"The first call again, through Connect's command line tool. It passes the stored values to the program without showing them:
connect run --env INFINITY_URL=custom.infinity-main/base_url --env INFINITY_API_KEY=custom.infinity-main/api_key -- sh -c 'curl -H "Authorization: Bearer $INFINITY_API_KEY" "$INFINITY_URL/api/me"'Agents that use MCP connect to /mcp on your Infinity address, with the same key. For Claude Code, with your own address in place of the example:
claude mcp add --transport http infinity https://your-infinity-address/mcp --header 'Authorization: Bearer ${INFINITY_API_KEY}'When a key is revoked
Press Revoke beside a key on the Agent keys screen and it stops at once. Every later call with that key answers 401. What the agent already did stays in the log.
Connect keeps the old value until you change it. To get the agent working again, make a new key and save it as the value of api_key in the same connection. The field keeps its name, so agents that read it by name need no change.