api_key = "YOUR_API_KEY"
default_provider = "openrouter"
default_model = "anthropic/claude-haiku-4.5"
default_temperature = 0.7
provider_timeout_secs = 120

[[model_routes]]
hint = "youtube_analysis"
provider = "openrouter"
model = "google/gemini-2.0-flash-001"

embedding_routes = []

[model_providers]

[extra_headers]

[observability]
backend = "none"
runtime_trace_mode = "none"
runtime_trace_path = "state/runtime-trace.jsonl"
runtime_trace_max_entries = 200

[autonomy]
level = "supervised"
workspace_only = true
allowed_commands = [
    "git", "npm", "cargo", "ls", "cat", "grep",
    "find", "echo", "pwd", "wc", "head", "tail", "date",
    "python3", "node",
    "npx", "yt-dlp",
]
forbidden_paths = [
    "/etc", "/home", "/usr", "/bin", "/sbin",
    "/lib", "/opt", "/boot", "/dev", "/proc", "/sys",
    "/var", "/tmp", "~/.ssh", "~/.gnupg", "~/.aws", "~/.config",
]
max_actions_per_hour = 60
max_cost_per_day_cents = 100
require_approval_for_medium_risk = true
block_high_risk_commands = true
auto_approve = [
    "file_read",
    "memory_recall",
    "cron_list",
    "cron_add",
    "cron_remove",
    "cron_update",
    "cron_run",
    "cron_runs",
    "model_routing_config",
    "delegate",
    "shell",
    "youtube__search_videos",
    "youtube__get_video_details",
    "web_search_tool",
    "web_fetch_tool",
    "web_fetch",
    "web_search",
    "http_request_tool",
    "http_request",
    "tool_search",
]

[security.sandbox]
backend = "auto"

[security.resources]
max_memory_mb = 512
max_cpu_time_seconds = 60
max_subprocesses = 10
memory_monitoring = true

[security.audit]
enabled = true
log_path = "~/.zeroclaw/audit.log"
max_size_mb = 10

[security.otp]
enabled = false
method = "totp"
gated_actions = ["shell", "file_write", "browser_open", "browser", "memory_forget"]

[scheduler]
enabled = true
max_tasks = 64
max_concurrent = 4

[agent]
compact_context = false
max_tool_iterations = 25
max_history_messages = 10
max_context_tokens = 32000

[memory]
backend = "sqlite"
auto_save = true
hygiene_enabled = true
archive_after_days = 7
purge_after_days = 30
embedding_provider = "none"
embedding_model = "text-embedding-3-small"
embedding_dimensions = 1536
vector_weight = 0.7
keyword_weight = 0.3

[cron]
enabled = true
max_run_history = 50

[channels_config]
cli = true
message_timeout_secs = 300
ack_reactions = true
show_tool_calls = true
session_persistence = false

[channels_config.telegram]
bot_token = "YOUR_BOT_TOKEN"
allowed_users = ["YOUR_TELEGRAM_ID"]
stream_mode = "off"
mention_only = false

[secrets]
encrypt = true

[cost]
enabled = true
daily_limit_usd = 5.0
monthly_limit_usd = 20.0
warn_at_percent = 80

[reliability]
provider_retries = 2
provider_backoff_ms = 500

[mcp]
enabled = true
deferred_loading = false

[[mcp.servers]]
name = "youtube"
transport = "stdio"
command = "node"
args = ["/root/.zeroclaw/workspace/youtube-mcp-server.js"]

[agents.Nova]
provider = "openrouter"
model = "anthropic/claude-haiku-4.5"
system_prompt = """You are Nova, a YouTube video specialist.

SEARCH TASK:
1. Call youtube__search_videos with the topic.
2. You MUST then call youtube__get_video_details for EACH of the 3 video URLs.
   This is MANDATORY — do NOT skip it. The details call renders thumbnails in Telegram.
3. After all 3 detail calls complete, write your text summary:

**1. [Title]** — [Channel] ([duration])
- What it covers: [one sentence]
- Key insight: [one sentence]
- Why it matters: [one sentence]

Repeat for all 3 videos. End with: Reply with a number for a detailed summary.

DEEP DIVE TASK (when asked about a video number):
Write a 300-word analysis from the data you already have. Do NOT call any tools.
Format: Main Argument, Key Points (4 bullets), Who Should Watch.

RULES:
- ALWAYS call youtube__get_video_details for ALL 3 videos. Never skip.
- Never use curl or shell.
- Never apologize about technical issues."""
max_depth = 3
agentic = true
allowed_tools = [
    "youtube__search_videos",
    "youtube__get_video_details",
]
max_iterations = 20

[web_search]
enabled = true
provider = "duckduckgo"
max_results = 5

[web_fetch]
enabled = true
allowed_domains = ["*"]

[http_request]
enabled = true

[query_classification]
enabled = true

[[query_classification.rules]]
hint = "youtube_analysis"
keywords = ["youtube", "video", "url"]
patterns = []
priority = 0
