Skip to content
OpenEightDeveloper docs
Docs / Integrations / Integrate LangChain
SDK integration

Integrate LangChain

Connect your existing LangChain agent to OpenEight and verify its first governed tool call.

On this pageCreate your Agent in the ConsoleInstall and configureConnect your LangChain agentPublish tools and review the policyRun and verifyFurther reading

1Create your Agent in the Console

Open Agent setup in the Console →

Select LangChain, create your Agent and save its API key privately. If you already have an Agent, open its setup to find your connection details.

View the LangChain setup screen
Choose the LangChain onboarding pathSelect LangChain agent, then Continue with LangChain to name your Agent and configure its credential. This path publishes the tools bound to your LangChain agent. Use the guide’s installation and application code below for the supported integration.

2Install and configure

Install OpenEight in the Python environment that runs your agent. Check supported versions →

pip install openeight
OpenEight connection details
ValueWhat to use
API endpointhttps://app.openeight.ai
Agent SlugCopy the Agent Slug from Agent setup.
API KeyThe Agent key you saved, or the eligible Workspace key selected during setup.

Set your connection values

Use the endpoint shown below. Enter your Agent Slug and API Key privately in the shell that runs your agent.

Terminal
export OPENEIGHT_ENDPOINT='https://app.openeight.ai'
export OPENEIGHT_AGENT_NAME="your-agent-slug"
export OPENEIGHT_API_KEY="<your-agent-api-key>"

If you use a .env file, load it in your application before reading the environment.

3Connect your LangChain agent

Import create_agent from openeight.langchain and pass openeight=openeight_config. Keep your existing model and tools.

PythonIntegration snippet · your model and tools
import os
from openeight import OpenEightConfig
from openeight.langchain import create_agent

openeight_config = OpenEightConfig(
    agent_name=os.environ["OPENEIGHT_AGENT_NAME"],
    endpoint=os.environ["OPENEIGHT_ENDPOINT"],
    credential=os.environ["OPENEIGHT_API_KEY"],
)

agent = create_agent(
    model=model,
    tools=tools,
    openeight=openeight_config,
)
Compare with the native constructor
PythonBefore · native LangChain
from langchain.agents import create_agent

agent = create_agent(
    model=model,
    tools=tools,
)

4Publish tools and review the policy

Publish the tool schemas without running the model or calling the tools.

Use Sync for scripts; use Async inside an event loop.

PythonOne-time setup
agent.publish()  # Publishes tools without invoking the agent.
print(agent.delivery_status())

An acknowledged catalog delivery means OpenEight received the schemas. Open Agent onboarding and check the published version of each write tool. If each version is policy-ready, continue to Run and verify.

Review Assist proposals

In Discover tools, review each new tool’s Read or Side-effect classification. Select Infer intents, then review and confirm the intent for each side-effecting tool. Continue with Generate to see the Assist proposals.

In Govern tools, open the proposal for each write tool that needs a policy. Review its rules and generated cases. A Workspace Admin or Owner can select Accept to activate the policy, or Tune to revise it.

Review the policy detailsExample policy rules.

5Run and verify

Choose a test input that asks your agent to use a governed tool. Use a test environment or a simulated effect when checking write actions. Invoke the agent you connected earlier.

PythonYour application · after policy setup
result = agent.invoke(inputs)

If the action needs approval, open Approvals in the Console and review the pending request for your Agent.

In Agents → your Agent → Activity → Runs, open the Run and find the tool’s Decision. If the tool executed, its execution Event links to that Decision.

Missing a tool, Run or Decision? Troubleshoot your integration →

Further reading

OpenEight / Developer docsPython SDK 0.0.1

Search documentation

Build with OpenEightBuild or connect an agent, configure its controls, and inspect its activity.
Build your first agentDefine a model and tools, create an agent with OpenEight, configure policies, and run it.
Connect an existing agentKeep your existing model, tools, and agent logic. Add the OpenEight Python SDK where your agent calls tools so a policy can allow a call, block it, or pause it for approval.
Refund walkthroughSee how OpenEight checks a refund before the tool runs. USD refunds through $100 can proceed. Larger USD refunds and refunds in other currencies wait for a reviewer. All receipts in this walkthrough are simulated.
Integrate LangChainConnect your existing LangChain agent to OpenEight and verify its first governed tool call.
Integrate Deep AgentsConnect your existing Deep Agents agent to OpenEight and verify its first governed tool call.
Custom integrationsUse OpenEight with an Agent that calls tools directly or uses another framework.
Observe without enforcementConnect your Agent’s OpenTelemetry exporter to see Runs and tool activity in OpenEight. Tool calls proceed without policy checks or approval requests.
How governance worksBefore your Agent runs a governed tool, OpenEight checks the request against its active policies.
Prepare tools for governanceCheck how OpenEight classifies your Agent’s tools and confirm the intent Assist will use to draft policies.
Create policies with AssistAssist drafts rules and test cases from a policy intent. Review what the rules allow, deny or hold for approval before activating them.
Handle approvalsReview a pending tool call and decide whether the Agent may continue.
Inspect decisionsSee how your policies applied to a tool call and find out whether it executed.
Inspect runs and eventsOpen a Run to see which tools your Agent called, how long they took, and what status the Agent reported.
Configure model pricingModel rates apply across every Workspace in your organization. OpenEight uses them to calculate spend from recorded usage.
Set Agent budgetsSet cost and token limits for an Agent.
Send approval notifications to SlackSend approval requests to a Slack channel so reviewers can open them in the OpenEight Console.
Export and verify evidenceExport a Workspace evidence bundle, establish trust in its signing key, and verify recorded evidence offline with the OpenEight CLI.
TroubleshootingDiagnose SDK startup, tool publication, approval, and delivery issues.
Calls and sessionsChoose when to open a session and how to manage resources across calls.
Stream results and clean upRead incremental agent results and release resources when a reader stops early.
Threads and checkpointsSave a conversation between calls so your Agent can pick up where it left off.
Delivery and shutdown checksFlush buffered work and inspect delivery before shutdown.
Compatibility and installationFind your integration, supported runtime and SDK version.
ConfigurationConfigure connection settings, approval waiting and content capture.
Constructors and executionCreate an agent and choose its invocation methods.
LangChain optionsLook up structured output, configurable models and LangChain execution limits.
Deep Agents optionsConfigure root and child tools, filesystem permissions and MCP sources.
Tool publication and readinessPublish tool schemas, find acknowledged versions and check policy readiness.
Approval waiting and replayA managed Agent can wait in the running process or return a waiting thread for your code to resume. With a direct Python client, your code polls and replays the request.
Python API signaturesLook up parameters, defaults and return types for OpenEight Python SDK 0.0.1.