feat: integrate SAGE persistent memory for cross-session knowledge#253
Open
l33tdawg wants to merge 1 commit intovxcontrol:mainfrom
Open
feat: integrate SAGE persistent memory for cross-session knowledge#253l33tdawg wants to merge 1 commit intovxcontrol:mainfrom
l33tdawg wants to merge 1 commit intovxcontrol:mainfrom
Conversation
Add SAGE (Sovereign Agent Governed Experience) as an optional persistent memory layer for cross-session knowledge retention. SAGE memories go through BFT consensus, have confidence scores, and decay over time. Components: - pkg/sage/client.go: Ed25519-authenticated HTTP client with persistent keypair - pkg/tools/sage_search.go: sage_recall and sage_remember tool implementations - Agent prompt templates: conditional SAGE instructions for pentester, coder, memorist, and enricher agents (follows existing Graphiti pattern) - docker-compose-sage.yml: composable SAGE + Ollama sidecar for embeddings - Config: SAGE_ENABLED, SAGE_URL, SAGE_KEY_PATH, SAGE_BOT_NAME, SAGE_TIMEOUT Tests: 32 new tests across client, tools, templates, and config packages. Tested against OWASP Juice Shop: SAGE-enhanced run completed 8/8 subtasks covering 7 vulnerability classes with 44 SAGE-related agent messages.
Contributor
|
hey @l33tdawg it looks quite interesting, give us some time to test your product and this integration |
Author
|
No worries mate - let me know if you guys have any questions :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds SAGE (Sovereign Agent Governed Experience) as an optional persistent memory layer for cross-session knowledge retention. SAGE memories go through BFT consensus, have confidence scores, and decay over time — giving PentAGI agents institutional knowledge that survives between engagements.
pkg/sage/client.go) — Ed25519-authenticated HTTP client with persistent keypair identitysage_recall,sage_remember) — registered in pentester, coder, memorist, and enricher executorsdocker-compose-sage.yml) — SAGE node + Ollama for semantic embeddingsSAGE_ENABLED,SAGE_URL,SAGE_KEY_PATH,SAGE_BOT_NAME,SAGE_TIMEOUTHow it works
When enabled, agents:
Test results
Tested against OWASP Juice Shop. SAGE-enhanced run completed 8/8 subtasks covering 7 vulnerability classes (recon, SQLi, XSS search, XSS reviews, JWT manipulation, IDOR, path traversal). Agents actively recalled from SAGE before testing and stored findings back — 44 SAGE-related messages observed during the run.
Key behavioral improvements with SAGE enabled:
Unit tests: 32/32 passing across client, tools, templates, and config packages.
Usage
```bash
Start with SAGE sidecar
docker compose -f docker-compose.yml -f docker-compose-sage.yml up -d
Enable in .env
SAGE_ENABLED=true
SAGE_URL=http://sage:8080
SAGE_BOT_NAME=pentagi
```
Files changed
29 files, +2042 lines. Zero changes to core orchestration — SAGE is fully optional and follows the existing Graphiti integration pattern.
Test plan