Masz teraz Copilot CLI+ - Zaawansowany lokalny agent z peΕnΔ integracjΔ .
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β TY (User Commands) β
ββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββ΄βββββββββββββββββ
β β
COPILOT CLI Local Shell Commands
(ten agent) (direct execution)
β β
β βββββββββββββββ β
βββββββββββ MCP Bridge βββββββββββ€
β βββββββββββββββ β
β β β
β ββββββββββββββββββββββββ β
ββββββ Local Agent API βββββββ
β (port 8888) β
ββββββββββββββββββββββββ
β β β
ββββββββββΌβββββββΌββββββββ΄βββββββββ
β β β β
Execute DeepSeek Ansible Services Logs
Commands Queries Playbooks Status
β β β β
ββββββΌβββββββββΌβββββββΌβββββββββββββββββΌβββββ
β Local System Execution β
β (Shell, Python, Ansible, Systemd) β
ββββββββββββββββββββββββββββββββββββββββββββ
| Component | Location | Status | Port |
|---|---|---|---|
| Copilot CLI | /usr/local/bin/copilot | Running | - |
| Local Agent API | http://localhost:8888 | β Running | 8888 |
| MCP Server | /opt/local-agent/bin/mcp-server.py | Ready | - |
| DeepSeek | /root/.local/bin/deepseek | Ready | - |
| Ollama | systemd service | β Running | 11434 |
| Ansible | /usr/bin/ansible | β Running | - |
| SSH | systemd service | β Running | 22 |
copilot
/mcp
Select or add local-agent server
Simple Test:
Tell me what services are running on the local agent
Execute Command:
Run "df -h" on the local agent and tell me the disk usage
Complex Workflow:
Create a plan to: 1. Check current system metrics 2. Identify any issues 3. Suggest fixes Then execute the plan using the local agent
When you're in Copilot CLI, you can use these tools:
local_executeExecute shell commands on the agent
"Run: systemctl status ollama"
local_deepseekQuery local AI model
"Ask the local agent: What's causing high CPU?"
local_ansibleRun automation playbooks
"Deploy using /opt/local-agent/config/playbook.yml"
local_servicesGet service status
"Show me service status"
local_logsView agent logs
"Show recent agent logs"
If you want to test directly:
# Health
curl http://localhost:8888/health
# Execute
curl -X POST http://localhost:8888/execute \
-d '{"command":"whoami"}' -H "Content-Type: application/json"
# Services
curl http://localhost:8888/services
# Logs
curl http://localhost:8888/logs
Full API docs: http://localhost:8888/docs
β Safety Checks - Dangerous commands blocked β Timeouts - Commands abort if hanging β Audit Trail - Everything logged β SSH Keys - Public key authentication only β Sudo Restrictions - Controlled elevated access
| File | Purpose |
|---|---|
/opt/local-agent/config/agent.conf |
Agent settings |
/opt/local-agent/config/playbook.yml |
Ansible automation |
/opt/local-agent/bin/api-server.py |
API backend |
/opt/local-agent/bin/mcp-server.py |
Copilot CLI bridge |
~/.copilot/mcp-config.json |
Copilot MCP config |
| Doc | Location |
|---|---|
| Agent README | /opt/local-agent/README.md |
| Integration Guide | /opt/local-agent/INTEGRATION.md |
| This File | /opt/local-agent/SETUP_COMPLETE.md |
You in Copilot CLI: "The server is running slow. Use the local agent to diagnose and fix" Copilot CLI will: 1. Create diagnostic plan 2. Execute checks via local_execute 3. Analyze with local_deepseek 4. Suggest solutions 5. Execute fixes via local_ansible 6. Report results
You in Copilot CLI: "Deploy the new version and verify it works" Copilot CLI will: 1. Plan the deployment 2. Pull code 3. Run via local_ansible 4. Health check via local_execute 5. Show status
You in Copilot CLI: "Monitor the system and alert me if anything is wrong" Copilot CLI will: 1. Create monitoring plan 2. Execute via local_execute 3. Analyze with local_deepseek 4. Alert on anomalies 5. Suggest actions
Check everything is running:
systemctl status local-agent local-agent-api ollama ssh --no-pager
View logs:
tail -f /opt/local-agent/logs/api.log tail -f /opt/local-agent/logs/agent.log
systemctl restart local-agent-api curl http://localhost:8888/health
# Check Copilot CLI can see the MCP server copilot /mcp # Verify config cat ~/.copilot/mcp-config.json
Check logs:
tail /opt/local-agent/logs/api.log | grep BLOCKED
/plan before big tasks - Plan first, execute second/context - See what's being sent to me/tasks - Monitor background operations/opt/local-agent/logs/--check - Dry run Ansible before real execution| Feature | Availability | Cost |
|---|---|---|
| AI Reasoning | Local (DeepSeek) or Cloud (Copilot) | Free (local), Subscription (cloud) |
| Shell Execution | Unlimited | Free |
| Ansible Automation | Unlimited | Free |
| Logging | Full audit trail | Free |
| SSH Access | Unlimited | Free |
| Request Quota | Unlimited | Free |
| Downtime | None (local) | Free |
| Customization | Full | Free |
copilot/mcp β select local-agentAll logs available in /opt/local-agent/logs/:
api.log - API server activityagent.log - Command execution logsplan_*.json - Copilot plans receivedDocumentation:
/opt/local-agent/README.md - Agent overview/opt/local-agent/INTEGRATION.md - Integration guideYou now have unlimited AI-powered automation at your fingertips! π₯
No quotas. No limits. No cloud dependencies.
Pure local power. πͺ