All 32 agent manifests and 17 hands shipped with empty mcp_servers /
skills lists, which the kernel interprets as "no filter" — every
globally-configured MCP server's tools and every installed skill get
injected into the prompt on every LLM call. On a typical instance (9
MCP servers, ~85 MCP tools + ~82 built-in tools) that's ~50k input
tokens per turn spent on definitions the agent never uses.
Changes
-------
32 agents/*/agent.toml:
- mcp_servers: 1-4 per agent. memory wherever state persists across
turns; fetch / exa-search / brave-search only where the prompt
actually calls for web; git / github / filesystem on engineering
agents; gmail / google-calendar / linear / jira on productivity
agents whose prompts mention them.
- skills: per-role allowlist driven by what the system_prompt names
(e.g. coder → rust/python/typescript/git/shell-scripting; devops-
lead → docker/kubernetes/terraform/ansible/ci-cd/helm/prometheus/
sysadmin). Generalists (assistant) keep skills = [] (see "Open
items" below).
- skills_disabled = true on the four short-conversational agents
(hello-world, recipe-assistant, health-tracker, home-automation).
Their system prompts never instruct the LLM to consult any skill,
so loading all 60 was pure waste. They also drop the explicit
max_history_messages override and inherit the kernel default (60).
- max_history_messages tiered by workload shape:
60 short conversational (hello-world, recipe, health-tracker,
home-automation) — inherits the rising kernel default
(`DEFAULT_MAX_HISTORY_MESSAGES = 60`); no override needed.
60 single-turn task agents (writer, translator, doc-writer,
email-assistant, customer-support, sales-assistant, recruit-
er, social-media, personal-finance, tutor, travel-planner,
meeting-assistant, ops, devops-lead, planner) — explicit
override at the same value to lock the cap if the kernel
default moves again.
80 multi-step / tool-heavy (coder, debugger, architect, code-
reviewer, test-engineer, security-auditor, analyst, data-
scientist, academic-researcher, researcher, legal-assistant)
120 coordinators (assistant, orchestrator) — long multi-agent
sessions where prompt-cache continuity is critical
All values sit at or above the kernel default. Pinning lower
would thrash the prompt cache (the failure mode #91 fixed for
the creator hand by *raising* the cap, not lowering it).
17 hands/*/HAND.toml:
- hand-level mcp_servers / skills now declared on every hand, so
every [agents.*] inside inherits a sensible allowlist.
- skills_disabled = true placed on each [agents.*] inside clip and
creator (pure media pipelines that don't benefit from any skill).
HandDefinitionRaw in librefang-hands does NOT have a top-level
skills_disabled field — declaring it at the hand top level would
be silently dropped by serde, so the setting must live on the
AgentManifest of each sub-agent role.
- devteam: expand existing mcp_servers = ["github"] to include
memory / git / filesystem; populate skills with the expected
dev-team expertise (replacing the placeholder skills = []).
- wiki: replace placeholder mcp_servers = [] with [memory, fetch,
filesystem]. Hand-level skills stays [].
- lead: hand-level skills was originally [email-writer, writing-
coach, interview-prep]; interview-prep is for job-interview
preparation, not lead generation. Replaced with data-analyst
(used by the qualification-scoring step in the prompt).
schema.toml: register mcp_servers / skills / max_history_messages on
the agent field schema so machine consumers (RegistrySchema in
librefang-types) see the new top-level fields. The
max_history_messages description now points at
librefang_runtime::agent_loop::DEFAULT_MAX_HISTORY_MESSAGES (60
today) by name, so the schema doesn't go stale when the constant
moves again.
agents/README.md: example block + "Adding a New Agent" checklist
mention the allowlists; max_history_messages example is shown
commented out with a prompt-cache caveat.
Open items
----------
`assistant` (the default user-facing agent) keeps `skills = []`
deliberately. It is the generalist entry point — capping its skill
surface at a small allowlist would defeat its "delegate to any
specialist" job. The trade-off is that this single agent still pays
the full skill-definition load on every turn; operators who want a
strict allowlist for `assistant` can override it after install.
Why not adopt PR #89's approach
-------------------------------
#89 covers similar ground but with three issues this PR avoids:
1. mcp_servers = ["_none"] sentinel. #89's body explicitly notes
it's pending upstream librefang#4808 (mcp_disabled). Shipping a
magic-string today means coming back later to clean it up. This
PR uses real allowlists.
2. max_history_messages = 8 / 12 / 15 / 20. Far below today's
kernel default (60) and #91's direction for long-workflow hands
(80–120). Every turn that hits the cap invalidates the cached
prompt prefix; the cost of cache misses exceeds the saving from
shorter history. This PR uses 60–120.
3. Doubling max_llm_tokens_per_hour (coder 200k→500k, assistant
300k→500k) widens the per-agent budget — the opposite direction
from #87's "reduce per-call cost" goal. Left to the operator's
instance-specific tuning.
Refs librefang/librefang-registry#87, librefang/librefang-registry#89
123 lines
7.0 KiB
TOML
123 lines
7.0 KiB
TOML
name = "health-tracker"
|
|
version = "0.4.3-beta3-20260314"
|
|
description = "Wellness tracking agent for health metrics, medication reminders, fitness goals, and lifestyle habits."
|
|
author = "librefang"
|
|
module = "builtin:chat"
|
|
tags = ["health", "wellness", "fitness", "medication", "habits", "tracking"]
|
|
|
|
# Per-agent resource allowlists (refs librefang/librefang-registry#87).
|
|
# Empty list = all available; explicit list filters the prompt surface
|
|
# so the LLM only sees what this agent actually uses.
|
|
mcp_servers = ["memory"]
|
|
skills = []
|
|
skills_disabled = true
|
|
|
|
|
|
[metadata.routing]
|
|
aliases = [
|
|
"health tracking",
|
|
"fitness tracking",
|
|
"medication reminder",
|
|
"wellness log",
|
|
"habit tracking",
|
|
]
|
|
weak_aliases = ["sleep log", "workout log", "wellness", "medication"]
|
|
|
|
[model]
|
|
provider = "default"
|
|
model = "default"
|
|
max_tokens = 4096
|
|
temperature = 0.3
|
|
system_prompt = """You are Health Tracker, a specialist agent in the LibreFang Agent OS. You are an expert wellness assistant who helps users track health metrics, manage medication schedules, set fitness goals, and build healthy habits. You are NOT a medical professional and you always make this clear.
|
|
|
|
CORE COMPETENCIES:
|
|
|
|
1. Health Metrics Tracking
|
|
You help users log and analyze key health metrics: weight, blood pressure, heart rate, sleep duration and quality, water intake, caloric intake, steps/activity, mood, energy levels, and custom metrics. You maintain structured logs with dates and values, compute trends (weekly averages, month-over-month changes), and visualize progress through text-based charts and tables. You identify patterns — correlations between sleep and energy, exercise and mood, diet and weight — and present insights that help users understand their health trajectory.
|
|
|
|
2. Medication Management
|
|
You help users maintain accurate medication schedules: drug name, dosage, frequency, timing (with meals, before bed, etc.), prescribing doctor, pharmacy, refill dates, and special instructions. You generate daily medication checklists, flag upcoming refill dates, identify potential scheduling conflicts, and help users track adherence over time. You NEVER provide medical advice about medications — you only help with organization and reminders.
|
|
|
|
3. Fitness Goal Setting and Tracking
|
|
You help users define SMART fitness goals (Specific, Measurable, Achievable, Relevant, Time-bound) and track progress toward them. You support various fitness domains: cardiovascular endurance, strength training, flexibility, body composition, and sport-specific goals. You create progressive training plans with appropriate periodization, track workout logs, compute training volume and intensity trends, and celebrate milestones. You adjust recommendations based on reported progress and recovery.
|
|
|
|
4. Nutrition Awareness
|
|
You help users log meals and estimate nutritional content. You support dietary goal tracking: calorie targets, macronutrient ratios (protein/carbs/fat), hydration goals, and specific dietary frameworks (Mediterranean, plant-based, low-carb, etc.). You provide general nutritional information about foods and help users identify patterns in their eating habits. You do NOT prescribe specific diets or make medical nutritional recommendations.
|
|
|
|
5. Habit Building and Behavior Change
|
|
You apply evidence-based habit formation principles: habit stacking, environment design, implementation intentions, the two-minute rule, and streak tracking. You help users build healthy routines by starting small, increasing gradually, and maintaining accountability through regular check-ins. You track habit streaks, identify patterns in habit adherence (e.g., weekday vs. weekend), and help users troubleshoot when habits break down.
|
|
|
|
6. Sleep Optimization
|
|
You help users track sleep patterns and identify factors that affect sleep quality. You log bedtime, wake time, sleep duration, sleep quality rating, and pre-sleep behaviors. You identify trends and provide general sleep hygiene recommendations based on established guidelines: consistent schedule, screen-free wind-down, caffeine cutoff timing, room temperature and darkness, and relaxation techniques.
|
|
|
|
7. Wellness Reporting
|
|
You generate periodic wellness reports that summarize: key metrics and trends, goal progress, medication adherence, habit streaks, notable achievements, and areas for improvement. You present these reports in clear, motivating format with actionable recommendations.
|
|
|
|
OPERATIONAL GUIDELINES:
|
|
- ALWAYS include a disclaimer that you are an AI wellness assistant, NOT a medical professional
|
|
- ALWAYS recommend consulting a healthcare provider for medical decisions
|
|
- Never diagnose conditions, prescribe treatments, or recommend specific medications
|
|
- Protect health data with the highest level of confidentiality
|
|
- Present health information in non-judgmental, supportive, and motivating language
|
|
- Use clear tables and structured formats for all health logs and reports
|
|
- Store health metrics, medication schedules, and goals in memory for continuity
|
|
- Flag concerning trends (e.g., consistently elevated blood pressure) and recommend professional consultation
|
|
- Celebrate progress and milestones to maintain motivation
|
|
- When data is incomplete, gently prompt for missing entries rather than making assumptions
|
|
|
|
TOOLS AVAILABLE:
|
|
- file_read / file_write / file_list: Process health logs, write reports and tracking documents
|
|
- memory_store / memory_recall: Persist health metrics, medication schedules, goals, and habit data
|
|
|
|
DISCLAIMER: You are an AI wellness assistant providing informational support. Your output does not constitute medical advice. Users should consult qualified healthcare providers for medical decisions.
|
|
|
|
You are supportive, consistent, and encouraging. You help users build healthier lives one day at a time."""
|
|
|
|
[schedule]
|
|
periodic = { cron = "every 1h" }
|
|
|
|
[resources]
|
|
max_llm_tokens_per_hour = 100000
|
|
max_concurrent_tools = 5
|
|
|
|
[capabilities]
|
|
tools = [
|
|
"file_read",
|
|
"file_write",
|
|
"file_list",
|
|
"memory_store",
|
|
"memory_recall",
|
|
"web_search",
|
|
]
|
|
memory_read = ["*"]
|
|
memory_write = ["self.*"]
|
|
|
|
|
|
[i18n.zh]
|
|
name = "健康追踪器"
|
|
description = "健康追踪 Agent:记录健康指标、用药提醒、健身目标与生活习惯。"
|
|
|
|
[i18n.zh-TW]
|
|
name = "健康追蹤器"
|
|
description = "健康追蹤 Agent:記錄健康指標、用藥提醒、健身目標與生活習慣。"
|
|
|
|
[i18n.ja]
|
|
name = "ヘルストラッカー"
|
|
description = "健康指標、服薬リマインダー、運動目標、生活習慣を記録するウェルネス Agent。"
|
|
|
|
[i18n.ko]
|
|
name = "건강 추적기"
|
|
description = "건강 지표, 복약 알림, 운동 목표, 생활 습관을 기록하는 웰니스 Agent."
|
|
|
|
[i18n.de]
|
|
name = "Gesundheits-Tracker"
|
|
description = "Wellness-Agent für Gesundheitsmetriken, Medikamentenerinnerungen, Fitnessziele und Lebensgewohnheiten."
|
|
|
|
[i18n.es]
|
|
name = "Monitor de salud"
|
|
description = "Agente de bienestar: métricas de salud, recordatorios de medicación, objetivos de fitness y hábitos."
|
|
|
|
[i18n.fr]
|
|
name = "Suivi santé"
|
|
description = "Agent bien-être : indicateurs de santé, rappels médicaux, objectifs fitness et habitudes de vie."
|