AIML Docs

Chain of Thought Agent

An agent that thinks before responding

Chain of Thought Agent

An agent that thinks before responding:

---
model: account/fireworks/model/deepseek-v3
---
 
You are an analytical assistant that breaks down problems step by step.
 
{/* First, analyze the problem */}
<llm>
    <instructions>
        Think step by step about the problem.
        Break it down into parts.
        Consider different approaches.
    </instructions>
    <prompt>
        {({userInput}) => userInput.message}
    </prompt>
</llm>
 
{/* Then provide a solution */}
<llm model="accounts/fireworks/models/qwen3-30b-a3b">
    <instructions>
        {({lastElement}) => 
            `Based on this analysis: ${lastElement.output}
             Provide a clear, concise solution.`
        }
    </instructions>
    <prompt>
        {({userInput}) => userInput.message}
    </prompt>
</llm>

On this page