Plan: vCon LangChain tool set#196
Draft
howethomas wants to merge 1 commit into
Draft
Conversation
Design/proposal doc for exposing vCons to LangChain agents as a tool set: a standalone vcon_langchain package (REST-backed backend, StructuredTools, VconToolkit), optional langchain dependency group, tests, and docs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011ztZ77HirosvbtA99WXVae
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a design/implementation plan (
docs/design/langchain-toolset-plan.md) for exposing vCons to LangChain agents as a first-class tool set. No code changes yet — this PR is the plan for review before implementation.The proposal:
vcon_langchainpackage (kept dep-light and separate from server-only deps).VconBackendprotocol (VconApiBackendover the existingapi/api.py), so agents don't need to share a process/Redis with the conserver. An in-processVconRedisbackend can be added later without touching the tool layer.langchain_coreStructuredTools with typed Pydantic args schemas and LLM-facing descriptions — read tools (get_vcon,search_vcons,list_recent_vcons, convenienceget_vcon_transcript/get_vcon_analysis/get_vcon_parties/get_vcon_tags) plus opt-in write tools (add_vcon_tag,create_vcon,submit_vcon_to_chain). Destructivedelete_vconexcluded by default.VconToolkit(BaseToolkit)assembling the tools; sync + async execution.langchaindependency group inpyproject.toml(langchain-core,httpx), with a guarded import mirroring the Milvus backend pattern.docs/extending/+ mkdocs nav.Why this is a new surface (not a "link")
Links are pushed work by the conserver worker (
run(vcon_uuid, link_name, opts)); LangChain tools are pulled by an LLM agent on demand (BaseTool+ args schema). They're complementary — existing links are unchanged.Design decisions grounded in the codebase
encoding: jsonbody-decode semantics (Vcon.decoded_body) as a pure function with no server dependency.create_vconuses the canonicalvcon>=0.9.2library already in core deps rather than re-implementing UUID8 generation.Open questions for reviewers
Captured in §11 of the doc: REST-first vs in-process backend default, package home, whether v1 should be read-only, and keeping
delete_vconopt-in.🤖 Generated with Claude Code
Generated by Claude Code