Custom agents
A custom agent is a saved Inspect configuration: instructions, skills, an allowed set of repositories, a model, and a Slack handle. Every session started with the agent gets that configuration, whoever starts it and wherever it starts. Use one when a team repeats the same kind of work, such as release reviews or production triage, and you want each run to follow the same playbook.
Create and edit agents in Customize → Agents. You can also ask Inspect in a session to create or update an agent for you.
Who can create and edit agents
Any member can create an agent. After that, only these people can edit it, add it to Slack, or delete it:
- The agent's creator.
- The people listed under Collaborators.
- Anyone with the Manage all content role.
Everyone else sees the agent's settings as read-only. Built-in agents can't be edited.
Settings
- Name, Description: Identify the agent when people pick one, and when Inspect searches for an agent by name to start a child session.
- Instructions: Added after Inspect's base instructions for every session the agent runs. Up to 100,000 characters. Upload instructions loads a text file of up to 1 MB.
- Skills: Catalog skills staged in every session the agent runs, on top of the skills the person starting it has turned on.
- Repositories: Limits which repositories the agent can work in. Leave it empty to allow every repository in your organization.
- Repository hint: Guidance, up to 500 characters, that Inspect uses to pick a repository when a request doesn't name one, for example
Use core for backend requests and web for UI work. - Model: The model for new sessions. Each person's default uses the default model of whoever starts the session. Either way, a person can still pick another model for their session.
- Slack handle: The
@handleteammates mention in Slack. Lowercase letters, numbers, hyphens, and underscores, up to 80 characters. - Auto-reply channels: Slack channels where the agent replies to every new top-level message. See Slack.
- Custom status reactions: Replaces the emoji the agent reacts with in Slack while it works, finishes, and when its pull request merges or closes.
- Collaborators: People who can edit and archive the agent.
- Session visibility: Public sessions can be opened by anyone in your organization. Private sessions only by people with access, and a private agent can't reply in Slack. This setting isn't available to every organization yet.
The Access tab controls Who can use this: Everyone in your organization, or Only people you choose. When limited, only the listed people, the creator, collaborators, and people with Manage all content can start or prompt the agent's sessions.
How repository limits apply
- With one allowed repository, every session the agent starts works in that repository.
- With several, Inspect picks among them using the request and the Repository hint. If it can't pick one, the session fails with
Couldn't pick a repository automatically. Choose a repository and try again. - Requesting a repository outside the list fails with
Custom agent "<name>" can only work in <repositories>.
Instruction versions
Each time an agent's instructions change, Inspect saves a numbered version with who made the change. Open the version history next to Instructions to compare any version with the current text and restore it. Restoring fills in the old text; save the agent to keep it. Each session records which instruction version it started with.
Start a session with an agent
- In the web app, choose the agent when you start a session.
- From another session, ask Inspect to start a child session with the agent by name, for example: "Start a child session in the analytics repository with the Data Investigator agent to compare activation rates for the latest onboarding experiment." Inspect looks the agent up, starts the child with its configuration, and the child reports back to the parent. See Subagents and child sessions.
- From an automation, choose the agent in the automation editor. Each run uses the agent's instructions, skills, repositories, and model.
- From the Inspect API, pass the agent's ID when you create a session.
Slack
Each agent with a Slack handle appears in Slack as a user group with that handle, created through the Inspect Slack app. The Inspect Slack app has to be installed in your workspace first; see Slack.
To make an agent reachable from Slack, choose Add to Slack from the agent's actions. If Slack setup breaks, the same action reads Repair in Slack. Renaming the handle later keeps the agent reachable because mentions route through the user group.
How the agent responds in Slack:
- Mention
@handlewith the request in the same message. The agent starts a session and replies in a thread. - Messages posted by Slack workflows and other apps can mention the handle to start the agent.
- In an Auto-reply channel, the agent replies in a thread to every new top-level message posted by a person. It skips thread replies, edits, bot posts, and messages that already mention
@Inspector another agent. Invite@Inspectto the channel first; Inspect warns you when the bot isn't in a selected channel. - People with the Manage integrations role can create a new public channel while choosing auto-reply channels.
A custom agent and @Inspect never share a session. Mentioning @Inspect in a custom agent's thread starts a separate Inspect session.
Clone and archive
Clone copies an agent's name, description, instructions, model, repositories, repository hint, skills, visibility, and status reactions into a new agent you own, with a new Slack handle ending in -clone. Auto-reply channels aren't copied. You can only clone an agent you're allowed to use.
Delete archives the agent. Archived agents can't start new sessions and no longer appear in search, and Inspect disables the agent's Slack user group.
Troubleshooting
The agent is limited to specific people. Ask its creator or a collaborator to add you on the Access tab.
Your Slack workspace restricts who can manage user groups. A Slack admin has to allow the Inspect app to manage them.
A Slack user group with that handle already exists. Pick another handle or remove the existing group.
User groups need a paid Slack plan.
The Inspect Slack app is missing or its token expired. Reinstall it from Slack.
Check that the agent shows Ready in Slack. A message that mentions two agent handles starts neither.
Invite @Inspect to the channel, and post a new top-level message. Thread replies don't trigger
auto-replies.