用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/joshka0/foxctl --skill foxctl-daemon命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Protocol for participant agents in transport-first rooms: join, check membership, handle inbox/tasks, reply durably, and escalate.
Operate inside an existing foxctl room: orient from status or inbox, manage tasks correctly, escalate, and close with durable updates.
Run durable multi-agent rooms with transport-first delivery, participant state, room tasks, and optional tmux or zellij viewers.
基于 SOC 职业分类
正在显示 SKILL.md
| name | foxctl Daemon |
| description | Agent daemon architecture, exec_mode routing, and LLM engine selection for reactive vs autonomous agents. |
The agent daemon routes to different execution engines based on exec_mode.
exec_mode = "reactive" (default)
└── LLMChatEngine via companion.Service
- Provider: cerebras (default)
- Simple request/response
- Conversation memory (L0/L1/L2)
exec_mode = "autonomous" | "proactive"
└── LLMChatEngine via companion.Service
- Tool calling loop
- Multi-step reasoning
- Same provider support as reactive
| Mode | Engine | Default Provider | Tool Loop |
|---|---|---|---|
reactive | LLMChatEngine | cerebras | No |
autonomous | LLMChatEngine | cerebras | Yes |
proactive | LLMChatEngine | cerebras | Yes |
Trigger: Responds to incoming messages (mailbox polling).
Use when:
# Autonomous agent waits for work
foxctl agent spawn --name "Researcher" --exec-mode autonomous
foxctl agent run <agent-id> # Starts polling mailbox
# Send work to agent
foxctl agent ask <agent-id> --question "Research the auth flow" --wait
Trigger: Self-initiates work based on schedule or conditions.
Use when:
# Proactive agent self-starts work
foxctl agent spawn --name "Indexer" --exec-mode proactive
foxctl agent run <agent-id> # Immediately starts working
# Agent doesn't wait for messages - it has its own task loop
| Scenario | Mode | Reason |
|---|---|---|
| "Answer questions about codebase" | autonomous | Wait for questions |
| "Index all files every hour" | proactive | Self-scheduled work |
| "Implement task when assigned" | autonomous | Wait for assignment |
| "Monitor logs for errors" | proactive | Continuous watching |
| "Review PR when requested" | autonomous | Wait for request |
| "Generate daily summaries" | proactive | Self-scheduled |
# Uses LLMChatEngine with cerebras
foxctl agent spawn \
--name "Luna" \
--role companion \
--exec-mode reactive \
--llm-provider cerebras \
--llm-model "llama-3.3-70b" \
--system-prompt @prompt.txt
# Start the daemon
foxctl agent run <agent-id>
# Send message (uses conversation memory)
foxctl agent ask <agent-id> \
--question "Hello!" \
--conversation-id "user-session-1" \
--wait
foxctl agent spawn \
--name "Coder" \
--role coder \
--exec-mode autonomous \
--llm-provider openrouter \
--llm-model "anthropic/claude-sonnet-4-20250514"
# Start the daemon
foxctl agent run <agent-id>
Prevent runaway context accumulation with --max-context-tokens:
# Stop if context exceeds 30K tokens
foxctl agent spawn \
--role researcher \
--prompt "Analyze the entire codebase" \
--exec-mode autonomous \
--max-iterations 25 \
--max-context-tokens 30000
The engine logs per-iteration context to stderr:
[CONTEXT] iter=5 msgs=13 prompt_tokens=12820 completion_tokens=1676 total=14496 finish=stop
[CONTEXT] iter=6 msgs=15 prompt_tokens=31040 ...
[CONTEXT] budget exceeded: 31040 > 30000 limit, stopping
When budget is exceeded:
StopReasonContextBudgeterrorResume previous agent sessions with follow-up prompts:
# Continue a session
foxctl agent resume <session-id> --prompt "Based on your findings, tell me more about X"
session_turns table during executionsession_edges (edge_type: "continues")Agent sessions automatically persist turns:
-- Each turn stores:
session_id, turn_index, role, content_preview, tool_calls, tokens_used, timestamp
For reactive agents, resolution order:
agentRecord.LLMProvider - Agent-specificopts.LLMProvider - Daemon flag"cerebras" - Fallback defaultFor cerebras model:
agentRecord.LLMModel - Agent-specificopts.LLMModel - Daemon flag"llama-4-scout-17b-16e-instruct" - Default# Cerebras (reactive agents)
CEREBRAS_API_KEY=csk-xxx
# OpenRouter (autonomous agents)
OPENROUTER_API_KEY=sk-or-xxx
# Alternative providers
ANTHROPIC_API_KEY=sk-ant-xxx
OPENAI_API_KEY=sk-xxx
GEMINI_API_KEY=xxx
GROQ_API_KEY=gsk-xxx
When exec_mode: reactive, companion memory is available:
| Layer | Window | Content |
|---|---|---|
| L0 (Vivid) | 24-48h | Full turns |
| L1 (Recent) | 7-14 days | Day summaries |
| L2 (History) | Permanent | Distilled context |
Enable via --enable-companion-memory or auto-enabled for role: companion.
The configured LLM provider is not supported or missing its API key.
Fix:
# Option 1: Change to reactive mode
sqlite3 ~/.foxctl/storage/agents.db \
"UPDATE agents SET exec_mode='reactive' WHERE id='$AGENT_ID'"
# Option 2: Use a supported OpenAI-compatible provider
foxctl agent spawn --exec-mode autonomous --llm-provider openrouter --llm-model "anthropic/claude-sonnet-4-20250514"
Check daemon logs for memory_enabled: false.
Fix: Run with --enable-companion-memory or ensure role is companion.
| Component | File |
|---|---|
| Engine routing | internal/agent/daemon/daemon.go:237 |
| Companion service | internal/context/companion/service.go |
| LLMChatEngine | internal/runtime/engine/llmchat_engine.go |
| Message handlers | internal/agent/daemon/handlers.go |
foxctl-agents - Multi-agent coordinationfoxctl-memory - Memory system (named_memory, not companion)