Subagents

Subagents are specialized AI agents that handle specific types of tasks. Each subagent runs in its own context window with a custom system prompt, specific tool access, and a dedicated model. When the main agent encounters a task that matches a subagent's capabilities, it delegates to that subagent, which works independently and returns results.

Subagents help you preserve context by keeping specialized work out of your main conversation, enforce constraints by limiting which tools a subagent can use, control costs by routing tasks to faster or cheaper models, and specialize behavior with focused system prompts for specific domains.

Built-in subagents

Infracodebase includes built-in subagents that are managed by the platform. Currently this includes the Git Agent, which handles git operations like initializing repositories, creating branches, committing changes, and pushing to GitHub.

Built-in subagents always use the latest version and are kept up to date automatically.

Custom subagents

Enterprise administrators can create custom subagents tailored to their organization. Each custom subagent is defined by the following.

  • Name and description so the main agent knows when to delegate
  • System prompt with focused instructions for the subagent's domain
  • Tools that the subagent is allowed to use (e.g., Bash, Read, Write, Edit, Glob, Grep)
  • Model selection (Sonnet, Opus, Haiku, or inherit from the main agent)

Custom subagents support versioning. When you update a subagent's prompt, tools, or model, a new version is created. Workspaces pin to a specific version and can upgrade when a new one is available.

Enterprise settings

From your enterprise's Subagents page, you can enable or disable individual subagents and mark them as required or optional.

  • Required means every workspace must use this subagent. Workspaces cannot opt out.
  • Optional means workspaces can enable or disable the subagent for their specific needs.

Workspace overrides

Enterprise subagent settings apply as defaults. Workspaces can toggle optional subagents on or off for their specific needs. Required subagents are locked and cannot be disabled at the workspace level.

For custom subagents, workspaces pin to a specific version and see a notification when a newer version is available.

See Workspace Settings for how to manage subagents at the workspace level.