Repository navigation
v0.9.0: memory tools for Symfony AI agents
Memory tools for Symfony AI agents, so the model decides when to look something up and what to remember.
Recall (recall_memory), Retain (retain_memory) and Reflect (reflect_memory) carry #[AsTool] with described parameters and go into a Toolbox like any other tool:
use Fedoseev\Hindsight\Symfony\Ai\Tools\Recall;
use Fedoseev\Hindsight\Symfony\Ai\Tools\Retain;
use Symfony\AI\Agent\Agent;
use Symfony\AI\Agent\Toolbox\Toolbox;
$toolbox = new Toolbox([new Recall($hindsight, $bank), new Retain($hindsight, $bank)]);
$agent = new Agent($platform, 'gpt-5-mini', toolbox: $toolbox);Texts and defaults match the Laravel AI SDK tools. When Hindsight fails, the model is told that memory is unavailable and the error goes to the logger you pass. The README shows how to give a second bank's tool its own name.
HindsightMemory no longer sends tags_match without tags; the server ignored it, so recalls do not change.
Tested with symfony/ai-agent 0.15 and 1.0.0-BETA1. Changelog