Skip to content

Releases

v0.3.0: Guzzle 8 and a Laravel Boost skill

Choose a tag to compare

@skybleak333 skybleak333 released this 06 Nov 11:28

Added

  • A Laravel Boost guideline and the hindsight-php-agent-memory agent skill. php artisan boost:install offers them under third-party packages (checked with Boost 2.10.4).

Fixed

  • The package can be installed in a new Laravel 13 application: it allows Guzzle 8, which Laravel 13.40 installs by default. Before, Composer refused fedoseev/hindsight-php there unless Guzzle was downgraded. CI now runs on Guzzle 8 and keeps a Guzzle 7 job.

v0.2.0: queued retains and Hindsight::fake()

Choose a tag to compare

@skybleak333 skybleak333 released this 06 Nov 10:37

Agent memory that waits out an outage of the Hindsight API, and memory you can test without a server.

// Store each exchange from a queue worker, with retries that never store it twice.
Memory::bank("user-{$this->user->id}")->queue();

// In tests
Hindsight::fake(['user-1' => ['Alice is on the Pro plan']]);
Hindsight::assertRetained('user-1', fn (string $content) => str_contains($content, 'renews'));

Tested in CI on PHP 8.2–8.5, Laravel 12 and 13, Laravel AI SDK 1.0 and 1.3, and real Hindsight 1.1.0 and 1.2.0 servers.

Added

  • Hindsight::fake() and Fedoseev\Hindsight\Testing\HindsightFake: an in-memory server for tests, with assertRetained(), assertNotRetained(), assertNothingRetained(), assertRecalled(), assertNotRecalled() and assertReflected(). It follows the server where tests depend on it: a bank nobody wrote to answers 404, tag filters select the same memories, a retain with a document ID replaces the document, an async retain repeated with the same operation ID stores nothing new, and invalid operation IDs, timestamps, tags, metadata values and update modes are rejected with the server's status. unavailable() simulates an outage, respondTo() stubs other endpoints.
  • RetainMemory job and Memory::queue(): store memories from a queue worker, retried with backoff while the Hindsight API is unavailable (six attempts over about 36 minutes by default; earlier attempts log a warning, only a failure on the last attempt is reported). Every attempt sends the operation ID the job got when it was dispatched, so a retry never stores a memory twice, and the dispatch time as the memory's timestamp. Errors a retry cannot fix fail the job at once and are reported.
  • queue section in config/hindsight.php: connection, queue, tries, backoff and payload encryption.
  • Bank aliases: listBankAliases(), addBankAlias(), setPrimaryBankAlias() and removeBankAlias(), on the client and the facade.
  • retryOperation() to queue a failed or cancelled operation again.
  • CI also runs the integration suite against Hindsight 1.2.0, and compares the fake with real 1.1.0 and 1.2.0 servers.

Changed

  • Hindsight is no longer final, so HindsightFake can stand in for it. Other subclasses are not supported.

v0.1.0

Choose a tag to compare

@skybleak333 skybleak333 released this 30 Oct 15:26

First release of a PHP client for Hindsight agent memory, with long-term memory for Laravel AI SDK agents.

Client

  • Retain (single, batch, async), recall and reflect, plus banks, bank configuration, memories, documents, directives, mental models and operations. request() reaches any other endpoint.
  • waitForOperation() for async work, typed responses for the main calls, and one exception per failure mode.
  • Hindsight answers 200 for parameters it does not know and names them in an X-Ignored-Params header. The client turns that header into a warning for any PSR-3 logger, so a typo in options does not change results without a sign.

Laravel

  • Service provider, config, facade and php artisan hindsight:status.
  • Memory agent middleware: recalls relevant memories before the first step, retains the exchange after the step that ends the run. Best effort by default, with a 10-second timeout, so a Hindsight outage never takes the agent down.
  • Recall, Retain and Reflect tools for agents that should decide for themselves.

Tested

  • Every request in the unit tests is checked against Hindsight's OpenAPI 1.1.0 document, stricter than the server.
  • CI runs the integration suite against a real Hindsight 1.1.0 server (no LLM, no API keys), on PHP 8.2–8.5, Laravel 12 and 13, Laravel AI SDK 1.0 and 1.3, and the lowest allowed dependencies.

This is a community package, not affiliated with Vectorize.