spora-ai / spora-plugin-memories
Persistent memory storage for agents and users — UI + memory/global_memory tools.
Package info
github.com/spora-ai/spora-plugin-memories
Type:spora-plugin
pkg:composer/spora-ai/spora-plugin-memories
Requires
- php: ^8.4.1
- spora-ai/spora-core: >=0.12.0 <2.0.0
- spora-ai/spora-plugin-memories-frontend: >=0.1.0 <2.0.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.94
- larastan/larastan: ^3.9
- mockery/mockery: ^1.6
- pestphp/pest: ^5.0
- phpstan/phpstan: ^2.1
- phpstan/phpstan-mockery: ^2.0
This package is auto-updated.
Last update: 2026-08-02 12:47:25 UTC
README
Persistent memory storage for agents and users — UI + memory / global_memory tools for Spora agents.
This plugin contributes the Memories admin panel to the host's Apps dropdown. The panel is a pre-built Vue SPA delivered as a separate Composer package (spora-ai/spora-plugin-memories-frontend, type spora-plugin-frontend). The two-package split lets the frontend evolve on its own release cadence and lets backend-only operators skip the bundle entirely.
Install
composer require spora-ai/spora-plugin-memories
The PHP package's require block pulls the frontend package in transitively — operators don't need to require it separately. The PHP package ships the migration (memories table), the controllers, the service layer, and the two memory tools (memory and global_memory); the frontend package ships the Vue IIFE bundle that the host SPA lazy-loads at runtime.
Requires spora-ai/spora-core ≥ 0.12.0 (when this plugin shipped, the memories feature was extracted out of core and the host was bumped to drop the previous core implementation).
What it does
- Surfaces rows from the
memoriestable as a sidebar-and-detail admin panel scoped per user (global) and per agent. - Creates a
memories_000001_create_memories_table.phpmigration. On installs upgrading from a host that already shipped thememoriestable, the migration'shasTable('memories')guard makes it a no-op. - Ships two LLM-callable tools —
memory(agent-scoped) andglobal_memory(cross-agent, per user) — each withlist,get,save, anddeleteoperations. List / get / save auto-approve; onlydeleterequires explicit user approval (it is destructive). - Adds a bundled agent template (
memories-assistant.json) under the plugin'sagent-templates/directory, wiring both tools onto the host's default system prompt with explicit guidance on when to use each.
API surface
After install, 12 endpoints appear under /api/v1/memories*:
GET /api/v1/memories— list the current user's global memories.POST /api/v1/memories— create a global memory.PATCH /api/v1/memories/reorder— reorder global memories.GET /api/v1/memories/{id}— fetch a single global memory.PUT /api/v1/memories/{id}— update a global memory.DELETE /api/v1/memories/{id}— delete a global memory.GET /api/v1/agents/{agentId}/memories— list memories for one agent.POST /api/v1/agents/{agentId}/memories— create an agent memory.PATCH /api/v1/agents/{agentId}/memories/reorder— reorder agent memories.GET /api/v1/agents/{agentId}/memories/{memoryId}— fetch one agent memory.PUT /api/v1/agents/{agentId}/memories/{memoryId}— update an agent memory.DELETE /api/v1/agents/{agentId}/memories/{memoryId}— delete an agent memory.
All endpoints require AuthMiddleware + CsrfMiddleware.
Uninstalling
composer remove spora-ai/spora-plugin-memories removes the admin-panel metadata from the App Registry, drops the 12 routes, and the navbar tile disappears cleanly. The memories table is preserved — uninstalling does not Capsule::schema()->dropIfExists('memories'). Reinstalling is a no-op on the schema. This is intentional: data persists across plugin uninstall/reinstall cycles.
Reference
The canonical reference (REST contract, schema, tool definitions, agent template schema) lives on the docs site at docs.spora-ai.com/develop/plugins/reference/memories.
If that URL is unreachable (the page may not have published yet), the source-of-truth copy lives in the spora-docs repo at docs/develop/plugins/reference/memories.md.
License
MIT — see LICENSE.