Set up Thoth end to end
Create your keys, configure the workspace as code, choose a profile and connect your first agent.
This is the full path from a new workspace to an agent whose tool calls are checked before they run and recorded in your workspace. The dashboard follows the same steps under Set up and confirms each one as you go.
Before you start
You need a workspace administrator account. Creating keys and changing configuration require a recent second factor: the first time, the dashboard emails you a code and then asks you to add an authenticator app (1Password, Google Authenticator, Authy or similar). After that it asks for a 6-digit code when a change needs it.
Two kinds of key are involved. Keep them separate.
| Key | Permissions | Scope | Used by |
|---|---|---|---|
| Configuration key | read, write | Whole organization | Terraform, Pulumi, thothctl |
| Agent key | execute | One agent ID | The agent's SDK |
A configuration key can change your governance settings. Never put it in an agent, a repository or a chat. An agent key can only ask Thoth for decisions for its own agent.
1. Create an organization-wide configuration key
In the dashboard, open Settings → Keys (or step 1 of Set up), choose
Configuration key, name it after where it will live (for example
terraform-ci) and pick how long it lives: 7, 30, 90 or 180 days, or one
year. A trial key never outlives the trial.
Review, confirm, and complete the code prompt. The key is shown once: store it in your secret manager or CI secrets straight away. Before it expires, create a replacement and revoke the old key from the same page.
2. Configure your workspace as code
Point the Thoth provider at your workspace with the configuration key, import the existing settings, and review the plan before applying. The dashboard's Set up page fills in your tenant ID and configuration API URL.
Keep state, plans and the key file out of source control. See Configure trial settings as code for importing and restoring prior values.
3. Write policies for your tools
Thoth decides from what each tool does. Declare each tool's classes — read,
write, delete, external_call, export, execute, bulk_operation,
credential_access, sensitive_data_access — in code, and add a declaration
whenever your agent gains a tool.
Descriptions and classes an agent reports about its own tools are untrusted
until an administrator confirms them, in code or on the dashboard's Workspace
page. Custom OPA and Cedar policy bundles (thoth_policy_bundle) are
available on paid plans.
4. Select the safe-default profile
A profile turns tool classes into decisions. safe-default lets confirmed
reads run and sends anything that changes data to a person for approval. It
is the right place to start until you have reviewed your tools.
On a trial, the profile applies to every agent in the workspace and is chosen once: use Preview safe-default in step 4 of Set up, review the preview and confirm it. In code, assign it per agent:
See Profiles for what each profile allows.
5. Create a key for your agent
In Settings → Keys (or step 5 of Set up), choose Agent key, enter
the exact agent ID your code will use, and pick an expiry. If the agent has
not reported yet, it is registered first; on a trial this uses one of your
agent slots. The key can only request decisions (execute) for that one
agent ID.
To manage agent keys as code instead, use
thoth_agent_api_key with permissions = ["execute"] and scope_target_id set to a registered agent.
6. Connect your agent
Set the connection details in the environment the agent runs in. The dashboard shows your tenant ID and tenant API URL.
Then wrap the agent's tools with the SDK, using the same agent ID as the key. Every call is checked before it runs. Follow Your first governed agent for complete Python, TypeScript and Go programs, and Instrument your own agent to put real tools behind Thoth.
The Set up page waits for the agent's first decision and links to it in Activity, where each decision shows the tool, outcome, reason and actor.
Key lifecycle
Every key has an expiry you choose when you create it, and Thoth enforces it everywhere the key is checked: the configuration API refuses an expired or revoked configuration key, and the enforcer refuses an expired or revoked agent key on the next call.
Settings → Keys lists every key with its state and scope:
| State | Meaning |
|---|---|
| Active | Works until its expiry date |
| Expires soon | Active, with less than 7 days left. Create a replacement now |
| Expired | Past its expiry date. It no longer works and cannot be renewed |
| Revoked | Turned off by an administrator before it expired |
Each key is also marked Org-wide (configuration or runtime access across the workspace) or Agent-specific (one agent ID), with its permissions.
Keep it running
- Create a replacement key before one expires, then revoke the old one. Expiring keys appear in the dashboard's notifications a week ahead.
- Change policies in code and review the plan; the dashboard shows the result, not a second source of truth.
- Approvals for actions that need a person appear under Approvals and in notifications.