LangChain options
Look up structured output, configurable models and LangChain execution limits.
Models and structured output
Pass a model object or a provider:model string to create_agent. To request structured output, pass your schema as response_format. Schema validation tools stay outside the business Tool Catalog.
For a configurable model, list each model your Agent may use in OpenEightConfig.runtime_models. Use the configurable field ID defined by your model. In this example the field is model_choice and the allowed value is fast.
from openeight import ModelVariant, OpenEightConfig, RuntimeModelConfig
from openeight.langchain import create_agent
# Supply your connection settings and a model with a "fast" alternative.
selection = {"model_choice": "fast"}
config = OpenEightConfig(
**connection_settings,
runtime_models=RuntimeModelConfig(
variants=(ModelVariant(name="fast", configurable=selection),),
),
)
agent = create_agent(model=model, tools=tools, openeight=config)
result = agent.invoke(inputs, config={"configurable": selection})An unknown selection raises ConfigurationError. When using durable approvals, enroll exactly one variant for a configurable model.
Handle blocked actions
Set on_block in OpenEightConfig to choose who handles a blocked tool call. With the default on_block="message", the Agent receives a tool message explaining the block. With on_block="raise", your calling code can catch BlockedError. The blocked call never executes the tool handler.
Resources and execution limits
Keep any model, checkpointer or store you pass directly to the Agent alive until cleanup finishes, then close it in your own code. If you pass resources=, open and close the checkpointer or store in that factory and omit both constructor arguments.
Middleware can change tool arguments. OpenEight checks the final arguments before dispatching a governed tool. Your application owns effects performed elsewhere in middleware.
The managed constructor omits cache, interrupt_before, interrupt_after and transformers. Debug is disabled.