Quick start
Install the LangSmith Tool Server and LangChain CLI:@tool decorator:
http://localhost:8000.
Simple client example
Hereβs a simple example that lists available tools and calls theadd tool:
Adding OAuth authentication
For tools that need to access third-party APIs (like Google, GitHub, Slack, etc.), you can use OAuth authentication with Agent Auth. Before using OAuth in your tools, youβll need to configure an OAuth provider in your LangSmith workspace settings. See the Agent Auth documentation for setup instructions. Once configured, specify theauth_provider in your tool decorator:
auth_provider must:
- Have
context: Contextas the first parameter - Specify at least one scope
- Use
context.tokento make authenticated API calls