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

# Command Verification Hook • AI Agent SDK

> CommandVerificationHook: Verification hook that runs a shell command.

# CommandVerificationHook

> Defined in the [**verification**](../modules/verification) module.

<Badge color="blue">AI Agent</Badge>

Verification hook that runs a shell command.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#8B0000', 'primaryTextColor': '#fff', 'primaryBorderColor': '#710101', 'lineColor': '#189AB4', 'secondaryColor': '#189AB4', 'tertiaryColor': '#fff' }}}%%

graph TD
    event["Event Trigger"] --> hook["Hook: CommandVerificationHook"]
    hook --> decision{"Decision"}
    decision -- "Allow" --> proc["Process"]
    decision -- "Deny" --> block["Block"]
    style hook fill:#189AB4,color:#fff
    style event fill:#8B0000,color:#fff
    style proc fill:#8B0000,color:#fff
    style block fill:#8B0000,color:#fff
```

## Constructor

<ParamField query="name" type="str" required={true}>
  No description available.
</ParamField>

<ParamField query="command" type="list" required={true}>
  No description available.
</ParamField>

<ParamField query="cwd" type="Optional" required={false}>
  No description available.
</ParamField>

<ParamField query="timeout" type="float" required={false} default="60.0">
  No description available.
</ParamField>

## Usage

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
hook = CommandVerificationHook(
        name="pytest",
        command=["pytest", "-v", "--tb=short"]
    )
```

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/hooks/verification.py#L167">
  `praisonaiagents/hooks/verification.py` at line 167
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Hooks Concept" icon="anchor" href="/docs/concepts/hooks" />

  <Card title="Hook Events" icon="bolt" href="/docs/features/hook-events" />

  <Card title="Callbacks" icon="phone" href="/docs/features/callbacks" />
</CardGroup>
