بنقرة واحدة
memory-construction
JOB-256 — blanket From impl, removing redundant Into impls, RwLock vs Mutex for memory.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
JOB-256 — blanket From impl, removing redundant Into impls, RwLock vs Mutex for memory.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
AgentExecutor, ChatAgent (ReAct), OpenAIToolsAgent, and the Agent trait.
JOB-251 — Why Arc<dyn LLM> over LLMClone, migration pattern, and correct LLM ownership model.
All Chain types — LLMChain, ConversationalChain, SequentialChain, StuffDocuments, ConversationalRetrievalQA, SqlDatabaseChain.
Trait conformance tests, property-based tests (proptest), fuzz targets, and boundary contracts for langchainx traits.
Core langchainx patterns — LLMChain, builder pattern, Chain trait, prompt macros, and basic invocation.
Constructing LLM backends (OpenAI, Claude, DeepSeek, Qwen, Ollama) and configuring CallOptions.
| name | memory-construction |
| description | JOB-256 — blanket From impl, removing redundant Into impls, RwLock vs Mutex for memory. |
This 10-line block is copy-pasted across SimpleMemory, WindowBufferMemory, DummyMemory:
impl Into<Arc<Mutex<dyn BaseMemory>>> for SimpleMemory {
fn into(self) -> Arc<Mutex<dyn BaseMemory>> {
Arc::new(Mutex::new(self))
}
}
// repeated for DummyMemory, WindowBufferMemory
Also: Into<Arc<dyn BaseMemory>> (non-mutex) is implemented on all three but never used
by any chain or executor — it is dead API.
// Will replace the 6 manual impls (3 types × 2 variants)
impl<T: BaseMemory + Send + Sync + 'static> From<T> for Arc<Mutex<dyn BaseMemory>> {
fn from(mem: T) -> Self {
Arc::new(Mutex::new(mem))
}
}
Call sites using .into() will continue to work unchanged.
Until JOB-256 is merged, implement the conversions manually:
use std::sync::Arc;
use tokio::sync::Mutex;
use langchainx::schemas::memory::BaseMemory;
pub struct SlidingWindowMemory { /* ... */ }
impl BaseMemory for SlidingWindowMemory { /* ... */ }
// Required until blanket impl lands
impl Into<Arc<Mutex<dyn BaseMemory>>> for SlidingWindowMemory {
fn into(self) -> Arc<Mutex<dyn BaseMemory>> {
Arc::new(Mutex::new(self))
}
}
// DO NOT add Into<Arc<dyn BaseMemory>> — it is dead API
## Mutex vs RwLock
All memory uses tokio::sync::Mutex today. Memory is read far more often than written
(read on every plan() call, write only on Finish). RwLock would allow concurrent readers.
JOB-256 also evaluates switching to RwLock. Do not change this unilaterally — it is
part of the JOB-256 scope.