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

# Strands

> Protect Strands agents with Dome content Guards or the full Trust Runtime.

<Tip>
  **TL;DR:** For content protection, pass a `DomeHookProvider` to your Strands Agent's `hooks`. For full Agent security, pass the Agent to `secure_agent()` instead.
</Tip>

Strands [Agents](/owner-guide/register-agents/what-is-an-agent) accept a list of hook providers that fire on lifecycle events. Dome ships a hook provider for content protection and a Trust Runtime adapter for full Agent security.

## Choosing a Protection Level

<Tabs>
  <Tab title="Content Guards">
    The `DomeHookProvider` registers input and output Guards on the Agent's model-call events. Install the Strands extra (`pip install "vijil-dome[strands]"`).

    ```python theme={null}
    from strands import Agent
    from vijil_dome import Dome
    from vijil_dome.integrations.strands import DomeHookProvider

    dome = Dome()

    agent = Agent(
        hooks=[
            DomeHookProvider(
                dome,
                agent_id="my-agent",
                team_id="my-team",
                user_id="user-123",
            )
        ],
    )
    ```

    `DomeHookProvider` guards inputs and outputs asynchronously on every model call. The `agent_id`, `team_id`, and `user_id` arguments are optional and flow through to Dome for telemetry. You can customize `input_blocked_message` and `output_blocked_message`.
  </Tab>

  <Tab title="Trust Runtime">
    For identity, tool-permission enforcement, and audit, wrap the Agent with [`secure_agent()`](/concepts/defense/trust-runtime). It detects Strands automatically and injects the trust hooks in place.

    ```python theme={null}
    from strands import Agent
    from vijil_dome import secure_agent

    agent = Agent(tools=[search_flights, process_payment])

    secure_agent(agent, agent_id="travel-agent", mode="enforce")
    ```

    This requires the `trust-adapters` extra (which includes `strands-agents`):

    ```bash theme={null}
    pip install "vijil-dome[trust,trust-adapters]"
    ```

    If you need the hook provider without wrapping the Agent, use `create_trust_hooks()`:

    ```python theme={null}
    from vijil_dome.trust.adapters.strands import create_trust_hooks

    hooks = create_trust_hooks(agent_id="travel-agent", mode="enforce")
    agent = Agent(tools=[...], hooks=[hooks])
    ```

    In `enforce` mode, a denied tool call is cancelled before it runs. See [Trust Runtime](/concepts/defense/trust-runtime) for identity and manifest details.
  </Tab>
</Tabs>

## Next Steps

<CardGroup cols={2}>
  <Card title="Trust Runtime" icon="fingerprint" href="/concepts/defense/trust-runtime">
    Identity, tool permissions, and attestation
  </Card>

  <Card title="Configure Guardrails" icon="sliders-horizontal" href="/developer-guide/protect/configuring-guardrails">
    Choose which Guards run
  </Card>
</CardGroup>
