aws-samples / aws-samples/sample-autonomous-cloud-coding-agents
feat(memory): write-ahead validation via guardian model
- Dominant language
- TypeScript
- Stars
- 143
- Forks
- 46
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 20
Description
**Context:** ROADMAP.md → Memory security → Write-ahead validation
---
## Component
Agent (Python runtime)
## Describe the feature
Route proposed **memory writes** through a guardian model (or rules engine) before persistence. Reject or flag entries that look like injection, secrets, or policy violations.
## Use case
Review-feedback extraction (#27) and agent self-writes can persist attacker-controlled text. A last-line validator reduces poisoned persistence.
## Proposed solution
1. Intercept write path in memory client wrapper.
2. Guardian: lightweight model call or regex+guardrail stack (cost-aware).
3. Modes: `observe` (log only) → `enforce` (block write).
4. Emit `memory_write_rejected` events.
5. Blueprint-configurable per repo.
## Other information
- Complements Bedrock Guardrails on hydration inputs.
- Design context: `docs/design/MEMORY.md`, `docs/design/SECURITY.md`.
- [ ] This might be a breaking change
Contributor guide
Research direction
Start by reading ROADMAP.md and the design context in docs/design/MEMORY.md and docs/design/SECURITY.md, then locate the memory client wrapper and agent write path. Review how blueprint configuration and events are handled before deciding between the proposed guardian approaches. Done means writes support observe and enforce modes, rejected writes emit memory_write_rejected events, and the behavior is configurable per repository.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python
- Domain
- backend, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100