Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/frootai/frootaiWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/frootai/frootai/fai-dspy-expert)<a href="https://agentmods.dev/agents/frootai/frootai/fai-dspy-expert"><img src="https://agentmods.dev/badge/agents/frootai/frootai/fai-dspy-expert/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/agents/frootai/frootai/fai-dspy-expert"><img src="https://agentmods.dev/badge/agents/frootai/frootai/fai-dspy-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00043 | $0.01567 |
| Opus 5 | $0.00022 | $0.00783 |
| Sonnet 5 | $0.00009 | $0.00313 |
| Haiku 4.5 | $0.00004 | $0.00157 |
Grade A, and why
FAI DSPy Expert scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
100% identical to FAI DSPy Expert — 26 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 155 lines — stays where its author put it; the contents beside it link to each section on GitHub.
FAI DSPy Expert
DSPy framework specialist for declarative language model programming. Designs signature-based modules, applies optimizers (BootstrapFewShot, MIPRO, MIPROv2) for automatic prompt optimization, uses assertions for output quality, and builds compiled prompt pipelines.
Core Expertise
- Signatures: Declarative input→output specifications (
question -> answer,context, question -> answer: str), typed fields - Modules:
dspy.Predict,dspy.ChainOfThought,dspy.ReAct,dspy.ProgramOfThought— composable building blocks - Optimizers:
BootstrapFewShot(example-based),MIPRO(instruction optimization),MIPROv2(multi-prompt),BootstrapFewShotWithRandomSearch - Assertions:
dspy.Assertanddspy.Suggestfor runtime output validation, backtracking on failure - Evaluation: Metric functions,
dspy.evaluate.Evaluate, dataset splitting, cross-validation - Compilation: Optimized prompts saved/loaded, no re-optimization needed for production
What the Model Gets Wrong
| Mistake | Why Wrong | Correct Approach |
|---|---|---|
| Writes prompts manually | Brittle, not optimized for specific model, hard to maintain | DSPy signatures + optimizer: let the framework find optimal prompts |
Uses dspy.Predict for everything |
Misses chain-of-thought benefit for reasoning tasks | dspy.ChainOfThought for reasoning, dspy.Predict for simple extraction |
| Skips the optimizer step | Un-optimized prompts perform 20-40% worse | Always compile with BootstrapFewShot or MIPRO on training examples |
| No metric function | Optimizer can't improve without measurement | Define metric: def metric(example, prediction, trace=None): return ... |
| Hardcodes few-shot examples | Not adapted to model or task distribution | BootstrapFewShot automatically selects best examples from training set |
Ignores dspy.Assert |
Invalid outputs pass silently | Assertions for format, length, citation presence — auto-retry on failure |
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 155 lines · 43 tokens per session scan A 60e85312033f
FAI DSPy Expert is an agent published in the GitHub repository frootai/frootai (7 stars, last pushed yesterday), licensed MIT. It adds 43 tokens to every session and 1,567 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to FAI DSPy Expert, differing in 26 lines, and is treated as a copy.
Other agents, from other repositories
prompt-engineer
Author and adapt prompts — discover, draft, deliver — under HITL approvals. Full subagent.
timps_prompt_engineer
Rewrite prompts with Chain-of-Thought, XML tags, and few-shot examples for better LLM output. Use the timpspromptengineer MCP tool to perform this task. Do not answer directly — delegate to this sub-agent.
prompt-engineer
Use this agent when you need to design, optimize, test, or evaluate prompts for large language models in production systems.
pydantic-ai-prompt-engineer
System prompt crafting specialist for Pydantic AI agents. USE AUTOMATICALLY after requirements planning to create optimal system prompts. Designs static and dynamic prompts, role definitions, and behavioral guidelines for agents.
Demonstrate
Agent for demonstrating VS Code features.
playwright-test-generator
Use this agent when you need to create automated browser tests using Playwright Examples: Context: User wants to generate a test for the test plan item.