[GH-ISSUE #1259] [langchain]: Javascript docs for LangChain > Studio and LangChain > Observability reference Python APIs #183

Open
opened 2026-02-17 17:19:21 -05:00 by yindo · 0 comments
Owner

Originally created by @dan-massey on GitHub (Nov 3, 2025).
Original GitHub issue: https://github.com/langchain-ai/docs/issues/1259

Type of issue

issue / bug

Language

JavaScript

Description

The TypeScript LangChain studio docs and the LangChain observability docs contain instructions/examples for using the Python SDK, not the JS/TS SDK.

Some examples:

# Python >= 3.11 is required.
pip install --upgrade "langgraph-cli[inmem]"
from langchain.agents import create_agent

def send_email(to: str, subject: str, body: str):
    """Send an email"""
    email = {
        "to": to,
        "subject": subject,
        "body": body
    }
    # ... email sending logic

    return f"Email sent to {to}"

agent = create_agent(
    "gpt-4o",
    tools=[send_email],
    system_prompt="You are an email assistant. Always use the send_email tool.",
)
response = agent.invoke(
    {"messages": [{"role": "user", "content": "Send a welcome email"}]},
    config={
        "tags": ["production", "email-assistant", "v1.0"],
        "metadata": {
            "user_id": "user_123",
            "session_id": "session_456",
            "environment": "production"
        }
    }
)
Originally created by @dan-massey on GitHub (Nov 3, 2025). Original GitHub issue: https://github.com/langchain-ai/docs/issues/1259 ### Type of issue issue / bug ### Language JavaScript ### Description The TypeScript [LangChain studio docs](https://docs.langchain.com/oss/javascript/langchain/studio) and the [LangChain observability docs](https://docs.langchain.com/oss/javascript/langchain/observability#trace-selectively) contain instructions/examples for using the Python SDK, not the JS/TS SDK. Some examples: - [Install the LangGraph CLI](https://docs.langchain.com/oss/javascript/langchain/studio#1-install-the-langgraph-cli) ```bash # Python >= 3.11 is required. pip install --upgrade "langgraph-cli[inmem]" ``` - [Prepare your agent](https://docs.langchain.com/oss/javascript/langchain/studio#2-prepare-your-agent) ```python from langchain.agents import create_agent def send_email(to: str, subject: str, body: str): """Send an email""" email = { "to": to, "subject": subject, "body": body } # ... email sending logic return f"Email sent to {to}" agent = create_agent( "gpt-4o", tools=[send_email], system_prompt="You are an email assistant. Always use the send_email tool.", ) ``` - [Add metadata to traces](https://docs.langchain.com/oss/javascript/langchain/observability#add-metadata-to-traces) ```python response = agent.invoke( {"messages": [{"role": "user", "content": "Send a welcome email"}]}, config={ "tags": ["production", "email-assistant", "v1.0"], "metadata": { "user_id": "user_123", "session_id": "session_456", "environment": "production" } } ) ```
yindo added the langchainexternal labels 2026-02-17 17:19:21 -05:00
yindo changed title from [langchain]: Javascript docs for LangChain > Studio and LangChain > Observability reference Python APIs to [GH-ISSUE #1259] [langchain]: Javascript docs for LangChain > Studio and LangChain > Observability reference Python APIs 2026-06-05 17:25:31 -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#183