AACFlow

DSPy

Run predictions using self-hosted DSPy programs

Usage Instructions

Integrate with your self-hosted DSPy programs for LLM-powered predictions. Supports Predict, Chain of Thought, and ReAct agents. DSPy is the framework for programming—not prompting—language models.

Tools

dspy_predict

Input

ParameterTypeRequiredDescription
baseUrlstringYesNo description
apiKeystringNoNo description
endpointstringNoNo description
inputstringYesNo description
inputFieldstringNoName of the input field expected by the DSPy program (defaults to "text")
contextstringNoNo description
additionalInputsjsonNoNo description

Output

ParameterTypeDescription
answerstringThe main output/answer from the DSPy program
reasoningstringThe reasoning or rationale behind the answer (if available)
statusstringResponse status from the DSPy server (success or error)
rawOutputjsonThe complete raw output from the DSPy program (result.toDict())

dspy_chain_of_thought

Run a Chain of Thought prediction using a self-hosted DSPy ChainOfThought program endpoint

Input

ParameterTypeRequiredDescription
baseUrlstringYesNo description
apiKeystringNoNo description
endpointstringNoNo description
questionstringYesNo description
contextstringNoNo description

Output

ParameterTypeDescription
answerstringThe answer generated through chain of thought reasoning
reasoningstringThe step-by-step reasoning that led to the answer
statusstringResponse status from the DSPy server (success or error)
rawOutputjsonThe complete raw output from the DSPy program (result.toDict())

dspy_react

Run a ReAct agent using a self-hosted DSPy ReAct program endpoint for multi-step reasoning and action

Input

ParameterTypeRequiredDescription
baseUrlstringYesNo description
apiKeystringNoNo description
endpointstringNoNo description
taskstringYesNo description
contextstringNoNo description
maxIterationsnumberNoNo description

Output

ParameterTypeDescription
answerstringThe final answer or result from the ReAct agent
reasoningstringThe overall reasoning summary from the agent
trajectoryarrayThe step-by-step trajectory of thoughts, actions, and observations
thoughtstringThe reasoning thought at this step
toolNamestringThe name of the tool/action called
toolArgsjsonArguments passed to the tool
observationstringThe observation/result from the tool execution
statusstringResponse status from the DSPy server (success or error)
rawOutputjsonThe complete raw output from the DSPy program (result.toDict())

On this page

Start building today
Trusted by over 100,000 builders.
The SaaS platform to build AI agents and run your agentic workforce.
Get started