import CodeBlock from "@theme/CodeBlock";
import CallbacksExample from "@examples/agents/agent_callbacks.ts";

# Subscribing to events

You can subscribe to a number of events that are emitted by the Agent and the underlying tools, chains and models via callbacks.

For more info on the events available see the [Callbacks](/docs/modules/callbacks/) section of the docs.

<CodeBlock language="typescript">{CallbacksExample}</CodeBlock>