Can't connect to SDK

Hi,
I’m trying to connect to the Python SDK using the documentation. In response, I got:

httpx.HTTPStatusError: Server error ‘500 Internal Server Error’ for url ``https://ai-test.us.langgraph.app``/assistants/search’

Code:

from langgraph_sdk import get_client

# If you're using a remote server, initialize the client with `get_client(url=REMOTE_URL)`
client = get_client(
    url=LANGSMITH_API_URL,
    api_key=LANGSMITH_API_KEY,
)


async def main():
    # List all assistants
    assistants = await client.assistants.search()

    # We auto-create an assistant for each graph you register in config.
    agent = assistants[0]

    # Start a new thread
    thread = await client.threads.create()

    # Start a streaming run
    input = {"messages": [{"role": "human", "content": "what's the weather in la"}]}
    async for chunk in client.runs.stream(
        thread["thread_id"], agent["assistant_id"], input=input
    ):
        print(chunk)


if __name__ == "__main__":
    import asyncio

    asyncio.run(main())

Regarding this, I have a few questions:

  1. Can I use an asyncio library for fetch, or should I use something else?
  2. Is there a tutorial on how to connect the LangGraph to Telegram or WhatsApp?

Thanks for the help!

Hi @romanh24! Sorry to hear you’re running into some issues here. Just to confirm, did you deploy this langgraph application on langgraph platform?

Hi,
The issue was with the auth logic — needed to add in the auth.py file.

Currently solved.