| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A standalone service for AI-native process management that reduces context usage by ~90% while maintaining full human access to logs.
⚠️ IMPORTANT: If you're an AI assistant (Claude, ChatGPT, etc.), please read APM for AI Assistants for critical instructions on using APM to avoid getting blocked on long-running commands.
claude mcp add agent-process-manager apm mcp-bridge -e RUST_LOG=warnSee APM for AI Assistants for detailed instructions.
# Install latest version
curl -sSL https://raw.githubusercontent.com/sunnya97/agent-process-manager/main/install.sh | bash
# Or install specific version
curl -sSL https://raw.githubusercontent.com/sunnya97/agent-process-manager/main/install.sh | bash -s v0.3.0Download the latest binary for your platform from the releases page.
curl -sSL https://github.com/sunnya97/agent-process-manager/releases/latest/download/apm-linux-x64 -o /usr/local/bin/apm
chmod +x /usr/local/bin/apmcurl -sSL https://github.com/sunnya97/agent-process-manager/releases/latest/download/apm-macos-x64 -o /usr/local/bin/apm
chmod +x /usr/local/bin/apmcurl -sSL https://github.com/sunnya97/agent-process-manager/releases/latest/download/apm-macos-arm64 -o /usr/local/bin/apm
chmod +x /usr/local/bin/apm# Clone and build
git clone https://github.com/sunnya97/agent-process-manager
cd agent-process-manager
cargo build --release
# Add to PATH (optional)
sudo cp target/release/apm /usr/local/bin/# Start the daemon
apm start
# Spawn a process
apm spawn my-server python -m http.server 8080
# Spawn with tags for organization
apm spawn web-app node app.js --tag web --tag frontend --tag production
# List processes
apm list
# List processes filtered by tags (OR logic)
apm list --tag web --tag api # Shows processes with 'web' OR 'api' tags
# List processes with any of the specified tags
apm list --tags-any "backend,database" # Shows processes with 'backend' OR 'database' tags
# List processes with all specified tags (AND logic)
apm list --tags-all "web,production" # Shows only processes with BOTH 'web' AND 'production' tags
# Manage tags on existing processes
apm tag add my-server production # Add a tag to a process
apm tag remove my-server staging # Remove a tag from a process
apm tag list my-server # List tags for a specific process
apm tag all # List all unique tags across all processes
# View logs
apm logs my-server
# Stop a process
apm stop my-server
# Stop all processes (with confirmation)
apm stop-all
# Stop all processes without confirmation
apm stop-all --force
# Clean up stopped processes
apm clean # Clean all stopped processes
apm clean --older-than 24 # Clean processes stopped >24 hours ago
apm clean --current-dir # Clean only from current directory
apm clean --keep-logs # Clean but preserve log dataEnable APM process management in Claude Code with one command:
claude mcp add agent-process-manager apm mcp-bridge -e RUST_LOG=warnClaude Code agents will now have access to APM tools for intelligent process management. See Claude Code Integration for details.
# Spawn a process via API
curl -X POST http://localhost:7337/api/processes \
-H "Content-Type: application/json" \
-d '{
"name": "my-app",
"command": "node",
"args": ["app.js"],
"tags": ["web", "production"],
"pty": true
}'
# List processes filtered by tags
curl "http://localhost:7337/api/processes?tags=web,api" # OR logic
curl "http://localhost:7337/api/processes?all_tags=web,prod" # AND logic
# Add a tag to a process
curl -X POST http://localhost:7337/api/processes/<id>/tags \
-H "Content-Type: application/json" \
-d '{"tag": "critical"}'
# Remove a tag from a process
curl -X DELETE http://localhost:7337/api/processes/<id>/tags/staging
# Get all unique tags
curl http://localhost:7337/api/tags
# Get process health
curl http://localhost:7337/api/processes/<id>/health
# Stream logs via WebSocket
wscat -c ws://localhost:7337/api/logs/<id>/stream# System overview query
curl -X POST http://localhost:7337/api/agent/query \
-H "Content-Type: application/json" \
-d '{"type": "system_overview"}'
# Find errors in last 5 minutes
curl -X POST http://localhost:7337/api/agent/query \
-H "Content-Type: application/json" \
-d '{
"type": "process_errors",
"time_window": "5m"
}'
# Discover port mappings
curl -X POST http://localhost:7337/api/agent/query \
-H "Content-Type: application/json" \
-d '{
"type": "port_mapping",
"include_urls": true
}'
# Get performance metrics
curl -X POST http://localhost:7337/api/agent/query \
-H "Content-Type: application/json" \
-d '{
"type": "performance_metrics",
"metrics": ["cpu", "memory"]
}'
# Search logs
curl -X POST http://localhost:7337/api/agent/query \
-H "Content-Type: application/json" \
-d '{
"type": "log_search",
"pattern": "error",
"limit": 10
}'
# Get query schema
curl http://localhost:7337/api/agent/query-schema
# Get API capabilities
curl http://localhost:7337/api/agent/capabilitiesAPM dramatically reduces context usage for AI agents while maintaining full functionality:
Traditional: AI agent requests last 1000 log lines (~50KB of text)
# Returns massive text dump
curl http://server/logs?limit=1000APM: AI agent gets structured summary (~2KB of JSON)
# Returns focused insights
curl -X POST http://localhost:7337/api/agent/query \
-d '{"type": "system_overview"}'APM consists of:
APM includes built-in MCP server support, allowing AI assistants like Claude to directly manage processes:
# In apm.yaml
mcp:
enabled: true
transport: "tcp" # or "unix_socket"
tcp_port: 7338 # Default portThe MCP server runs alongside the HTTP API when enabled, sharing the same process manager and log storage.
The project includes a comprehensive test suite covering unit tests, integration tests, and end-to-end tests.
# Run all tests
./run_tests.sh
# Run specific test categories
cargo test --lib # Unit tests only
cargo test --test process_supervisor_test # Process management
cargo test --test log_storage_test # Log storage
cargo test --test log_patterns_test # Pattern detection
cargo test --test api_integration_test # API endpoints
cargo test --test agent_api_test # AI Agent API
cargo test --test log_summarizer_test # Log summarization
cargo test --test cli_e2e_test # CLI commands
# Run benchmarks
cargo benchSee test_summary.md for detailed test documentation.
We welcome contributions! Agent Process Manager uses GitHub Issues for project management with a comprehensive labeling system.
Issues are organized with priority levels (critical, high, medium, low) and component labels (api, cli, logs, process, tmux, websocket, ai-agent, config) for easy filtering and organization.
For detailed guidelines, see Contributing Guide.
# Run with debug logging
RUST_LOG=agent_process_manager=debug cargo run -- start
# Run all tests
./run_tests.sh
# Run specific test categories
cargo test --lib # Unit tests
cargo test --test "*" # Integration tests
cd tests/integration/python && python -m pytest # Python tests
# Format code
cargo fmt
# Check lints
cargo clippyagent-process-manager/ ├── src/ # Source code ├── docs/ # 📚 All documentation │ ├── setup/ # Setup guides (AI assistants, Claude Code) │ ├── integration/ # Integration guides (MCP, Vibe) │ ├── architecture/ # Technical architecture docs │ ├── development/ # Development and contributing │ └── guides/ # Step-by-step guides ├── tests/ # 🧪 Organized test suite │ ├── unit/ # Unit tests │ ├── integration/ # Integration tests (Rust, Python, Shell) │ ├── e2e/ # End-to-end tests │ ├── fixtures/ # Test data and configs │ └── scripts/ # Test runners ├── examples/ # 📋 Example configs and demos │ ├── configs/ # Configuration examples │ ├── scripts/ # Usage examples │ └── demo/ # Demonstration scripts ├── scripts/ # 🔧 Development tools │ ├── github/ # GitHub automation │ └── mcp/ # MCP utilities ├── benches/ # Performance benchmarks └── config/ # Runtime files (gitignored)
This project is part of the Vibe codebase but designed to be used independently.
| Back | FazBrowse Home | New Git URL |