flutter_agent_memory_web library
Web-safe subset of flutter_agent_memory.
Import this library in Flutter web apps or other web targets. It avoids
dart:io dependencies while exposing the core knowledge-base store,
search, graph builder, and pluggable storage adapters.
Classes
- AnalysisResult
- Raw extraction result returned by the analysis agent.
- Answer
- A knowledge-base answer.
- HttpKbStorage
- HTTP-backed implementation of KbStorage.
- InMemoryKbStorage
- In-memory implementation of KbStorage.
- KBAggregationAgent
- Generates narrative descriptions for people, topics, and areas.
- KBAnalysisAgent
- Extracts structured knowledge (questions, answers, notes) from raw text and optionally images.
- KBConsolidationAgent
- Consolidates a set of memory records into a high-level summary and reusable skill cards, similar to the global consolidation phase in advanced memory systems.
- KBContext
- Existing knowledge-base state used for incremental updates.
- KBGraphBuilder
- KbMarkdownRenderer
- Renders knowledge-base entities as Obsidian-compatible Markdown strings.
- KBMemoryStore
- Agent memory store backed by a pluggable KbStorage backend.
- KBQuestionAnswerMappingAgent
- Maps new answers and notes to existing unanswered questions.
- KBRerankerAgent
- Reranks a small set of candidate memory records for a given query using an LLM. This is useful when lexical/tag-based scoring is not enough to surface the most relevant record.
- KBSearchEngine
- Searches the knowledge base by tags, text, or entity type.
- KBSearchResult
- Result of a knowledge-base search.
- KbStorage
- Abstract storage backend for the agent knowledge base.
- KBTagGeneratorAgent
- Generates a concise set of search tags from a natural-language query.
- KBTextSearchResult
- Result of a natural-language search that uses an LLM to generate tags.
- Link
- A URL reference embedded in a question, answer, or note.
- LlmConfig
- Configuration values for LLM providers.
- LlmMessage
- A single message in a conversational LLM exchange.
- LlmProvider
- Abstract interface for any LLM provider.
- MemoryConsolidationWriter
- Writes the result of a consolidation run: the MEMORY.md summary and the derived skill cards.
- MemoryDedupService
- Encapsulates capture-time duplicate detection for questions, answers and notes.
- MemoryLevel
- Hierarchical memory levels inspired by reference frameworks (MemPalace drawers/closets, Mastra observations/reflections, Hindsight mental models).
- MemoryLevelService
- Promotes or expires notes according to a MemoryPromotionPolicy.
- MemoryPromotionPolicy
- Policy controlling automatic promotion and expiry of memory levels.
- MemoryProvenanceService
- Creates cross-scope note copies with a provenance marker.
- MemoryRecord
- A unified view of a knowledge-base record used by the memory store.
- MemoryRevision
- A content snapshot plus its SHA-256 revision hash.
- MemoryRevisionService
- Manages optimistic concurrency for the top-level MEMORY.md summary file.
- MemoryType
- Constants for categorizing notes inside the knowledge base.
- Note
- A standalone knowledge-base note.
- OpenAiProvider
- OpenAI-compatible chat provider.
- OpenRouterProvider
- OpenRouter provider.
- PromptLoader
-
Loads prompt templates stored as XML files under
lib/src/agents/prompts/. - ProviderFactory
- Factory for creating the default LlmProvider based on LlmConfig.
- Question
- A knowledge-base question.
- QuestionSummary
- Relation
- A typed edge between two memory entities.
- RelationType
- Common relation types borrowed from reference frameworks (CodeGraph, Zep/Graphiti, MemPalace tunnels).
- WebKbStorage
- Browser-storage implementation of KbStorage.
Mixins
- KbStorageContextMixin
- Shared context-scanning logic for KbStorage adapters.
Functions
-
memoryFingerprint(
Note note) → String - Builds a stable fingerprint for a note based on content and level.
-
normalizeMemoryText(
String text) → String - Normalizes a memory text for duplicate detection.
-
revisionHash(
String content) → String -
Computes a SHA-256 hash of
contentand returns it as a hex string.
Exceptions / Errors
- ConcurrentRevisionException
- Exception thrown when an optimistic concurrency check fails.