Expand description
AINL Memory - Graph-based agent memory substrate
Graph-as-memory for AI agents. Execution IS the memory.
AINL Memory implements agent memory as an execution graph. Every agent turn, tool call, and delegation becomes a typed graph node. No separate retrieval layer—the graph itself is the memory.
§Quick Start
use ainl_memory::GraphMemory;
use std::path::Path;
let memory = GraphMemory::new(Path::new("memory.db")).unwrap();
// Record an episode
memory.write_episode(
vec!["file_read".to_string(), "agent_delegate".to_string()],
Some("agent-B".to_string()),
None,
).unwrap();
// Recall recent episodes
let recent = memory.recall_recent(100).unwrap();§Architecture
AINL Memory is designed as infrastructure that any agent framework can adopt:
- Zero dependencies on specific agent runtimes
- Simple trait-based API via
GraphStore - Bring your own storage backend
§Node Types
- Episode: What happened during an agent turn (tool calls, delegations)
- Semantic: Facts learned with confidence scores
- Procedural: Reusable compiled workflow patterns
- Persona: Agent traits learned over time
Re-exports§
pub use node::AinlEdge;pub use node::AinlMemoryNode;pub use node::AinlNodeType;pub use query::find_high_confidence_facts;pub use query::find_patterns;pub use query::find_strong_traits;pub use query::recall_recent;pub use query::walk_from;pub use store::GraphStore;pub use store::SqliteGraphStore;
Modules§
- node
- AINL graph node types - the vocabulary of agent memory.
- query
- Graph traversal and querying utilities.
- store
- Graph storage backends for AINL memory.
Structs§
- Graph
Memory - High-level graph memory API - the main entry point for AINL memory.