> ## Documentation Index
> Fetch the complete documentation index at: https://allhandsai-cookbook-preview-pr-13.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Enterprise Cookbook

> Runnable examples for building on the OpenHands API with OpenHands Cloud or OpenHands Enterprise.

Standalone, runnable examples for teams building on the OpenHands API with OpenHands Cloud or
OpenHands Enterprise. Each page is generated from an example in
[OpenHands/enterprise-cookbook](https://github.com/OpenHands/enterprise-cookbook), where you
will find the full source.

## Conversation monitoring & reacting

Observe conversations and react to their state.

<CardGroup cols={2}>
  <Card title="Conversation Metrics" icon="chart-line" href="/cookbook/conversation-metrics">
    Retrieve cost and token usage metrics for conversations via CLI tool.
  </Card>

  <Card title="Conversation Tags" icon="tags" href="/cookbook/conversation-tags">
    Attach key-value metadata to a conversation with tags and read it back from AppConversation.tags.
  </Card>

  <Card title="Finish Callback" icon="bell" href="/cookbook/finish-callback">
    Notify an external URL when a conversation finishes using a Stop hook.
  </Card>

  <Card title="React to State WebSocket" icon="bolt" href="/cookbook/react-to-state-websocket">
    React to conversation execution\_status changes over WebSocket instead of polling.
  </Card>

  <Card title="Server Info Idle" icon="clock" href="/cookbook/server-info-idle">
    Poll the idle\_time endpoint to detect when a workspace has gone quiet.
  </Card>

  <Card title="Watch Terminal State" icon="terminal" href="/cookbook/watch-terminal-state">
    Detect confirmed terminal execution\_status over WebSocket with proper event handling.
  </Card>
</CardGroup>

## Guardrails

Constrain what the agent can do with hooks.

<CardGroup cols={2}>
  <Card title="Command blacklist" icon="shield-halved" href="/cookbook/command-blacklist">
    Block known-dangerous shell commands with a PreToolUse hook bundled in a plugin. Everything not on the blocklist runs normally.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.