> ## Documentation Index
> Fetch the complete documentation index at: https://docs.datavibe.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# LangChain and CrewAI

> Govern framework-generated output before a side-effecting tool runs.

Use preview checks for pure output inspection. Before an email, CRM, payment, or
other side-effecting tool runs, create a persisted gate submission.

## LangChain output callback

The TypeScript SDK exposes `DataVibeCallbackHandler` for observing model output.
A callback preview does not create human review work. Use `intercept()` before
executing a side effect.

```typescript theme={null}
const proposedEmail = await draftChain.invoke(input);
const gate = await datavibe.intercept({
  recipient,
  subject,
  body_text: proposedEmail.content,
  body_html: `<p>${proposedEmail.content}</p>`,
  source_model: modelName,
  idempotency_key: toolCallId,
});

if (gate.status !== "APPROVED") {
  throw new Error(`Hold side effect: ${gate.status}`);
}

await emailTool.invoke(proposedEmail);
```

## CrewAI preview

```python theme={null}
preview = client.check(proposed_text, content_type="agent_action")
```

For asynchronous preview use `await client.acheck(...)`. If the verdict requires
review, submit the final action through `intercept()` or `intercept_async()`.

<Warning>
  Never read `review_url` from a preview result. Stateless checks do not create an
  action or review record.
</Warning>
