Configuration
Configure connection settings, approval waiting and content capture.
OpenEight configuration
Pass OpenEightConfig as openeight=. Use the connection details from Agent setup in the Console.
| Field | Default or requirement | Use |
|---|---|---|
agent_name | Required | Pass the Agent Slug from setup. Read OPENEIGHT_AGENT_NAME explicitly if you store it in the environment. |
endpoint | OPENEIGHT_ENDPOINT when omitted | OpenEight API endpoint (https://app.openeight.ai). |
credential | OPENEIGHT_API_KEY when omitted | Agent API Key from setup. |
on_block | message | Use message to return feedback to the Agent or raise to handle the error in your code. |
approval | One-hour inline wait when omitted | Set ApprovalConfig(timeout=...) for a shorter foreground request. |
capture_content | none | Opt into inputs, outputs or all only when appropriate. |
redact_content | No callback | Transform captured content before queueing. Authorization still uses the inputs selected by policy. |
sources | Empty tuple | Declare MCP sources with MCPSource. |
mcp_tools | None | Select MCP tools for the Agent. |
discovery | None | Customize tool discovery with DiscoveryConfig. |
delivery | None | Customize telemetry delivery with DeliveryConfig. |
runtime_models | None | List the models your Agent may use with RuntimeModelConfig. |
checkpoints | None | Configure checkpoint access across sessions with CheckpointAccess. |
durable | None | Configure approval recovery across process restarts with DurableApprovalConfig. |
import os
from openeight import OpenEightConfig
openeight_config = OpenEightConfig(
agent_name=os.environ["OPENEIGHT_AGENT_NAME"],
endpoint=os.environ["OPENEIGHT_ENDPOINT"],
credential=os.environ["OPENEIGHT_API_KEY"],
)Expected result · Pass this as openeight=openeight_config.
Errors and content
Handle SDK errors using their stable code or reason. Content capture is off by default; opt in and redact only what you need. Do not expose credentials or provider error bodies.
Integration snippets · use your model, tools and inputs. Handle SDK failures separately from model errors. Output capture is optional; this callback replaces every captured output.
from openeight import APIError, ConfigurationError
try:
result = agent.invoke(inputs)
except ConfigurationError as error:
print("Check integration configuration:", error.reason)
except APIError as error:
print("OpenEight request failed:", error.code)
# Inspect the failing stage; do not repeat a business effect to repair telemetry.
# Application/model errors are not handled by these two SDK error branches.
import os
from openeight import OpenEightConfig, TelemetryContentContext
from openeight.langchain import create_agent
def redact(context: TelemetryContentContext, value):
return "[REDACTED]" # Replace captured output; never log the original value.
openeight_config = OpenEightConfig(
agent_name=os.environ["OPENEIGHT_AGENT_NAME"],
endpoint=os.environ["OPENEIGHT_ENDPOINT"],
credential=os.environ["OPENEIGHT_API_KEY"],
capture_content="outputs",
redact_content=redact,
)
agent = create_agent(model=model, tools=tools, openeight=openeight_config)
# Invoke normally. The callback must be fast, synchronous and thread-safe.
Expected result · SDK error branches expose stable reason/code fields, not raw provider responses. The redactor replaces optional captured output; required policy-selected inputs are still sent for authorization. Outputs can contain sensitive data, so choose capture deliberately.