[PR #2692] [MERGED] feat: add REST API examples to agent builder docs [closes DOC-599] #2672

Closed
opened 2026-02-17 17:23:39 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/docs/pull/2692
Author: @lnhsingh
Created: 2/17/2026
Status: Merged
Merged: 2/18/2026
Merged by: @lnhsingh

Base: mainHead: open-swe/74e516b4-7ee6-e3ea-3d9f-d3436a590556


📝 Commits (7)

  • 34004b9 Add REST API (cURL) examples to Agent Builder "Call from code" docs page. This enables users of any language/platform to invoke agents via direct HTTP calls, not just Python/TypeScript SDK users.
  • 03eef84 Apply suggestions from code review
  • fb81bb6 Apply suggestions from code review
  • c1e808e Apply suggestion from @lnhsingh
  • 604b117 Apply suggestion from @lnhsingh
  • c6de36f Apply suggestions from code review
  • 7e987a5 Apply suggestions from code review

📊 Changes

1 file changed (+378 additions, -8 deletions)

View changed files

📝 src/langsmith/agent-builder-code.mdx (+378 -8)

📄 Description

Description

PREVIEW: https://langchain-5e9cc07a-preview-opensw-1771365527-8f42dd0.mintlify.app/langsmith/agent-builder-code#curl

Adds REST API (cURL) examples to the Agent Builder "Call from code" documentation page. Previously, the page only showed Python and TypeScript SDK examples. This update helps users who want to call their agents from services not written in Python or TypeScript by providing direct HTTP/cURL examples.

Changes:

  • Updated page description and intro to mention REST API alongside the SDK
  • Added a cURL tab to the "Get agent info" section
  • Added new "Invoke your agent" section with three subsections:
    • Stateless run — single request/response via /runs/wait (Python, TypeScript, cURL)
    • Stateless streaming run — streaming via /runs/stream (Python, TypeScript, cURL)
    • Stateful run with a thread — multi-turn conversation using threads (Python, TypeScript, cURL)
  • Added a "REST API reference" table summarizing key endpoints and required headers
  • Restructured the page with clearer headings ("Find your agent ID and URL", "Get agent info", "Invoke your agent")

All cURL examples include the required authentication headers (X-Api-Key, X-Auth-Scheme: langsmith-api-key) consistent with the Agent Builder auth pattern.

Resolves DOC-599

Note: This PR was authored with assistance from an AI agent.

Test Plan

  • Verify the page renders correctly in Mintlify preview
  • Verify all Tabs components render Python, TypeScript, and cURL tabs
  • Verify cURL examples use correct endpoint paths (/runs/wait, /runs/stream, /threads, /threads/<THREAD_ID>/runs/stream)
  • Verify authentication headers are consistent across all cURL examples
  • Verify the REST API reference table renders correctly
  • Verify internal links resolve (e.g., /langsmith/create-account-api-key, /langsmith/server-api-ref)
  • Test code snippets

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/docs/pull/2692 **Author:** [@lnhsingh](https://github.com/lnhsingh) **Created:** 2/17/2026 **Status:** ✅ Merged **Merged:** 2/18/2026 **Merged by:** [@lnhsingh](https://github.com/lnhsingh) **Base:** `main` ← **Head:** `open-swe/74e516b4-7ee6-e3ea-3d9f-d3436a590556` --- ### 📝 Commits (7) - [`34004b9`](https://github.com/langchain-ai/docs/commit/34004b90066b89552a452d1a3b74a1ef453da357) Add REST API (cURL) examples to Agent Builder "Call from code" docs page. This enables users of any language/platform to invoke agents via direct HTTP calls, not just Python/TypeScript SDK users. - [`03eef84`](https://github.com/langchain-ai/docs/commit/03eef8431552e085ad558a1cf6648888a4e8c2c6) Apply suggestions from code review - [`fb81bb6`](https://github.com/langchain-ai/docs/commit/fb81bb6863e1d4d5f3698665c97cadff7f04eea6) Apply suggestions from code review - [`c1e808e`](https://github.com/langchain-ai/docs/commit/c1e808ed91c1f07f5e3087a523cd4da6475e36e6) Apply suggestion from @lnhsingh - [`604b117`](https://github.com/langchain-ai/docs/commit/604b117f258f2391d3e84b9c193050c5f02a24c6) Apply suggestion from @lnhsingh - [`c6de36f`](https://github.com/langchain-ai/docs/commit/c6de36f11b11aae1494fb8cbe0e2d72cbb3d3533) Apply suggestions from code review - [`7e987a5`](https://github.com/langchain-ai/docs/commit/7e987a546fcedb40c2ade921b74d372203bfc81e) Apply suggestions from code review ### 📊 Changes **1 file changed** (+378 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `src/langsmith/agent-builder-code.mdx` (+378 -8) </details> ### 📄 Description ## Description PREVIEW: https://langchain-5e9cc07a-preview-opensw-1771365527-8f42dd0.mintlify.app/langsmith/agent-builder-code#curl Adds REST API (cURL) examples to the Agent Builder "Call from code" documentation page. Previously, the page only showed Python and TypeScript SDK examples. This update helps users who want to call their agents from services not written in Python or TypeScript by providing direct HTTP/cURL examples. Changes: - Updated page description and intro to mention REST API alongside the SDK - Added a cURL tab to the "Get agent info" section - Added new "Invoke your agent" section with three subsections: - **Stateless run** — single request/response via `/runs/wait` (Python, TypeScript, cURL) - **Stateless streaming run** — streaming via `/runs/stream` (Python, TypeScript, cURL) - **Stateful run with a thread** — multi-turn conversation using threads (Python, TypeScript, cURL) - Added a "REST API reference" table summarizing key endpoints and required headers - Restructured the page with clearer headings ("Find your agent ID and URL", "Get agent info", "Invoke your agent") All cURL examples include the required authentication headers (`X-Api-Key`, `X-Auth-Scheme: langsmith-api-key`) consistent with the Agent Builder auth pattern. Resolves DOC-599 > Note: This PR was authored with assistance from an AI agent. ## Test Plan - [x] Verify the page renders correctly in Mintlify preview - [x] Verify all Tabs components render Python, TypeScript, and cURL tabs - [x] Verify cURL examples use correct endpoint paths (`/runs/wait`, `/runs/stream`, `/threads`, `/threads/<THREAD_ID>/runs/stream`) - [x] Verify authentication headers are consistent across all cURL examples - [x] Verify the REST API reference table renders correctly - [x] Verify internal links resolve (e.g., `/langsmith/create-account-api-key`, `/langsmith/server-api-ref`) - [x] Test code snippets --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-17 17:23:39 -05:00
yindo changed title from [PR #2692] feat: add REST API examples to agent builder docs [closes DOC-599] to [PR #2692] [MERGED] feat: add REST API examples to agent builder docs [closes DOC-599] 2026-06-05 18:19:59 -04:00
yindo closed this issue 2026-06-05 18:20:00 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#2672