Documentation Index
Fetch the complete documentation index at: https://docs.agno.com/llms.txt
Use this file to discover all available pages before exploring further.
DSPyAgent wraps any DSPy Module so it can be served through AgentOS or used standalone.
Install
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
name | str | None | Display name for the agent. |
id | str | None | Unique identifier. Auto-generated from name if unset. |
program | dspy.Module | None | A DSPy module (Predict, ChainOfThought, ReAct, or custom). |
input_field | str | "question" | Name of the input field in the DSPy signature. |
output_field | str | "answer" | Name of the output field on the Prediction. |
lm | dspy.LM | None | Optional LM to scope this agent. Falls back to the global dspy.configure(lm=...). |
program_kwargs | Dict[str, Any] | {} | Extra kwargs passed to the program on every call. |
db | BaseDb | None | Database for session persistence. |
Examples
AgentOS deployment
Serve a DSPy program through AgentOS.
Standalone usage
Call the agent directly with
.run() and .print_response().ReAct with tools
Use
dspy.ReAct to call tools from the program.Sessions
Resume conversations across runs with
session_id.