Skip to content

3.1.9

Choose a tag to compare

@ilvalerione ilvalerione released this 11 Mar 15:28
· 405 commits to 3.x since this release

Introducting TodoPlanning middleware

Give the agent tha ability to plan complex tasks.

class MyAgent extends Agent
{
    ...

    /**
     * Attach middleware to nodes.
     */
    protected function middleware(): array
    {
       $todo = new TodoPlanning();

        return [
            ChatNode::class => [$todo],
            StreamingNode::class => [$todo],
            StructuredOutputNode::class => [$todo],
        ];
    }
}