Give with_openviking_context a deterministic lifecycle owner, reuse adapter clients without sharing invocation state, and preserve loop-scoped async behavior. Make component copies lifecycle-safe and reject post-close use before history access.
Copy connection and retriever configuration without cloning caller-owned live clients or carrying owned client caches into copied adapters. Guard optional Pydantic private state before resetting compatibility caches.
* fix(langchain): make async recording concurrency-safe
* fix(langchain): scope async state to each invocation
* fix(langchain): preserve cancellation progress on Python 3.10
* fix(langchain): recover stale OpenViking clients
Wrap lazily-created HTTP clients used by the LangChain integration so recoverable read calls can rebuild a stale client once, while mutating calls only evict the broken client and are not retried.
Keep local embedded clients direct, complete the batch_add_messages client contract for local and in-memory clients, and keep sync async bridge calls from foreign event loops on the shared background loop.
* fix(langchain): filter kwargs on recovered handle calls
* chore(langchain): split batch message contract fix
* style(langchain): format reconnect tests
Previously, adding messages required one HTTP request per message,
making bulk operations (e.g. memory extraction, history migration)
very slow due to network round-trip overhead.
Changes:
- Add POST /api/v1/sessions/{id}/messages/batch endpoint
- Add BatchAddMessageRequest model with max_length=500 limit
- Extract _resolve_message_parts() helper to deduplicate part resolution
- Add _defer_meta_save parameter to Session.add_message() for batch optimization
- Add batch_add_messages method to Python SDK clients (base/http/sync)
- Add batch_add_messages to Session wrapper class
- Update LangChain integration to use batch API
- Update Rust CLI add_memory to use batch API