Overview
The Containers API provides information about git worktree containers used by task attempts. Each container represents an isolated workspace where AI agents execute tasks. Base URL:http://localhost:8887/api/containers
Get Container Info
Get detailed information about a worktree container.Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Container/worktree ID |
Example Response
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Container ID |
taskAttemptId | string | Associated task attempt |
worktreePath | string | Absolute path to worktree |
branch | string | Worktree branch name |
baseBranch | string | Target branch for merge |
status | enum | active, inactive, merged, deleted |
createdAt | string | Creation timestamp |
diskUsage | object | Disk space information |
gitStatus | object | Git status summary |
files | object | File statistics |
Use Cases
Monitor Disk Usage
Track worktree disk usage to prevent space issues:Check Git Status
Verify worktree state before merging:SDK Examples
JavaScript/TypeScript
Python
Next Steps
Attempts API
Task attempts using containers
Git Worktrees
Learn about worktree isolation

