Note that you don’t need to set up a separate agentops.init() call, as the LangChain callback handler will automatically initialize the AgentOps client for you.
Set up your LangChain agent with the AgentOps callback handler, and AgentOps will automatically record your LangChain sessions.
handler = LangchainCallbackHandler(api_key=AGENTOPS_API_KEY, tags=['LangChain Example'])llm = ChatOpenAI(openai_api_key=OPENAI_API_KEY, callbacks=[handler], model='gpt-3.5-turbo')agent = initialize_agent(tools, llm, agent=AgentType.CHAT_ZERO_SHOT_REACT_DESCRIPTION, verbose=True, callbacks=[handler], # You must pass in a callback handler to record your agent handle_parsing_errors=True)
Set your API key as an .env variable for easy access.
After your run, AgentOps prints a clickable URL to the console linking directly to your session in the Dashboard
Clickable link to session
Full Examples
import osfrom langchain.chat_models import ChatOpenAIfrom langchain.agents import initialize_agent, AgentTypefrom agentops.integration.callbacks.langchain import LangchainCallbackHandlerhandler = LangchainCallbackHandler(api_key=AGENTOPS_API_KEY, tags=['LangChain Example'])llm = ChatOpenAI(openai_api_key=OPENAI_API_KEY, callbacks=[handler], model='gpt-3.5-turbo')agent = initialize_agent(tools, llm, agent=AgentType.CHAT_ZERO_SHOT_REACT_DESCRIPTION, verbose=True, callbacks=[handler], # You must pass in a callback handler to record your agent handle_parsing_errors=True)
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"AgentOps","colors":{"primary":"#a9bed4","light":"#D1E5F7","dark":"#2b3033"},"favicon":"/favicon.png","logo":{"light":"https://mintcdn.com/agentops/FtF2hCpmQ3f-_c4T/images/external/logo/banner-badge-docs-resized-black.png?fit=max\u0026auto=format\u0026n=FtF2hCpmQ3f-_c4T\u0026q=85\u0026s=48bf3cfeb8d204351c58dbf6e9bb8009","dark":"https://mintcdn.com/agentops/FtF2hCpmQ3f-_c4T/images/external/logo/banner-badge-docs-resized-white.png?fit=max\u0026auto=format\u0026n=FtF2hCpmQ3f-_c4T\u0026q=85\u0026s=6314a88da46f2b6181463742ca0e8d5f"},"background":{"decoration":null,"color":{"light":"#f5faff","dark":"#18191a"}},"navbar":{"primary":{"type":"button","label":"Your Dashboard","href":"https://app.agentops.ai"}},"footer":{"socials":{"twitter":"https://twitter.com/agentopsai","discord":"https://discord.gg/UgJyyxx7uc","github":"https://github.com/AgentOps-AI"}},"integrations":{"posthog":{"apiKey":"phc_BrY3H11IViWSoUJ0QFfjBx7kEwIJMT0PjBEXZQmddW","apiHost":"https://us.i.posthog.com"}},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"agentops","hasAudioNarration":false,"actualSubdomain":"agentops","customDomains":["docs.agentops.ai"],"gitSource":{"type":"github","owner":"agentops-ai","repo":"agentops","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ae91a274f09cc61811e4ea3:success","clientVersion":"0.0.4410","searchFilterCounts":[{"language":"default","tag":"Integrations","count":43},{"language":"default","tag":"Usage","count":18},{"language":"default","tag":"Concepts","count":10},{"language":"default","tag":"Getting Started","count":6},{"language":"default","tag":"Self-Hosting","count":5},{"language":"default","tag":"Other Info","count":2}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"v1/integrations/langchain","slug":"/v1/integrations/langchain","pageMetadata":{"title":"LangChain","description":"AgentOps provides first class support for LangChain applications","href":"/v1/integrations/langchain"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"AgentOps provides first class support for LangChain applications\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{Check,CodeBlock,CodeGroup,Frame,Heading,OptimizedImage,Step,Steps,Tip}=_components;if(!Check)_missingMdxReference(`Check`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`AgentOps works seamlessly with applications built using LangChain.`}),`\n`,_jsx(Heading,{level:`2`,id:`adding-agentops-to-langchain-applications`,children:`Adding AgentOps to LangChain applications`}),`\n`,_jsxs(Steps,{children:[_jsxs(Step,{title:`Install the AgentOps SDK and the additional LangChain dependency`,children:[_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`pip`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`pip`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` agentops`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`pip`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` agentops[langchain]`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`poetry`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`poetry`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` add`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` agentops`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`poetry`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` add`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` agentops[langchain]`})]}),`\n`]})})})]}),_jsxs(Check,{children:[_jsx(_components.a,{href:`https://github.com/AgentOps-AI/agentops`,children:`Give us a star`}),` on GitHub while you’re at it (you may be our `,_jsx(`span`,{id:`stars-text`,children:`3,000th`}),` 😊)`]})]}),_jsxs(Step,{title:`Set up your import statements`,children:[_jsx(_components.p,{children:`Import the following LangChain and AgentOps dependencies`}),_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`python`,numberOfLines:`4`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` langchain.chat_models `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ChatOpenAI`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` langchain.agents `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` initialize_agent, AgentType`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` agentops.integration.callbacks.langchain `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` LangchainCallbackHandler`})]}),`\n`]})})})})]}),_jsxs(Step,{title:`Set up your LangChain handler to make the calls`,children:[_jsx(Tip,{children:_jsx(_components.p,{children:`Note that you don’t need to set up a separate agentops.init() call, as the LangChain callback handler will automatically initialize the AgentOps client for you.`})}),_jsx(_components.p,{children:`Set up your LangChain agent with the AgentOps callback handler, and AgentOps will automatically record your LangChain sessions.`}),_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`python`,numberOfLines:`14`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`14`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`handler `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` LangchainCallbackHandler(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`AGENTOPS_API_KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`tags`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'LangChain Example'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`llm `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ChatOpenAI(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`openai_api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`OPENAI_API_KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`\tcallbacks`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[handler],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`\tmodel`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'gpt-3.5-turbo'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`agent `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` initialize_agent(tools,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\tllm,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`\tagent`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`AgentType.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`CHAT_ZERO_SHOT_REACT_DESCRIPTION`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`\tverbose`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`\tcallbacks`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[handler], `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# You must pass in a callback handler to record your agent`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`\thandle_parsing_errors`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})})}),_jsx(Tip,{children:_jsxs(_components.p,{children:[`Set your API key as an `,_jsx(_components.code,{children:`.env`}),` variable for easy access.`]})}),_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`.env`,numberOfLines:`1`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`AGENTOPS_API_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=\u003c`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`YOUR`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` API`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`>`})]}),`\n`]})})})}),_jsxs(_components.p,{children:[`Read more about environment variables in `,_jsx(_components.a,{href:`/v1/usage/advanced-configuration`,children:`Advanced Configuration`})]})]}),_jsxs(Step,{title:`Run your agent`,children:[_jsxs(_components.p,{children:[`Execute your program and visit `,_jsx(_components.a,{href:`https://app.agentops.ai/drilldown`,children:`app.agentops.ai/drilldown`}),` to observe your LangChain Agent! 🕵️`]}),_jsx(Tip,{children:_jsx(_components.p,{children:`After your run, AgentOps prints a clickable URL to the console linking directly to your session in the Dashboard`})}),_jsx(`div`,{}),_jsx(Frame,{type:`glass`,caption:`Clickable link to session`,children:_jsx(OptimizedImage,{height:`200`,src:`https://github.com/AgentOps-AI/agentops/blob/main/docs/images/link-to-session.gif?raw=true`})})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`full-examples`,children:`Full Examples`}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`python`,numberOfLines:`17`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`17`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` langchain.chat_models `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ChatOpenAI`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` langchain.agents `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` initialize_agent, AgentType`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` agentops.integration.callbacks.langchain `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` LangchainCallbackHandler`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`handler `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` LangchainCallbackHandler(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`AGENTOPS_API_KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`tags`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'LangChain Example'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`llm `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ChatOpenAI(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`openai_api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`OPENAI_API_KEY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`\tcallbacks`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[handler],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`\tmodel`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'gpt-3.5-turbo'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`agent `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` initialize_agent(tools,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\tllm,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`\tagent`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`AgentType.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`CHAT_ZERO_SHOT_REACT_DESCRIPTION`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`\tverbose`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`\tcallbacks`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[handler], `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# You must pass in a callback handler to record your agent`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`\thandle_parsing_errors`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})})}),`\n`,_jsx(`script`,{type:`module`,src:`/scripts/github_stars.js`}),`\n`,_jsx(`script`,{type:`module`,src:`/scripts/scroll-img-fadein-animation.js`}),`\n`,_jsx(`script`,{type:`module`,src:`/scripts/button_heartbeat_animation.js`}),`\n`,_jsx(`script`,{type:`css`,src:`/styles/styles.css`}),`\n`,_jsx(`script`,{type:`module`,src:`/scripts/adjust_api_dynamically.js`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"LangChain","description":"AgentOps provides first class support for LangChain applications","href":"/v1/integrations/langchain"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Adding AgentOps to LangChain applications","slug":"adding-agentops-to-langchain-applications","depth":2,"children":[]},{"title":"Full Examples","slug":"full-examples","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"agentops","siteName":"AgentOps","title":"LangChain - AgentOps","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{"v2":{"href":"/v2/integrations/langchain","matchLevel":1},"v1":{"href":"/v1/integrations/langchain","matchLevel":0}},"firstHrefInLanguage":{}},"lastModified":"2026-01-06T23:41:06.790Z","originalFileLocation":"v1/integrations/langchain.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"AgentOps provides first class support for LangChain applications\">\u003cmeta data-mint-head name=\"application-name\" content=\"AgentOps\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/agentops/z0q4Penmid2LVItK/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/agentops/z0q4Penmid2LVItK/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/agentops/z0q4Penmid2LVItK/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/agentops/z0q4Penmid2LVItK/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/agentops/z0q4Penmid2LVItK/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/agentops/z0q4Penmid2LVItK/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/agentops/z0q4Penmid2LVItK/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/agentops/z0q4Penmid2LVItK/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/agentops/z0q4Penmid2LVItK/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"LangChain - AgentOps\">\u003cmeta data-mint-head property=\"og:description\" content=\"AgentOps provides first class support for LangChain applications\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"AgentOps\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.agentops.ai/v1/integrations/langchain\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://agentops.mintlify.site/_mintlify/api/og/v2?division=Integrations\u0026amp;title=LangChain\u0026amp;description=AgentOps+provides+first+class+support+for+LangChain+applications\u0026amp;theme=6247c5c6f5202256f7384412\u0026amp;signature=2ae19e46b78057d87667ceb8831c02d887391d9a1790826e030ed872a2b3c29c\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"LangChain - AgentOps\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"AgentOps provides first class support for LangChain applications\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://agentops.mintlify.site/_mintlify/api/og/v2?division=Integrations\u0026amp;title=LangChain\u0026amp;description=AgentOps+provides+first+class+support+for+LangChain+applications\u0026amp;theme=6247c5c6f5202256f7384412\u0026amp;signature=2ae19e46b78057d87667ceb8831c02d887391d9a1790826e030ed872a2b3c29c\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/agentops/z0q4Penmid2LVItK/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"AgentOps\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#a9bed4\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.agentops.ai/v1/integrations/langchain\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/v1/integrations/langchain.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.agentops.ai/#organization\",\"name\":\"AgentOps\",\"url\":\"https://docs.agentops.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/agentops/FtF2hCpmQ3f-_c4T/images/external/logo/banner-badge-docs-resized-black.png?fit=max\u0026auto=format\u0026n=FtF2hCpmQ3f-_c4T\u0026q=85\u0026s=48bf3cfeb8d204351c58dbf6e9bb8009\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.agentops.ai#website\",\"name\":\"AgentOps\",\"url\":\"https://docs.agentops.ai\",\"publisher\":{\"@id\":\"https://docs.agentops.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.agentops.ai/v1/integrations/langchain#webpage\",\"url\":\"https://docs.agentops.ai/v1/integrations/langchain\",\"name\":\"LangChain\",\"description\":\"AgentOps provides first class support for LangChain applications\",\"dateModified\":\"2026-01-06T23:41:06.790Z\",\"isPartOf\":{\"@id\":\"https://docs.agentops.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.agentops.ai/v1/integrations/langchain#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.agentops.ai/v1/integrations/langchain#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Integrations\",\"item\":\"https://docs.agentops.ai/v1/integrations/agents_sdk\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"LangChain\",\"item\":\"https://docs.agentops.ai/v1/integrations/langchain\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.agentops.ai/v1/integrations/langchain#article\",\"headline\":\"LangChain\",\"name\":\"LangChain\",\"description\":\"AgentOps provides first class support for LangChain applications\",\"url\":\"https://docs.agentops.ai/v1/integrations/langchain\",\"mainEntityOfPage\":{\"@id\":\"https://docs.agentops.ai/v1/integrations/langchain#webpage\"},\"dateModified\":\"2026-01-06T23:41:06.790Z\",\"publisher\":{\"@id\":\"https://docs.agentops.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.agentops.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"AgentOps\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"AgentOps\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/v1/integrations/langchain.md","siteName":"AgentOps","nav":{"global":null,"versions":[{"version":"v2","pages":[{"title":"v2","href":"/v2/integrations/langchain"}]},{"version":"v1","groups":[{"group":"","pages":[{"title":"Introduction","mode":"wide","href":"/v1/introduction"}]},{"group":"Getting Started","pages":[{"title":"Quickstart","href":"/v1/quickstart"},{"title":"Examples","mode":"wide","href":"/v1/examples/examples"}]},{"group":"Concepts","pages":[{"title":"Core Concepts","href":"/v1/concepts/core-concepts"},{"title":"Decorators","href":"/v1/concepts/decorators"},{"title":"Sessions","href":"/v1/concepts/sessions"},{"title":"Spans","href":"/v1/concepts/events"},{"title":"Tags","href":"/v1/concepts/tags"}]},{"group":"Integrations","pages":[{"title":"Agents sdk","href":"/v1/integrations/agents_sdk"},{"title":"AI21","href":"/v1/integrations/ai21"},{"title":"Anthropic","href":"/v1/integrations/anthropic"},{"title":"AG2","href":"/v1/integrations/autogen"},{"title":"Camel AI","href":"/v1/integrations/camel"},{"title":"Cohere","href":"/v1/integrations/cohere"},{"title":"CrewAI","href":"/v1/integrations/crewai"},{"title":"Gemini","href":"/v1/integrations/gemini"},{"title":"Groq","href":"/v1/integrations/groq"},{"title":"Haystack","description":"Monitor your Haystack agents with AgentOps","href":"/v1/integrations/haystack"},{"title":"LangChain","href":"/v1/integrations/langchain"},{"title":"LlamaIndex","description":"AgentOps works seamlessly with LlamaIndex, a framework for building context-augmented generative AI applications with LLMs.","href":"/v1/integrations/llamaindex"},{"title":"Llama Stack","href":"/v1/integrations/llama_stack"},{"title":"LiteLLM","href":"/v1/integrations/litellm"},{"title":"Mistral","href":"/v1/integrations/mistral"},{"title":"MultiOn","href":"/v1/integrations/multion"},{"title":"Ollama","href":"/v1/integrations/ollama"},{"title":"OpenAI","href":"/v1/integrations/openai"},{"title":"REST API","href":"/v1/integrations/rest"},{"title":"smolagents","href":"/v1/integrations/smolagents"},{"title":"SwarmZero","href":"/v1/integrations/swarmzero"},{"title":"TaskWeaver","href":"/v1/integrations/taskweaver"},{"title":"xAI","href":"/v1/integrations/xai"}]},{"group":"Usage","pages":[{"title":"Dashboard","mode":"wide","href":"/v1/usage/dashboard-info"},{"title":"SDK Reference","href":"/v1/usage/sdk-reference"},{"title":"Advanced Configuration","mode":"wide","href":"/v1/usage/advanced-configuration"},{"title":"Tracking LLM Calls","href":"/v1/usage/tracking-llm-calls"},{"title":"Tracking Agents","href":"/v1/usage/tracking-agents"},{"title":"Recording Operations","href":"/v1/usage/recording-operations"}]},{"group":"Other Info","pages":[{"title":"Host Environment Data","href":"/v1/concepts/host-env"}]}]},{"version":"v0","groups":[]}]},"basePath":"","title":"LangChain - AgentOps","deploymentId":"dpl_3VZr4zL4q2wbintGwWjSCGUgnuP7","buildId":"dpl_3VZr4zL4q2wbintGwWjSCGUgnuP7","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-BNZBpOKW.js","DynamicMarkdown-F4EfLno9.js","zoom-image-lightbox-CbF0jxOW.js","lightbox-handle-r17bVUz3.js"]}