ACP in the TUI
The heyvm TUI provides built-in support for connecting to and interacting with ACP agents. This guide explains how to configure and use ACP integration in the TUI.
Prerequisites
- heyvm installed and running
- At least one ACP-compatible agent available (local or remote)
- Basic understanding of the heyvm TUI navigation
Configuration
ACP agents can be configured in the heyvm configuration file. Each agent requires:
- Name: A friendly name for the agent
- Transport: How to communicate with the agent (
stdio,http, orwebsocket) - Command/URL: Either a local command to run or a remote URL to connect to
- Optional: Description, capabilities, environment variables
Example Configuration
[[agents]]
name = "Local Goose Agent"
transport = "stdio"
command = "/path/to/goose"
args = ["acp"]
description = "Local Goose AI agent"
capabilities = ["file_access", "terminal", "tool_usage"]
[[agents]]
name = "Remote Agent"
transport = "http"
url = "https://agent.example.com/acp"
description = "Remote ACP agent"Using ACP in the TUI
Navigation
- Launch heyvm:
heyvm - Navigate to the Agents tab using the tab keys or designated shortcut
- Use
j/kor arrow keys to browse available agents
Connecting to an Agent
- Select a sandbox using
sto cycle through available sandboxes - Select an agent from the list
- Press Enter or
cto initiate the connection
Interacting with the Agent
Once connected:
- Prompt input: Press Tab to focus the prompt, type your message, and press Enter to send
- Conversation scroll: Use
↑/↓arrows to scroll through the conversation - Fast scroll: Use PgUp/PgDn for faster navigation
- Switch mode: Press Shift+M to switch between available session modes (if supported by the agent)
Managing the Session
- Disconnect: Press
dto stop the ACP session and disconnect from the agent - View status: The connection status is displayed in the UI
- Error handling: If connection fails, error messages will be shown
File System Integration
ACP agents can access files through the heyvm file system adapter:
- Local files: Agents can read/write files in sandbox mounts
- Mount management: Configure mounts in the Mounts tab before connecting
- File operations: All file access is logged and mediated through the ACP protocol
File Access Example
- Add a mount in the Mounts tab:
./project:/app - Connect to an agent
- The agent can now access files in
/appwhich maps to./projecton your host
Transport Types
Stdio Transport
For local agents that communicate via standard input/output:
[agents.local_agent]
transport = "stdio"
command = "/path/to/agent-binary"
args = ["--acp-mode"]HTTP Transport
For remote agents accessible via HTTP:
[agents.remote_agent]
transport = "http"
url = "https://agent.example.com/acp-endpoint"WebSocket Transport
For real-time bidirectional communication:
[agents.websocket_agent]
transport = "websocket"
url = "wss://agent.example.com/acp-ws"Troubleshooting
Connection Issues
- Verify the agent command/URL is correct
- Check network connectivity for remote agents
- Ensure the agent supports the specified transport type
- Review the CLI log at
~/.heyo/cli.logfor detailed error messages
Permission Errors
- Ensure the agent has proper permissions for requested operations
- Check sandbox mount configurations
- Verify file system access rights
Protocol Errors
- Ensure both client and agent support the same ACP protocol version
- Check agent compatibility with heyvm's ACP implementation
- Review agent capabilities and supported features
Advanced Configuration
Environment Variables
[agents.custom_agent]
transport = "stdio"
command = "/path/to/agent"
env = { "AGENT_TOKEN" = "your-token-here", "DEBUG" = "true" }Multiple Agents
Configure multiple agents and switch between them in the TUI:
[[agents]]
name = "Agent 1"
transport = "stdio"
command = "/path/to/agent1"
[[agents]]
name = "Agent 2"
transport = "http"
url = "https://agent2.example.com"Security Considerations
- Use HTTPS/WSS for remote agent connections
- Validate agent URLs and commands
- Review agent capabilities before connecting
- Monitor file system access through mounts
- Regularly update agents to latest secure versions
Learning More
For more details about the ACP protocol and heyvm's implementation: