In this quickstart, you’ll authenticate against the Headless Fleet API, create an agent from code, and run it on a new thread.Documentation Index
Fetch the complete documentation index at: https://langchain-5e9cc07a-preview-fjmorr-1778259990-38b7dcc.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Before you start
You’ll need:- A LangSmith account (sign up here).
- A LangSmith API key.
- An OpenAI or Anthropic API key, added to your LangSmith workspace as a secret.
OPENAI_API_KEY or ANTHROPIC_API_KEY before continuing.
1. Get your LangSmith API key
If you don’t already have one, follow the Create an API key guide. Save the key (it starts withlsv2_) somewhere safe.
2. Verify your credentials
List the agents in your workspace to confirm authentication is working:3. Create your first agent
Send aPOST request to /v1/fleet/agents with a name and a basic configuration:
id. Save it for the next step.
graph_id selects which underlying graph runs your agent. Available graph IDs depend on your workspace configuration. Confirm with your LangSmith administrator or list available graphs in your deployment.4. Create a thread
A thread holds the state of a conversation across one or more runs:thread_id.
5. Run your agent
Stream a run on the thread, passing theagent_id from Step 3 and an input message:
Next steps
API reference
Browse all endpoints and request schemas.
Add tools
Connect Slack, GitHub, Linear, and more.
Schedule and trigger runs
Run your agent on a schedule or in response to events.
Skills
Package reusable knowledge and actions for your agents.
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

