Skip to content

fix(agents): disable aggressive default schedules in sample agent configs - #1207

Closed
Hypn0sis wants to merge 449 commits into
RightNow-AI:mainfrom
Hypn0sis:pr/fix-sample-agent-schedules
Closed

fix(agents): disable aggressive default schedules in sample agent configs#1207
Hypn0sis wants to merge 449 commits into
RightNow-AI:mainfrom
Hypn0sis:pr/fix-sample-agent-schedules

Conversation

@Hypn0sis

Copy link
Copy Markdown
Contributor

Fixes #1206.

What changed

Removed active [schedule] sections from three sample agent configs that were generating unexpected LLM calls after the auto-spawn feature landed in efbefa1 (v0.6.9):

  • agents/orchestrator/agent.toml — was continuous { check_interval_secs = 120 } (~30 calls/hr)
  • agents/ops/agent.toml — was periodic { cron = "every 5m" } (~12 calls/hr)
  • agents/health-tracker/agent.toml — was periodic { cron = "every 1h" } (~1 call/hr)

Each section is replaced with a commented-out example at a conservative interval so users can opt-in explicitly.

agents/security-auditor/agent.toml is unchanged — its proactive schedule is event-driven, not timer-based.

Why

Before efbefa1, agents in ~/.openfang/agents/ were never auto-spawned on boot, so their [schedule] sections were inert. After efbefa1, they activate immediately on daemon restart, generating ~630 unexpected LLM calls/day and ~€5/day in API costs for users who have sample agents installed.

Philippe Branchu and others added 30 commits March 28, 2026 04:19
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The agent config reload logic was missing skills and mcp_servers from
the change detection, so edits to these fields in agent.toml weren't
being picked up when loading agents from SQLite.

Added both fields to the comparison to ensure proper hot-reload.
The skills and mcp_servers fields must be at the top level of the
agent.toml, not after [capabilities], due to TOML implicit table
ordering rules.
… detection

- Bump workspace version and Tauri config to 0.5.5 (fixes users stuck on 0.5.1)
- Add ssrf_allowed_hosts config for self-hosted K8s environments (Jerry Jaz)
- Raise Ollama discovered model defaults to 128K context / 16K output (Cureator)
- Expand embedding auto-detection: OpenAI, Groq, Mistral, Together, Fireworks, Cohere, then local providers (Thunder Guardian)

All tests passing. 9 files changed, 272 insertions.
feat: add SearXNG search provider with custom URL and JSON output
fix: Alpine Expression Error in settings page caused by x-show
channels: add startup timeout for Telegram control-plane calls
feat(runtime): recover nested XML tool call parameters
Fix token estimation: include ToolUse arguments in text_length
Fix silent reinforcement: recognize [SILENT] token
Replace SHA256 password hashing with Argon2id for dashboard auth
jaberjaber23 and others added 25 commits May 12, 2026 15:34
feat(discord): smart auto-thread mode (true/false/smart)
fix: system prompt and identity handling, and config form hydration
…figs

Commit 8f20cc2 ("chat agents", v0.6.9) introduced auto-spawning of all
agents found in ~/.openfang/agents/ on boot (issue #1140). Three sample
agents carried [schedule] sections that were silently ignored before
auto-spawn existed:

  orchestrator: continuous every 120s  -> ~30 LLM calls/hr
  ops:          periodic  every 5m     -> ~12 LLM calls/hr
  health-tracker: periodic every 1h   -> ~1 LLM call/hr

Together these generated ~630 unexpected LLM calls/day and ~5 EUR/day
in API costs for any user who installed the sample agents before
enabling auto-spawn.

Fix: remove active [schedule] sections from all three files and replace
with commented-out examples at conservative intervals. Users who want
autonomous mode can uncomment and tune the values explicitly.

security-auditor is not changed — its proactive/event-driven schedule
only fires on agent_spawned/terminated events, not on a timer.
@Hypn0sis

Copy link
Copy Markdown
Contributor Author

The Security Audit CI failure is unrelated to this PR's changes.

Root cause: RUSTSEC-2026-0141 (lettre 0.11.21, severity 9.1 critical, advisory 2026-05-14) in openfang-channels — not touched by this PR (agent TOML files only).

The rand and gimli warnings are pre-existing and configured as allowed warnings in the audit config.

Fix is in a separate PR (upgrading lettre to 0.11.22). This PR can be reviewed and merged independently.

@Hypn0sis
Hypn0sis force-pushed the pr/fix-sample-agent-schedules branch from 5e1aea3 to e5a0c46 Compare July 3, 2026 07:51
@Hypn0sis Hypn0sis closed this by deleting the head repository Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(agents): sample agent configs have aggressive default schedules that generate unexpected LLM costs after v0.6.9 auto-spawn