From 2d953946103c0ed7b307f527ed7e62e664ce5cdf Mon Sep 17 00:00:00 2001 From: BlockVectra <5194435+gjwang@users.noreply.github.com> Date: Sun, 8 Nov 2026 00:35:01 +0800 Subject: [PATCH] docs: offer clone-free LangChain first read --- README.md | 9 +++++++++ README.zh.md | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/README.md b/README.md index 63b79d3..0f83897 100644 --- a/README.md +++ b/README.md @@ -388,6 +388,15 @@ For LangChain tools, use [examples/langchain_docs.py](examples/langchain_docs.py LANGSMITH_TRACING=false uv run examples/langchain_docs.py ``` +To try the same example without cloning, run this fixed published version (Python 3.11+ and uv required): + +```bash +LANGSMITH_TRACING=false uv run --script --python 3.11 \ + https://raw.githubusercontent.com/blockvectra/agent-quickstart/f6199662a459abebccba5c3451d80bf5e9a199e4/examples/langchain_docs.py +``` + +[uv downloads the script and manages its dependencies](https://docs.astral.sh/uv/reference/cli/#uv-run). The commit in the URL fixes the example's source version; it does not lock every transitive dependency. + The script declares `langchain[mcp]==1.4.9`, `fastmcp==4.1.6` and `mcp==2.3.0` in inline metadata; uv manages its environment separately from project dependencies. It uses the current `langchain.mcp.MCPAdapter` API, which is **beta**, rather than the deprecated adapters package. See the [LangChain migration guide](https://docs.langchain.com/oss/python/migrate/langchain-mcp-adapters). It verifies that only `search_docs` and `read_doc` are exposed, searches for English `quickstart`, then reads that page through LangChain tools. JSON output contains the protocol version, tool names and both tool messages with the document text. No LLM, model API key, BlockVectra key, wallet or chain RPC is needed. The command disables LangSmith tracing. Operation timeouts are 15 seconds, with a 60-second cooperative overall timeout; dependency installation happens before those timeouts. The existing call logic was checked with the pinned versions; this does not verify a model-driven agent workflow. diff --git a/README.zh.md b/README.zh.md index 713914f..89647db 100644 --- a/README.zh.md +++ b/README.zh.md @@ -388,6 +388,15 @@ uv run examples/mcp_docs.py --query "Robinhood 主网 RPC" --lang zh LANGSMITH_TRACING=false uv run examples/langchain_docs.py ``` +不克隆仓库也可以试用同一示例,运行以下固定发布版本(需要 Python 3.11+ 和 uv): + +```bash +LANGSMITH_TRACING=false uv run --script --python 3.11 \ + https://raw.githubusercontent.com/blockvectra/agent-quickstart/f6199662a459abebccba5c3451d80bf5e9a199e4/examples/langchain_docs.py +``` + +[uv 会下载脚本并管理依赖](https://docs.astral.sh/uv/reference/cli/#uv-run)。URL 中的提交号固定示例源码版本,不代表所有传递依赖均已锁定。 + 脚本在内联元数据中声明 `langchain[mcp]==1.4.9`、`fastmcp==4.1.6`、`mcp==2.3.0`,uv 会管理独立于项目依赖的环境。示例采用当前仍为 **beta** 的 `langchain.mcp.MCPAdapter`,不安装已弃用的 adapters 包。迁移说明见 [LangChain 官方指南](https://docs.langchain.com/oss/python/migrate/langchain-mcp-adapters)。 它先确认仅暴露 `search_docs` 和 `read_doc`,检索英文 `quickstart`,再通过 LangChain 工具读取该页。JSON 输出包含协议版本、工具名和两次工具消息及文档正文。无需 LLM、模型 API key、BlockVectra key 或钱包,不调用链上 RPC;上述命令关闭 LangSmith tracing。操作超时为15秒,协作式总超时为60秒,安装依赖不计入这些时限。既有调用逻辑已用所固定版本核验,不代表模型驱动的完整 Agent 工作流已经验证。