Skip to content

v3.12.0

Choose a tag to compare

@adham90 adham90 released this 08 Apr 13:12
· 46 commits to main since this release

Added

  • Knowledge DSL — Inject domain knowledge into agent system prompts with knows :refund_policy (static files) or knows(:data) { ... } (dynamic blocks). Supports conditional inclusion via if: option, multi-entry knows :a, :b, :c, and automatic ## Heading formatting. Default knowledge_path is app/agents/knowledge
  • Analytics page — Filterable cost intelligence dashboard with period-over-period comparison, daily cost chart overlay, model efficiency table, error cost breakdown, monthly projection, and savings opportunity detection
  • Dashboard-overridable agent settings — Mark DSL fields with overridable: true (e.g., model "gpt-4o", overridable: true) to allow tuning from the dashboard without code deploys. Stored in agent_overrides table
  • Tenant dashboard enhancements — Analytics section with trend chart, usage breakdowns by model/agent, and refresh counters button on tenant show page
  • Average cost/tokens per call — Agent show page now displays average cost and token usage per execution

Fixed

  • Instrumentation middleware — model_provider, chosen_model_id, and finish_reason now correctly populate on execution records (fixes #23)
  • check_total_timeout! math bug — Timeout error now reports the configured timeout value instead of an inflated number
  • Prior period boundary overlap — Analytics prior period scope uses exclusive range to prevent boundary-day double-counting
  • Budget middleware double tenant lookup — Tenant record is now resolved once per request instead of twice (check + record)
  • trend_analysis N+1 queries — Replaced 28 individual queries (4 per day × 7 days) with a single GROUP BY query
  • daily_report excessive queries — Consolidated 11 individual count/sum queries into a single aggregated query
  • Analytics view XSS hardening — Replaced raw helper with .to_json.html_safe for data injection in JavaScript blocks

Removed

  • Orchestration/sub-agents feature — Removed as out of scope for this gem

Full Changelog: v3.11.0...v3.12.0