dspy-react-agent-builder
Use for ReAct agents, tool-calling agents, dspy.ReAct, multi-step reasoning and acting, and GEPA agent optimization.
Skill by OmidZamani
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/omidzamani-dspy-react-agent-builder
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: frontend, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Python package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/dspy-react-agent-builder
What's inside
- Skill name
dspy-react-agent-builder- Description
- Use for ReAct agents, tool-calling agents, dspy.ReAct, multi-step reasoning and acting, and GEPA agent optimization.
- License
- MIT
- Instructions
- 203 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Agent Skills spec issues
- allowed-tools: must be a space-separated string
Files (2)
- SKILL.md
- example.py
SKILL.md (first lines)
# DSPy ReAct Agent Builder
## Goal
Build production-quality ReAct agents that use tools to solve complex multi-step tasks with reasoning, acting, and error handling.
## When to Use
- Multi-step tasks requiring tool use
- Search + reasoning workflows
- Complex question answering with external data
- Tasks needing calculation, retrieval, or API calls
## Related Skills
- Optimize agents: [dspy-gepa-reflective](../dspy-gepa-reflective/SKILL.md)
- Connect MCP tools: [dspy-mcp-tool-integration](../dspy-mcp-tool-integration/SKILL.md)
- Configure native tool calling: [dspy-adapters-multimodal](../dspy-adapters-multimodal/SKILL.md)
- Define signatures: [dspy-signature-designer](../dspy-signature-designer/SKILL.md)
- Evaluate performance: [dspy-evaluation-suite](../dspy-evaluation-suite/SKILL.md)
## Inputs
| Input | Type | Description |
|-------|------|-------------|
| `signature` | `str` | Task signature (e.g., "question -> answer") |
| `tools` | `list[callable]` | Available tools/functions |
| `max_iters` | `int` | Max reasoning steps (default: 20) |
## Outputs
| Output | Type | Description |
|--------|------|-------------|
| `agent` | `dspy.ReAct` | Configured ReAct agent |
## Workflow
### Phase 1: Define Tools
Tools are Python functions with clear docstrings. The agent uses docstrings to understand tool capabilities:
```python
import dspy
def search(query: str) -> list[str]:
"""Search knowledge base for relevant information.
Args:
query: Search query string
Returns:
List of relevant text passages
"""
retriever = dspy.ColBERTv2(url='http://20.102.90.50:2017/wiki17_abstracts')
results = retriever(query, k=3)
return [r['text'] for r in results]
def calculate(expression: str) -> float:
"""Safely evaluate mathematical expressions.
Args:
expression: Math expression (e.g., "2 + 2", "sqrt(16)")
Returns:
Numerical result
"""
try:
with dspy.PythonInterpreter() as interpreter:
return interpreter.execute(expression)
except Exception as e:
return f"Error: {e}"
```
### Phase 2: Create ReAct Agent
```python
# Configure LM
dspy.configure(lm=dspy.LM("openai/gpt-4o-mini"))
# Create agent
agent = dspy.ReAct(
signature="question -> answer",
tools=[search, calculate],
max_iters=5
)
# Use agent
result = agent(question="What is the population of Paris plus 1000?")
print(result.answer)
```
### Phase 3: Production Agent with Error Handling
```python
import dspy
import logging
logger = logging.getLogger(__name__)
class ResearchAgent(dspy.Module):
"""Production agent with error handling and logging."""
def __init__(self, max_iters: int = 5):
self.max_iters = max_iters
self.agent = dspy.ReAct(
signature="question -> answer",
tools=[self.search, self.calculate, self.summarize],
max_iters=max_iters
)
def search(self, query: str) -> list[str]:
"""Search for relevant documents."""
try:
retriever = dspy.ColBERTv2(
url='http://20.102.90.50:2017/wiki17_abstracts'
)
results = retriever(query, k=5)
return [r['text'] for r in results]
except Exception as e:From OmidZamani/dspy-skills, MIT.
More from OmidZamani/dspy-skills
- 0.674score
dspy-haystack-integration
OmidZamani
Use for integrating DSPy with Haystack, optimizing Haystack prompts, improving retrieval pipelines, and extracting DSPy prompts.
SkillCFreshness: C★ 124Claude Code +9 - 0.668score
dspy-adapters-multimodal
OmidZamani
Use for DSPy adapter selection, JSONAdapter, XMLAdapter, ChatAdapter, native function calling, structured outputs, and multimodal inputs like dspy.Image or…
SkillCFreshness: C★ 124Claude Code +9 - 0.668score
dspy-advanced-module-composition
OmidZamani
Use for composing DSPy modules with Ensemble, MultiChainComparison, ensemble voting, sequential pipelines, and multi-program workflows.
SkillCFreshness: C★ 124Claude Code +9 - 0.668score
dspy-evaluation-suite
OmidZamani
Use for evaluating DSPy programs with Evaluate, answer_exact_match, SemanticF1, custom metrics, baselines, and program comparisons.
SkillCFreshness: C★ 124Claude Code +9 - 0.668score
dspy-production-deployment
OmidZamani
Use for deploying DSPy with save/load, configure_cache, restrict_pickle, track_usage, async execution, streaming, and production runtime controls.
SkillCFreshness: C★ 124Claude Code +9 - 0.668score
dspy-rag-pipeline
OmidZamani
Use for RAG pipelines, retrieval augmented generation, ColBERTv2, context retrieval, multi-hop RAG, and grounded DSPy answers.
SkillCFreshness: C★ 124Claude Code +9 - 0.668score
dspy-signature-designer
OmidZamani
Use for DSPy signatures, InputField, OutputField, typed inputs and outputs, signature classes, and Pydantic-style structured schemas.
SkillCFreshness: C★ 124Claude Code +9 - 0.668score
dspy-simba-optimizer
OmidZamani
Use for SIMBA optimization, mini-batch introspective optimization, self-reflective rules, stochastic ascent, and numeric-metric optimization.
SkillCFreshness: C★ 124Claude Code +9 - 0.668score
dspy-reasoning-modules
OmidZamani
Use for DSPy reasoning modules including RLM, ProgramOfThought, CodeAct, Parallel, sandboxed execution, and long-context workflows.
SkillCFreshness: C★ 124Claude Code +9 - 0.668score
dspy-custom-module-design
OmidZamani
Use for creating custom DSPy modules, extending dspy.Module, reusable components, stateful modules, serialization, and module testing.
SkillCFreshness: C★ 124Claude Code +9 - 0.668score
dspy-debugging-observability
OmidZamani
Use for debugging DSPy programs, inspect_history, tracing LLM calls, custom callbacks, observability, monitoring, and cost tracking.
SkillCFreshness: C★ 124Claude Code +9 - 0.668score
dspy-embedding-retrieval
OmidZamani
Use for DSPy retrieval with dspy.Embedder, dspy.Embeddings, FAISS indexes, semantic search, and local or hosted embedding models.
SkillCFreshness: C★ 124Claude Code +9
Signals
- Stars
- 124
- Forks
- 13
- Open issues
- 1
- Last commit (this folder)
- Jun 23, 2026 (4 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/OmidZamani/dspy-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from OmidZamani
- 0.674score
dspy-haystack-integration
OmidZamani
Use for integrating DSPy with Haystack, optimizing Haystack prompts, improving retrieval pipelines, and extracting DSPy prompts.
SkillCFreshness: C★ 124Claude Code +9 - 0.668score
dspy-advanced-module-composition
OmidZamani
Use for composing DSPy modules with Ensemble, MultiChainComparison, ensemble voting, sequential pipelines, and multi-program workflows.
SkillCFreshness: C★ 124Claude Code +9 - 0.668score
dspy-adapters-multimodal
OmidZamani
Use for DSPy adapter selection, JSONAdapter, XMLAdapter, ChatAdapter, native function calling, structured outputs, and multimodal inputs like dspy.Image or…
SkillCFreshness: C★ 124Claude Code +9 - 0.668score
dspy-debugging-observability
OmidZamani
Use for debugging DSPy programs, inspect_history, tracing LLM calls, custom callbacks, observability, monitoring, and cost tracking.
SkillCFreshness: C★ 124Claude Code +9 - 0.668score
dspy-custom-module-design
OmidZamani
Use for creating custom DSPy modules, extending dspy.Module, reusable components, stateful modules, serialization, and module testing.
SkillCFreshness: C★ 124Claude Code +9 - 0.668score
dspy-embedding-retrieval
OmidZamani
Use for DSPy retrieval with dspy.Embedder, dspy.Embeddings, FAISS indexes, semantic search, and local or hosted embedding models.
SkillCFreshness: C★ 124Claude Code +9
Cite this page
dspy-react-agent-builder skill. Agent Mart. https://agentmart.dev/skills/omidzamani-dspy-react-agent-builder (last updated 2026-10-24)