Skip to content

Commit af9168b

Browse files
committed
Add document for agent management
1 parent cf9bb5a commit af9168b

File tree

1 file changed

+75
-0
lines changed

1 file changed

+75
-0
lines changed
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
---
2+
title: Agent Management
3+
description: Manage and interact with other AI agents running on your system
4+
---
5+
6+
# Agent Management
7+
8+
> [!WARNING]
9+
> This feature is currently **experimental**, works on macOS and Linux with ai-devkit from version 0.10.0. Behaviors and commands may change in future versions.
10+
11+
The `agent` command allows AI DevKit to detect, list, and interact with other AI agents running on your system. It acts as a central hub to find where your AI coding assistants are working and quickly switch context to them.
12+
13+
## Prerequisites
14+
15+
To use the `agent open` command, your environment must meet these requirements:
16+
17+
- **Operating System**: macOS (Linux/Windows support coming soon).
18+
- **Terminal Emulator**: The agent must be running in one of the following:
19+
- **tmux**
20+
- **iTerm2**
21+
- **Apple Terminal**
22+
23+
> [!NOTE]
24+
> AI DevKit uses process detection and system automation (AppleScript) to locate and focus windows. Ensure you grant necessary permissions when prompted.
25+
26+
## Supported AI Tools
27+
28+
AI DevKit detects active sessions from the following tools:
29+
30+
- **Claude Code**: Automatically detects running `claude` processes and correlates them with your active projects.
31+
32+
## Commands
33+
34+
### List Agents
35+
36+
List all detected running agents.
37+
38+
```bash
39+
ai-devkit agent list
40+
```
41+
42+
**Output:**
43+
44+
| Agent | Status | Working On | Active |
45+
|-------|--------|------------|--------|
46+
| `my-project` | 🟢 running | implementing new feature | just now |
47+
| `website` | ⚪ idle | fixed css bug | 10m ago |
48+
49+
### Open Agent
50+
51+
Focus the terminal window associated with a specific agent.
52+
53+
```bash
54+
ai-devkit agent open <name>
55+
```
56+
57+
This command finds the exact window (tmux pane, iTerm2 session, etc.) where the agent is running and brings it to the foreground.
58+
59+
**Features:**
60+
- **Fuzzy Matching**: `ai-devkit agent open my-proj` will match `my-project-name`.
61+
- **Ambiguity Handling**: If multiple agents match (e.g., `web-frontend`, `web-backend`), you will be prompted to select one.
62+
63+
## Troubleshooting
64+
65+
### "No running agents found"
66+
1. Ensure the agent process (e.g., `claude`) is actually running.
67+
2. Verify you are running AI DevKit in the same user context.
68+
69+
### "Could not find terminal window"
70+
If `agent open` fails to focus the window:
71+
1. **Check Terminal Support**: Ensure the agent is running in **tmux**, **iTerm2**, or **Apple Terminal**. VS Code terminal is strictly not supported for external focus control.
72+
2. **Check Permissions (macOS)**:
73+
- Go to **System Settings** > **Privacy & Security** > **Accessibility**.
74+
- Ensure your terminal (iTerm2, Terminal) or tmux has permission to control your computer.
75+
- If prompted during execution, click **Allow**.

0 commit comments

Comments
 (0)