{
  "name": "forge-memory",
  "language": "rust",
  "version": "0.2.0",
  "description": "Native Akasha-backed memory integration for the Forge SDK",
  "manifest": "forge-rs/crates/forge-memory/Cargo.toml",
  "manifestSha256": "a9dbe6a41bcd53c8fba8f00add3a3e03d7b5f7e06b53553fbf31d6a15692e72a",
  "status": "source-reference",
  "registryPublicationVerified": false,
  "route": "/libraries/rust/forge-memory",
  "features": {},
  "files": [
    {
      "path": "forge-rs/crates/forge-memory/src/error.rs",
      "sha256": "74763802b154c88707491bacd70ddb025f019812cb86fc2c2821f77e3cabb58e",
      "artifactSha256": "d40c37a93d2cd4d52785c65990f3717841dd12fede07b92329dd60a9da3fc518",
      "url": "/reference/source/forge-rs/crates/forge-memory/src/error.rs.txt",
      "declarations": [
        {
          "name": "::MemoryError",
          "line": 9,
          "signature": "#[derive(Debug, Error)]\npub enum MemoryError {\n    /// A memory entry was not found.\n    #[error(\"memory entry '{memory_id}' not found in scope '{scope}'\")]\n    NotFound {\n        /// The memory ID that was looked up.\n        memory_id: String,\n        /// The scope that was searched.\n        scope: String,\n    },\n\n    /// Access to a memory scope was denied.\n    #[error(\"agent '{agent_id}' denied access to memory scope '{scope}': {reason}\")]\n    AccessDenied {\n        /// The agent that was denied.\n        agent_id: String,\n        /// The scope that was requested.\n        scope: String,\n        /// Why access was denied.\n        reason: String,\n    },\n\n    /// A write-back operation failed.\n    #[error(\"write-back failed for entry '{memory_id}' in scope '{scope}': {reason}\")]\n    WriteBackFailed {\n        /// The memory ID that failed to persist.\n        memory_id: String,\n        /// The scope the entry was in.\n        scope: String,\n        /// What went wrong.\n        reason: String,\n    },\n\n    /// The memory store backend returned an error.\n    #[error(\"memory store error: {reason}\")]\n    StoreError {\n        /// The backend error description.\n        reason: String,\n    },\n\n    /// A memory query was invalid.\n    #[error(\"invalid memory query: {reason}\")]\n    InvalidQuery {\n        /// What is wrong with the query.\n        reason: String,\n    },\n\n    /// Serialization or deserialization failed.\n    #[error(\"memory serialization error: {0}\")]\n    Serialization(#[from] serde_json::Error),\n}",
          "documentation": "Errors that can occur during memory operations."
        },
        {
          "name": "::MemoryResult",
          "line": 61,
          "signature": "pub type MemoryResult<T> = Result<T, MemoryError>;",
          "documentation": "A specialized `Result` type for memory operations."
        }
      ]
    },
    {
      "path": "forge-rs/crates/forge-memory/src/lib.rs",
      "sha256": "112c7cb0f1bf84cbe61dbf1a45c6d453008dbf93346ac2bd50e0b0bd9a954d32",
      "artifactSha256": "39de29a1a41f422b9a4f18142bc801bfc4a7550b858f159009861a996127de6b",
      "url": "/reference/source/forge-rs/crates/forge-memory/src/lib.rs.txt",
      "declarations": [
        {
          "name": "error",
          "line": 74,
          "signature": "pub mod error;",
          "documentation": ""
        },
        {
          "name": "policy",
          "line": 75,
          "signature": "pub mod policy;",
          "documentation": ""
        },
        {
          "name": "scope",
          "line": 76,
          "signature": "pub mod scope;",
          "documentation": ""
        },
        {
          "name": "store",
          "line": 77,
          "signature": "pub mod store;",
          "documentation": ""
        },
        {
          "name": "types",
          "line": 78,
          "signature": "pub mod types;",
          "documentation": ""
        },
        {
          "name": "pub use error::{MemoryError, MemoryResult};",
          "line": 80,
          "signature": "pub use error::{MemoryError, MemoryResult};",
          "documentation": ""
        },
        {
          "name": "pub use policy::{RetrievalPolicy, WriteBackPolicy, WriteBackTrigger};",
          "line": 81,
          "signature": "pub use policy::{RetrievalPolicy, WriteBackPolicy, WriteBackTrigger};",
          "documentation": ""
        },
        {
          "name": "pub use scope::MemoryScope;",
          "line": 82,
          "signature": "pub use scope::MemoryScope;",
          "documentation": ""
        },
        {
          "name": "pub use store::{AgentMemory, InMemoryStore, MemoryStore};",
          "line": 83,
          "signature": "pub use store::{AgentMemory, InMemoryStore, MemoryStore};",
          "documentation": ""
        },
        {
          "name": "pub use types::{MemoryEntry, MemoryEntryBuilder, MemoryId, MemoryQuery, MemoryType};",
          "line": 84,
          "signature": "pub use types::{MemoryEntry, MemoryEntryBuilder, MemoryId, MemoryQuery, MemoryType};",
          "documentation": ""
        }
      ]
    },
    {
      "path": "forge-rs/crates/forge-memory/src/policy.rs",
      "sha256": "a0eda999bc0b6b80fe78d40c72c67f4406da25d6495a821a01ae933028736de1",
      "artifactSha256": "59d3d70f2b50a4df0af33fe7a1778763fb6429fd7270f5e6f28de88481e25940",
      "url": "/reference/source/forge-rs/crates/forge-memory/src/policy.rs.txt",
      "declarations": [
        {
          "name": "::RetrievalPolicy",
          "line": 35,
          "signature": "#[derive(Debug, Clone, Serialize, Deserialize)]\npub struct RetrievalPolicy {\n\n}",
          "documentation": "Controls what memory can be read, by whom.\n\nThe retrieval policy defines which scopes an agent is allowed to read\nfrom and which memory types are accessible. It also supports minimum\nconfidence thresholds to filter out low-quality memories.\n\n# Examples\n\n```\nuse forge_memory::{RetrievalPolicy, MemoryScope, MemoryType};\n\nlet policy = RetrievalPolicy::builder()\n    .allow_scope(MemoryScope::Agent)\n    .allow_scope(MemoryScope::Team)\n    .allow_type(MemoryType::Semantic)\n    .allow_type(MemoryType::Episodic)\n    .min_confidence(0.5)\n    .build();\n\nassert!(policy.can_read_scope(&MemoryScope::Agent));\nassert!(policy.can_read_scope(&MemoryScope::Team));\nassert!(!policy.can_read_scope(&MemoryScope::Org));\n```"
        },
        {
          "name": "::RetrievalPolicy::builder",
          "line": 44,
          "signature": "pub fn builder() -> RetrievalPolicyBuilder;",
          "documentation": "Returns a builder for constructing a `RetrievalPolicy`."
        },
        {
          "name": "::RetrievalPolicy::can_read_scope",
          "line": 51,
          "signature": "pub fn can_read_scope(&self, scope: &MemoryScope) -> bool;",
          "documentation": "Returns `true` if the given scope is allowed for reading.\n\nAn empty `allowed_scopes` list means all scopes are allowed."
        },
        {
          "name": "::RetrievalPolicy::can_read_type",
          "line": 61,
          "signature": "pub fn can_read_type(&self, memory_type: &MemoryType) -> bool;",
          "documentation": "Returns `true` if the given memory type is allowed for reading.\n\nAn empty `allowed_types` list means all types are allowed."
        },
        {
          "name": "::RetrievalPolicy::min_confidence",
          "line": 69,
          "signature": "pub fn min_confidence(&self) -> f32;",
          "documentation": "Returns the minimum confidence threshold."
        },
        {
          "name": "::RetrievalPolicy::max_results",
          "line": 74,
          "signature": "pub fn max_results(&self) -> usize;",
          "documentation": "Returns the maximum number of results per query."
        },
        {
          "name": "::RetrievalPolicyBuilder",
          "line": 94,
          "signature": "#[derive(Debug, Default)]\npub struct RetrievalPolicyBuilder {\n\n}",
          "documentation": "Builder for [`RetrievalPolicy`]."
        },
        {
          "name": "::RetrievalPolicyBuilder::new",
          "line": 103,
          "signature": "pub fn new() -> Self;",
          "documentation": "Creates a new builder."
        },
        {
          "name": "::RetrievalPolicyBuilder::allow_scope",
          "line": 111,
          "signature": "pub fn allow_scope(mut self, scope: MemoryScope) -> Self;",
          "documentation": "Adds an allowed scope."
        },
        {
          "name": "::RetrievalPolicyBuilder::allow_type",
          "line": 117,
          "signature": "pub fn allow_type(mut self, memory_type: MemoryType) -> Self;",
          "documentation": "Adds an allowed memory type."
        },
        {
          "name": "::RetrievalPolicyBuilder::min_confidence",
          "line": 123,
          "signature": "pub fn min_confidence(mut self, min: f32) -> Self;",
          "documentation": "Sets the minimum confidence threshold."
        },
        {
          "name": "::RetrievalPolicyBuilder::max_results",
          "line": 129,
          "signature": "pub fn max_results(mut self, max: usize) -> Self;",
          "documentation": "Sets the maximum number of results per query."
        },
        {
          "name": "::RetrievalPolicyBuilder::build",
          "line": 135,
          "signature": "pub fn build(self) -> RetrievalPolicy;",
          "documentation": "Builds the `RetrievalPolicy`."
        },
        {
          "name": "::WriteBackTrigger",
          "line": 157,
          "signature": "#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]\n#[serde(rename_all = \"snake_case\")]\npub enum WriteBackTrigger {\n    /// Write immediately when store() is called.\n    Immediate,\n    /// Batch writes and flush periodically.\n    Batched,\n    /// Only write back on explicit flush or session close.\n    OnFlush,\n    /// Never persist (task-scoped, discarded on completion).\n    Never,\n}",
          "documentation": "When a write-back should be triggered.\n\n# Examples\n\n```\nuse forge_memory::WriteBackTrigger;\n\nlet trigger = WriteBackTrigger::Immediate;\nassert_eq!(format!(\"{trigger:?}\"), \"Immediate\");\n```"
        },
        {
          "name": "::WriteBackPolicy",
          "line": 189,
          "signature": "#[derive(Debug, Clone, Serialize, Deserialize)]\npub struct WriteBackPolicy {\n\n}",
          "documentation": "Controls what gets persisted and when.\n\nThe write-back policy defines which scopes can be written to,\nthe persistence trigger, and minimum confidence for persistence.\n\n# Examples\n\n```\nuse forge_memory::{WriteBackPolicy, WriteBackTrigger, MemoryScope};\n\nlet policy = WriteBackPolicy::builder()\n    .trigger(WriteBackTrigger::Immediate)\n    .allow_scope(MemoryScope::Agent)\n    .allow_scope(MemoryScope::Team)\n    .min_confidence_for_persistence(0.7)\n    .build();\n\nassert!(policy.can_write_scope(&MemoryScope::Agent));\nassert!(!policy.can_write_scope(&MemoryScope::Org));\n```"
        },
        {
          "name": "::WriteBackPolicy::builder",
          "line": 199,
          "signature": "pub fn builder() -> WriteBackPolicyBuilder;",
          "documentation": "Returns a builder for constructing a `WriteBackPolicy`."
        },
        {
          "name": "::WriteBackPolicy::trigger",
          "line": 204,
          "signature": "pub fn trigger(&self) -> WriteBackTrigger;",
          "documentation": "Returns the write-back trigger."
        },
        {
          "name": "::WriteBackPolicy::can_write_scope",
          "line": 211,
          "signature": "pub fn can_write_scope(&self, scope: &MemoryScope) -> bool;",
          "documentation": "Returns `true` if the given scope is allowed for writing.\n\nAn empty `allowed_scopes` list means all scopes are allowed."
        },
        {
          "name": "::WriteBackPolicy::min_confidence_for_persistence",
          "line": 219,
          "signature": "pub fn min_confidence_for_persistence(&self) -> f32;",
          "documentation": "Returns the minimum confidence required for persistence."
        },
        {
          "name": "::WriteBackPolicy::batch_size",
          "line": 224,
          "signature": "pub fn batch_size(&self) -> usize;",
          "documentation": "Returns the batch size for batched writes."
        },
        {
          "name": "::WriteBackPolicy::batch_interval_seconds",
          "line": 229,
          "signature": "pub fn batch_interval_seconds(&self) -> u64;",
          "documentation": "Returns the batch interval in seconds."
        },
        {
          "name": "::WriteBackPolicyBuilder",
          "line": 250,
          "signature": "#[derive(Debug, Default)]\npub struct WriteBackPolicyBuilder {\n\n}",
          "documentation": "Builder for [`WriteBackPolicy`]."
        },
        {
          "name": "::WriteBackPolicyBuilder::new",
          "line": 260,
          "signature": "pub fn new() -> Self;",
          "documentation": "Creates a new builder."
        },
        {
          "name": "::WriteBackPolicyBuilder::trigger",
          "line": 269,
          "signature": "pub fn trigger(mut self, trigger: WriteBackTrigger) -> Self;",
          "documentation": "Sets the write-back trigger."
        },
        {
          "name": "::WriteBackPolicyBuilder::allow_scope",
          "line": 275,
          "signature": "pub fn allow_scope(mut self, scope: MemoryScope) -> Self;",
          "documentation": "Adds an allowed scope for writing."
        },
        {
          "name": "::WriteBackPolicyBuilder::min_confidence_for_persistence",
          "line": 281,
          "signature": "pub fn min_confidence_for_persistence(mut self, min: f32) -> Self;",
          "documentation": "Sets the minimum confidence for persistence."
        },
        {
          "name": "::WriteBackPolicyBuilder::batch_size",
          "line": 287,
          "signature": "pub fn batch_size(mut self, size: usize) -> Self;",
          "documentation": "Sets the batch size."
        },
        {
          "name": "::WriteBackPolicyBuilder::batch_interval_seconds",
          "line": 293,
          "signature": "pub fn batch_interval_seconds(mut self, seconds: u64) -> Self;",
          "documentation": "Sets the batch interval in seconds."
        },
        {
          "name": "::WriteBackPolicyBuilder::build",
          "line": 299,
          "signature": "pub fn build(self) -> WriteBackPolicy;",
          "documentation": "Builds the `WriteBackPolicy`."
        }
      ]
    },
    {
      "path": "forge-rs/crates/forge-memory/src/scope.rs",
      "sha256": "868c632f92c6c554919bf78164c128321843047ccb0704fb51627285ecbacaa0",
      "artifactSha256": "9a317dd59fd71fade008f3eb66dbb323bfd441b5cba2b58fc25359545ef1fa26",
      "url": "/reference/source/forge-rs/crates/forge-memory/src/scope.rs.txt",
      "declarations": [
        {
          "name": "::MemoryScope",
          "line": 24,
          "signature": "#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize, PartialOrd, Ord)]\n#[serde(rename_all = \"snake_case\")]\npub enum MemoryScope {\n    /// Agent-local memory. Private to the agent instance.\n    Agent,\n    /// Task-scoped memory. Discarded when the task completes.\n    Task,\n    /// Team/project-scoped memory. Shared within a team.\n    Team,\n    /// Organization-wide memory. Accessible by all authorized agents.\n    Org,\n}",
          "documentation": "The visibility boundary for memory operations.\n\nScopes control who can read and write memory entries. They form a\nhierarchy: Agent < Task < Team < Org.\n\n# Examples\n\n```\nuse forge_memory::MemoryScope;\n\nlet scope = MemoryScope::Agent;\nassert_eq!(scope.as_str(), \"agent\");\nassert!(scope.is_narrower_than(&MemoryScope::Team));\n```"
        },
        {
          "name": "::MemoryScope::as_str",
          "line": 37,
          "signature": "pub fn as_str(&self) -> &'static str;",
          "documentation": "Returns the scope as a string slice."
        },
        {
          "name": "::MemoryScope::is_narrower_than",
          "line": 49,
          "signature": "pub fn is_narrower_than(&self, other: &MemoryScope) -> bool;",
          "documentation": "Returns `true` if this scope is narrower than (contained within) the other.\n\nAgent < Task < Team < Org."
        },
        {
          "name": "::MemoryScope::is_wider_than",
          "line": 54,
          "signature": "pub fn is_wider_than(&self, other: &MemoryScope) -> bool;",
          "documentation": "Returns `true` if this scope is wider than (contains) the other."
        },
        {
          "name": "::MemoryScope::namespace",
          "line": 72,
          "signature": "pub fn namespace(&self, owner_id: &str) -> String;",
          "documentation": "Returns the Akasha namespace prefix for this scope and owner.\n\n# Arguments\n\n* `owner_id` - The owner identifier (agent ID, task ID, team ID, or org ID).\n\n# Examples\n\n```\nuse forge_memory::MemoryScope;\n\nlet ns = MemoryScope::Agent.namespace(\"agent-123\");\nassert_eq!(ns, \"forge:agent:agent-123\");\n```"
        }
      ]
    },
    {
      "path": "forge-rs/crates/forge-memory/src/store.rs",
      "sha256": "891a698c5a2bd9f1286b7d5ad5e05203c91f48c9f225d66d16bde5acb5732477",
      "artifactSha256": "27ef314f311e0751b29926accc19d2d2b1d62e4c9584d80a443bd773637e36fd",
      "url": "/reference/source/forge-rs/crates/forge-memory/src/store.rs.txt",
      "declarations": [
        {
          "name": "::MemoryStore",
          "line": 37,
          "signature": "#[async_trait]\npub trait MemoryStore: Send + Sync {\n    /// Stores a memory entry and returns its ID.\n    ///\n    /// # Errors\n    ///\n    /// Returns `MemoryError::StoreError` if the backend fails.\n    async fn store(&self, entry: MemoryEntry) -> MemoryResult<MemoryId>;\n\n    /// Searches for memories matching the query.\n    ///\n    /// Returns entries sorted by relevance (best match first).\n    ///\n    /// # Errors\n    ///\n    /// Returns `MemoryError::StoreError` if the backend fails.\n    async fn recall(&self, query: &MemoryQuery) -> MemoryResult<Vec<MemoryEntry>>;\n\n    /// Retrieves a specific memory entry by ID.\n    ///\n    /// # Errors\n    ///\n    /// Returns `MemoryError::NotFound` if the entry does not exist.\n    async fn get(&self, id: &MemoryId) -> MemoryResult<MemoryEntry>;\n\n    /// Deletes a memory entry by ID.\n    ///\n    /// # Errors\n    ///\n    /// Returns `MemoryError::NotFound` if the entry does not exist.\n    async fn delete(&self, id: &MemoryId) -> MemoryResult<()>;\n\n    /// Lists all memories in a given scope.\n    ///\n    /// # Errors\n    ///\n    /// Returns `MemoryError::StoreError` if the backend fails.\n    async fn list_by_scope(&self, scope: MemoryScope) -> MemoryResult<Vec<MemoryEntry>>;\n\n    /// Returns the total number of stored entries.\n    async fn count(&self) -> MemoryResult<usize>;\n}",
          "documentation": "The async trait that memory backends implement.\n\nThis trait provides the storage and retrieval surface for memory entries.\nImplementations can back onto Akasha, a local in-memory store, or any\nother storage system.\n\n# Contract\n\n- `store()` persists a memory entry and returns its ID.\n- `recall()` searches for memories matching a query.\n- `get()` retrieves a specific memory by ID.\n- `delete()` removes a memory by ID.\n- `list_by_scope()` lists all memories in a scope.\n\n# ANVIL Spec Reference\n\nANVIL Spec \u00a79 \u2014 Memory Integration."
        },
        {
          "name": "::InMemoryStore",
          "line": 104,
          "signature": "pub struct InMemoryStore {\n\n}",
          "documentation": "A local in-process memory store for testing and standalone agents.\n\nThis implementation stores entries in a `HashMap` protected by a `RwLock`.\nIt supports basic text matching for recall queries. It is NOT suitable\nfor production use with large memory volumes \u2014 use an Akasha-backed\nimplementation for that.\n\n# Examples\n\n```\nuse forge_memory::{InMemoryStore, MemoryStore, MemoryEntry, MemoryType, MemoryScope, MemoryQuery};\n\n# tokio_test::block_on(async {\nlet store = InMemoryStore::new();\nlet entry = MemoryEntry::builder()\n    .content(\"test memory\")\n    .memory_type(MemoryType::Semantic)\n    .scope(MemoryScope::Agent)\n    .build();\nlet id = store.store(entry).await.unwrap();\n\nlet results = store.recall(&MemoryQuery::new(\"test\")).await.unwrap();\nassert_eq!(results.len(), 1);\n# });\n```"
        },
        {
          "name": "::InMemoryStore::new",
          "line": 110,
          "signature": "pub fn new() -> Self;",
          "documentation": "Creates a new empty in-memory store."
        },
        {
          "name": "::AgentMemory",
          "line": 276,
          "signature": "pub struct AgentMemory {\n\n}",
          "documentation": "The primary interface for agents to interact with memory.\n\n`AgentMemory` wraps a [`MemoryStore`] with retrieval and write-back\npolicies. It enforces access control and persistence rules at the\nagent level.\n\n# Examples\n\n```\nuse forge_memory::{\n    AgentMemory, InMemoryStore, MemoryScope, MemoryType, MemoryEntry,\n    RetrievalPolicy, WriteBackPolicy,\n};\n\n# tokio_test::block_on(async {\nlet store = InMemoryStore::new();\nlet mut memory = AgentMemory::new(\n    \"agent-1\",\n    Box::new(store),\n    RetrievalPolicy::default(),\n    WriteBackPolicy::default(),\n);\n\n// Store an episodic memory\nlet entry = MemoryEntry::builder()\n    .content(\"User asked about Rust ownership\")\n    .memory_type(MemoryType::Episodic)\n    .scope(MemoryScope::Agent)\n    .build();\nmemory.store(entry).await.unwrap();\n\n// Recall relevant memories\nlet results = memory.recall(\"Rust ownership\", 5).await.unwrap();\nassert_eq!(results.len(), 1);\n# });\n```"
        },
        {
          "name": "::AgentMemory::new",
          "line": 292,
          "signature": "pub fn new(\n        agent_id: impl Into<String>,\n        store: Box<dyn MemoryStore>,\n        retrieval_policy: RetrievalPolicy,\n        write_back_policy: WriteBackPolicy,\n    ) -> Self;",
          "documentation": "Creates a new agent memory interface.\n\n# Arguments\n\n* `agent_id` - The agent's identifier.\n* `store` - The memory store backend.\n* `retrieval_policy` - Controls what can be read.\n* `write_back_policy` - Controls what gets persisted."
        },
        {
          "name": "::AgentMemory::agent_id",
          "line": 307,
          "signature": "pub fn agent_id(&self) -> &str;",
          "documentation": "Returns the agent ID."
        },
        {
          "name": "::AgentMemory::retrieval_policy",
          "line": 312,
          "signature": "pub fn retrieval_policy(&self) -> &RetrievalPolicy;",
          "documentation": "Returns a reference to the retrieval policy."
        },
        {
          "name": "::AgentMemory::write_back_policy",
          "line": 317,
          "signature": "pub fn write_back_policy(&self) -> &WriteBackPolicy;",
          "documentation": "Returns a reference to the write-back policy."
        },
        {
          "name": "::AgentMemory::store",
          "line": 327,
          "signature": "pub async fn store(&mut self, entry: MemoryEntry) -> MemoryResult<MemoryId>;",
          "documentation": "Stores a memory entry, subject to the write-back policy.\n\n# Errors\n\nReturns `MemoryError::AccessDenied` if the entry's scope is not\nallowed by the write-back policy."
        },
        {
          "name": "::AgentMemory::recall",
          "line": 365,
          "signature": "pub async fn recall(&self, query_text: &str, limit: usize) -> MemoryResult<Vec<MemoryEntry>>;",
          "documentation": "Recalls memories matching the given text query.\n\nResults are filtered by the retrieval policy.\n\n# Arguments\n\n* `query_text` - The text to search for.\n* `limit` - Maximum number of results.\n\n# Errors\n\nReturns errors from the underlying store."
        },
        {
          "name": "::AgentMemory::recall_with_query",
          "line": 390,
          "signature": "pub async fn recall_with_query(&self, query: &MemoryQuery) -> MemoryResult<Vec<MemoryEntry>>;",
          "documentation": "Recalls memories with a full query specification.\n\n# Errors\n\nReturns errors from the underlying store."
        },
        {
          "name": "::AgentMemory::get",
          "line": 411,
          "signature": "pub async fn get(&self, id: &MemoryId) -> MemoryResult<MemoryEntry>;",
          "documentation": "Retrieves a specific memory entry by ID.\n\n# Errors\n\nReturns `MemoryError::NotFound` if the entry does not exist,\nor `MemoryError::AccessDenied` if the policy denies access."
        },
        {
          "name": "::AgentMemory::delete",
          "line": 440,
          "signature": "pub async fn delete(&self, id: &MemoryId) -> MemoryResult<()>;",
          "documentation": "Deletes a memory entry by ID.\n\n# Errors\n\nReturns `MemoryError::NotFound` if the entry does not exist."
        },
        {
          "name": "::AgentMemory::count",
          "line": 445,
          "signature": "pub async fn count(&self) -> MemoryResult<usize>;",
          "documentation": "Returns the total number of stored entries."
        }
      ]
    },
    {
      "path": "forge-rs/crates/forge-memory/src/types.rs",
      "sha256": "1fd6602bfe1f13abc801fe82604b3637556ac850930668ce82298ca24cba4d5b",
      "artifactSha256": "b2f305e025c88c12195da5e3fec6af554804d94f1f5a49781b8d8c750bc5635f",
      "url": "/reference/source/forge-rs/crates/forge-memory/src/types.rs.txt",
      "declarations": [
        {
          "name": "::MemoryId",
          "line": 23,
          "signature": "#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]\npub struct MemoryId(String);",
          "documentation": "Unique identifier for a memory entry.\n\n# Examples\n\n```\nuse forge_memory::MemoryId;\n\nlet id = MemoryId::new();\nassert!(!id.as_str().is_empty());\n```"
        },
        {
          "name": "::MemoryId::new",
          "line": 27,
          "signature": "pub fn new() -> Self;",
          "documentation": "Creates a new random memory ID."
        },
        {
          "name": "::MemoryId::from_string",
          "line": 32,
          "signature": "pub fn from_string(id: impl Into<String>) -> Self;",
          "documentation": "Creates a memory ID from an existing string."
        },
        {
          "name": "::MemoryId::as_str",
          "line": 37,
          "signature": "pub fn as_str(&self) -> &str;",
          "documentation": "Returns the memory ID as a string slice."
        },
        {
          "name": "::MemoryType",
          "line": 72,
          "signature": "#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]\n#[serde(rename_all = \"snake_case\")]\npub enum MemoryType {\n    /// Episodic memory \u2014 temporal events, interactions, experiences.\n    Episodic,\n    /// Semantic memory \u2014 facts, knowledge, relationships.\n    Semantic,\n    /// Procedural memory \u2014 skills, workflows, executable procedures.\n    Procedural,\n    /// Associative memory \u2014 pattern completion, content-addressable recall.\n    Associative,\n}",
          "documentation": "The four Akasha memory types.\n\nThese map directly to Akasha's cognitive memory architecture:\n- Episodic = temporal events\n- Semantic = facts and knowledge\n- Procedural = skills and workflows\n- Associative = pattern completion\n\n# Examples\n\n```\nuse forge_memory::MemoryType;\n\nlet mt = MemoryType::Episodic;\nassert_eq!(mt.as_str(), \"episodic\");\n```"
        },
        {
          "name": "::MemoryType::as_str",
          "line": 85,
          "signature": "pub fn as_str(&self) -> &'static str;",
          "documentation": "Returns the memory type as a string slice."
        },
        {
          "name": "::MemoryEntry",
          "line": 120,
          "signature": "#[derive(Debug, Clone, Serialize, Deserialize)]\npub struct MemoryEntry {\n\n}",
          "documentation": "A single memory entry with content, metadata, and provenance.\n\n# Examples\n\n```\nuse forge_memory::{MemoryEntry, MemoryType, MemoryScope};\n\nlet entry = MemoryEntry::builder()\n    .content(\"User prefers detailed explanations\")\n    .memory_type(MemoryType::Semantic)\n    .scope(MemoryScope::Agent)\n    .confidence(0.9)\n    .build();\n\nassert_eq!(entry.content(), \"User prefers detailed explanations\");\nassert_eq!(entry.memory_type(), MemoryType::Semantic);\nassert_eq!(entry.scope(), MemoryScope::Agent);\n```"
        },
        {
          "name": "::MemoryEntry::builder",
          "line": 136,
          "signature": "pub fn builder() -> MemoryEntryBuilder;",
          "documentation": "Returns a builder for constructing a `MemoryEntry`."
        },
        {
          "name": "::MemoryEntry::id",
          "line": 141,
          "signature": "pub fn id(&self) -> &MemoryId;",
          "documentation": "Returns the memory ID."
        },
        {
          "name": "::MemoryEntry::content",
          "line": 146,
          "signature": "pub fn content(&self) -> &str;",
          "documentation": "Returns the content text."
        },
        {
          "name": "::MemoryEntry::memory_type",
          "line": 151,
          "signature": "pub fn memory_type(&self) -> MemoryType;",
          "documentation": "Returns the memory type."
        },
        {
          "name": "::MemoryEntry::scope",
          "line": 156,
          "signature": "pub fn scope(&self) -> MemoryScope;",
          "documentation": "Returns the memory scope."
        },
        {
          "name": "::MemoryEntry::confidence",
          "line": 161,
          "signature": "pub fn confidence(&self) -> f32;",
          "documentation": "Returns the confidence score (0.0 to 1.0)."
        },
        {
          "name": "::MemoryEntry::importance",
          "line": 166,
          "signature": "pub fn importance(&self) -> f32;",
          "documentation": "Returns the importance score (0.0 to 1.0)."
        },
        {
          "name": "::MemoryEntry::created_at",
          "line": 171,
          "signature": "pub fn created_at(&self) -> DateTime<Utc>;",
          "documentation": "Returns when the entry was created."
        },
        {
          "name": "::MemoryEntry::updated_at",
          "line": 176,
          "signature": "pub fn updated_at(&self) -> DateTime<Utc>;",
          "documentation": "Returns when the entry was last updated."
        },
        {
          "name": "::MemoryEntry::source",
          "line": 181,
          "signature": "pub fn source(&self) -> Option<&str>;",
          "documentation": "Returns the source attribution."
        },
        {
          "name": "::MemoryEntry::tags",
          "line": 186,
          "signature": "pub fn tags(&self) -> &[String];",
          "documentation": "Returns the tags."
        },
        {
          "name": "::MemoryEntry::metadata",
          "line": 191,
          "signature": "pub fn metadata(&self) -> &HashMap<String, serde_json::Value>;",
          "documentation": "Returns the metadata map."
        },
        {
          "name": "::MemoryEntryBuilder",
          "line": 214,
          "signature": "#[derive(Debug)]\npub struct MemoryEntryBuilder {\n\n}",
          "documentation": "Builder for [`MemoryEntry`].\n\n# Examples\n\n```\nuse forge_memory::{MemoryEntry, MemoryType, MemoryScope};\n\nlet entry = MemoryEntry::builder()\n    .content(\"learned fact\")\n    .memory_type(MemoryType::Semantic)\n    .scope(MemoryScope::Team)\n    .source(\"user-input\")\n    .tag(\"rust\")\n    .tag(\"ownership\")\n    .build();\nassert_eq!(entry.tags().len(), 2);\n```"
        },
        {
          "name": "::MemoryEntryBuilder::new",
          "line": 227,
          "signature": "pub fn new() -> Self;",
          "documentation": "Creates a new builder with defaults."
        },
        {
          "name": "::MemoryEntryBuilder::content",
          "line": 241,
          "signature": "pub fn content(mut self, content: impl Into<String>) -> Self;",
          "documentation": "Sets the content text."
        },
        {
          "name": "::MemoryEntryBuilder::memory_type",
          "line": 247,
          "signature": "pub fn memory_type(mut self, memory_type: MemoryType) -> Self;",
          "documentation": "Sets the memory type."
        },
        {
          "name": "::MemoryEntryBuilder::scope",
          "line": 253,
          "signature": "pub fn scope(mut self, scope: MemoryScope) -> Self;",
          "documentation": "Sets the memory scope."
        },
        {
          "name": "::MemoryEntryBuilder::confidence",
          "line": 259,
          "signature": "pub fn confidence(mut self, confidence: f32) -> Self;",
          "documentation": "Sets the confidence score (clamped to 0.0..=1.0)."
        },
        {
          "name": "::MemoryEntryBuilder::importance",
          "line": 265,
          "signature": "pub fn importance(mut self, importance: f32) -> Self;",
          "documentation": "Sets the importance score (clamped to 0.0..=1.0)."
        },
        {
          "name": "::MemoryEntryBuilder::source",
          "line": 271,
          "signature": "pub fn source(mut self, source: impl Into<String>) -> Self;",
          "documentation": "Sets the source attribution."
        },
        {
          "name": "::MemoryEntryBuilder::tag",
          "line": 277,
          "signature": "pub fn tag(mut self, tag: impl Into<String>) -> Self;",
          "documentation": "Adds a tag."
        },
        {
          "name": "::MemoryEntryBuilder::meta",
          "line": 283,
          "signature": "pub fn meta(mut self, key: impl Into<String>, value: serde_json::Value) -> Self;",
          "documentation": "Adds a metadata key-value pair."
        },
        {
          "name": "::MemoryEntryBuilder::build",
          "line": 289,
          "signature": "pub fn build(self) -> MemoryEntry;",
          "documentation": "Builds the `MemoryEntry`."
        },
        {
          "name": "::MemoryQuery",
          "line": 330,
          "signature": "#[derive(Debug, Clone, Serialize, Deserialize)]\npub struct MemoryQuery {\n\n}",
          "documentation": "A query against the memory store.\n\nQueries support filtering by scope, type, tags, and text similarity.\n\n# Examples\n\n```\nuse forge_memory::{MemoryQuery, MemoryType, MemoryScope};\n\nlet query = MemoryQuery::new(\"Rust ownership\")\n    .with_scope(MemoryScope::Agent)\n    .with_type(MemoryType::Semantic)\n    .with_limit(10);\nassert_eq!(query.text(), \"Rust ownership\");\nassert_eq!(query.limit(), 10);\n```"
        },
        {
          "name": "::MemoryQuery::new",
          "line": 341,
          "signature": "pub fn new(text: impl Into<String>) -> Self;",
          "documentation": "Creates a new query with the given text."
        },
        {
          "name": "::MemoryQuery::with_scope",
          "line": 353,
          "signature": "pub fn with_scope(mut self, scope: MemoryScope) -> Self;",
          "documentation": "Filters by memory scope."
        },
        {
          "name": "::MemoryQuery::with_type",
          "line": 359,
          "signature": "pub fn with_type(mut self, memory_type: MemoryType) -> Self;",
          "documentation": "Filters by memory type."
        },
        {
          "name": "::MemoryQuery::with_tag",
          "line": 365,
          "signature": "pub fn with_tag(mut self, tag: impl Into<String>) -> Self;",
          "documentation": "Adds a tag filter."
        },
        {
          "name": "::MemoryQuery::with_limit",
          "line": 371,
          "signature": "pub fn with_limit(mut self, limit: usize) -> Self;",
          "documentation": "Sets the maximum number of results."
        },
        {
          "name": "::MemoryQuery::with_min_confidence",
          "line": 377,
          "signature": "pub fn with_min_confidence(mut self, min: f32) -> Self;",
          "documentation": "Sets the minimum confidence threshold."
        },
        {
          "name": "::MemoryQuery::text",
          "line": 383,
          "signature": "pub fn text(&self) -> &str;",
          "documentation": "Returns the query text."
        },
        {
          "name": "::MemoryQuery::scope",
          "line": 388,
          "signature": "pub fn scope(&self) -> Option<MemoryScope>;",
          "documentation": "Returns the scope filter."
        },
        {
          "name": "::MemoryQuery::memory_type",
          "line": 393,
          "signature": "pub fn memory_type(&self) -> Option<MemoryType>;",
          "documentation": "Returns the memory type filter."
        },
        {
          "name": "::MemoryQuery::tags",
          "line": 398,
          "signature": "pub fn tags(&self) -> &[String];",
          "documentation": "Returns the tag filters."
        },
        {
          "name": "::MemoryQuery::limit",
          "line": 403,
          "signature": "pub fn limit(&self) -> usize;",
          "documentation": "Returns the result limit."
        },
        {
          "name": "::MemoryQuery::min_confidence",
          "line": 408,
          "signature": "pub fn min_confidence(&self) -> Option<f32>;",
          "documentation": "Returns the minimum confidence threshold."
        }
      ]
    }
  ]
}
