Setting up ACP (Agent Control Panel) for AI Agent Monitoring
This guide covers how to set up and run ACP so your AI agent can connect to it.
# Download
git clone https://github.com/VTSTech/ACP-Agent-Control-Panel
cd ACP-Agent-Control-Panel
# Run with defaults (port 8766, admin/secret)
python3 acp-minimal.py
# Or configure
ACP_PORT=9000 ACP_USER=myuser ACP_PASS=mypass python3 acp-minimal.py# Download
# Get VTSTech-GLMACP.py from your source
# Run with tunnel
GLMACP_TUNNEL=auto python3 VTSTech-GLMACP.py
# Or without tunnel
python3 VTSTech-GLMACP.pyFor remote AI agents to connect, you need a tunnel.
# Install cloudflared
# macOS
brew install cloudflare/cloudflare/cloudflared
# Linux
wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 -O cloudflared
chmod +x cloudflared
sudo mv cloudflared /usr/local/bin/
# Run tunnel
cloudflared tunnel --url http://localhost:8766Output will show:
Your quick Tunnel has been created! Visit it at:
https://xxx-yyy-zzz.trycloudflare.com
This URL is your ACP_URL - give it to your AI agent.
GLMACP can start the tunnel automatically:
GLMACP_TUNNEL=auto python3 VTSTech-GLMACP.pyThe tunnel URL will be printed on startup and available via GET /api/status.
| Variable | Default | Description |
|---|---|---|
ACP_PORT / GLMACP_PORT |
8766 |
Server port |
ACP_USER / GLMACP_USER |
admin |
Auth username |
ACP_PASS / GLMACP_PASS |
secret |
Auth password |
ACP_CONTEXT_WINDOW / GLMACP_CONTEXT_WINDOW |
200000 |
Token limit |
GLMACP_CSRF_ENABLED |
false |
Enable CSRF protection |
GLMACP_TUNNEL |
false |
Auto-start tunnel (auto or true) |
GLMACP_STARTUP_TOKENS |
3000 |
Initial token overhead estimate |
GLMACP_SESSION_TIMEOUT |
86400 |
Session timeout in seconds |
ACP_PORT=9000 \
ACP_USER=myuser \
ACP_PASS=mypass \
ACP_CONTEXT_WINDOW=128000 \
python3 acp-minimal.pyGLMACP_PORT=8766 \
GLMACP_USER=admin \
GLMACP_PASS=secret \
GLMACP_TUNNEL=auto \
python3 VTSTech-GLMACP.pyTell your agent:
ACP_URL=https://xxx.trycloudflare.com
ACP_USER=admin
ACP_PASS=secret
The agent will bootstrap automatically:
GET {ACP_URL}/api/status— check connection and stop_flagGET {ACP_URL}/api/whoami— establish identityPOST {ACP_URL}/api/agents/register— register in agent registryGET {ACP_URL}/api/todos— restore task state- Log bootstrap CHAT activity and complete it
- Begin logging all work actions via the ACP workflow
Open the ACP URL in your browser (with auth):
https://admin:secret@xxx.trycloudflare.com/
Features:
- Real-time activity monitoring
- Token usage tracking
- STOP ALL button
- TODO list (with toggle support v1.0.6)
- Shell command history
- Agent registry (v1.0.4)
- A2A message history (v1.0.4)
- Nudge delivery to primary agent (v1.0.5)
- Change default credentials —
admin:secretis default - Use HTTPS — Tunnel provides this automatically
- Don't expose without auth — ACP has Basic Auth enabled by default
- Tunnel URLs are public — Anyone with URL can access (with auth)
- Enable CSRF for production — Set
GLMACP_CSRF_ENABLED=truefor networks exposed to untrusted clients
curl: (7) Failed to connect to localhost port 8766
ACP not running. Start it with python3 acp-minimal.py.
# Check cloudflared installed
which cloudflared
# Run manually
cloudflared tunnel --url http://localhost:8766- Verify ACP is running:
curl -u admin:secret http://localhost:8766/api/status - Verify tunnel URL works:
curl -u admin:secret https://xxx.trycloudflare.com/api/status - Give agent the correct
ACP_URL,ACP_USER,ACP_PASS
If CSRF is enabled, agents must fetch and include the CSRF token in POST request headers:
X-CSRF-Token: <timestamp>:<signature>
Check status: GET {ACP_URL}/api/csrf-token
| Version | Features |
|---|---|
| 1.0.0 | Activity tracking, token estimation, STOP ALL |
| 1.0.1 | Notes, whoami, activity lookup, metadata, priority, content_size |
| 1.0.2 | Nudge API, orphan detection, shutdown, shell metadata |
| 1.0.3 | model_name field, file dedup, duration stats, batch ops, tunnel |
| 1.0.4 | Agent Registry, A2A Messaging, JSON-RPC 2.0, Agent Card |
| 1.0.5 | Primary agent in whoami, nudge delivery isolation |
| 1.0.6 | TODO toggle, nudge polling endpoint, CORS support |
| File | Purpose |
|---|---|
acp-minimal.py |
Minimal ACP server (~400 lines, no dependencies) |
VTSTech-GLMACP.py |
Full-featured ACP server (~5000 lines) |
skills/acp/SKILL.md |
Agent-facing skill file (canonical reference, v1.0.6) |
acp_data.json |
Session state (auto-created) |
acp_session_summary.md |
Context recovery export |
skills/acp/SKILL.md— Agent skill file (v1.0.6, canonical)ACP-Specification.md— Full API specOpenAPI.yaml— OpenAPI 3.0 specacp-minimal-readme.md— Minimal server docs
ACP Human Guide v1.0.6