> ## 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.

# Asqav Compliance Scanner

> CI GitHub Action that scans PraisonAI agent code for governance gaps - audit trails, policy enforcement, revocation, human oversight, and error handling

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
from praisonaiagents import Agent

agent = Agent(
    name="GovernedAssistant",
    instructions="Follow audit, policy, and human-oversight requirements.",
)
agent.start("Review this agent module for compliance gaps")
```

The user opens a pull request; CI runs Asqav to scan PraisonAI imports for governance patterns before merge.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
graph LR
    U[Input] --> A[Agent]
    A --> T[Tool]
    T --> O[Output]

    classDef agent fill:#8B0000,color:#fff
    classDef tool fill:#189AB4,color:#fff

    class A agent
    class U,O tool
    class T tool
```

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
sequenceDiagram
    participant User
    participant Agent
    participant Feature as Asqav Compliance Scanner

    User->>Agent: Request
    Agent->>Feature: Process request
    Feature-->>Agent: Result
    Agent-->>User: Response
```

# Asqav Compliance Scanner

[Asqav Compliance](https://github.com/jagmarques/asqav-compliance) is a GitHub Action that scans Python files importing agent frameworks (including PraisonAI) and checks for five governance patterns on every PR.

## Quick Start

**1. Add the workflow file**

Create `.github/workflows/governance.yml` in your repo:

```yaml theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
name: Governance Check
on: [pull_request]
permissions:
  pull-requests: write
  contents: read
jobs:
  scan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: jagmarques/asqav-compliance@v1
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
```

**2. Open a pull request**

The scanner runs automatically on every PR and posts a compliance score as a PR comment.

## What it checks

* **Audit Trail** - logging, signed actions, audit records
* **Policy Enforcement** - rate limits, scopes, permissions, guards
* **Revocation Capability** - kill switches, suspend, terminate, circuit breakers
* **Human Oversight** - approval flows, human-in-the-loop, confirmation gates
* **Error Handling** - try/except blocks around agent operations

## Setup

Add this to `.github/workflows/governance.yml` in your repo:

```yaml theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
name: Governance Check
on: [pull_request]
permissions:
  pull-requests: write
  contents: read
jobs:
  scan:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: jagmarques/asqav-compliance@v1
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
```

The action scans all Python files that import PraisonAI, LangChain, CrewAI, AutoGen, and other agent frameworks. It posts a compliance report as a PR comment with a score from 0 to 100.

## Configuration

| Input | Default | Description |
| - | - | - |
| `github-token` | required | GitHub token for posting PR comments |
| `scan-path` | `.` | Directory to scan |
| `fail-on-gaps` | `false` | Fail the CI check if governance gaps are found |

## Example output

The action posts a Markdown report on each PR showing which files have governance coverage and which have gaps. Files importing agent frameworks without audit trails or error handling are flagged.

## Links

* [GitHub Marketplace](https://github.com/marketplace/actions/ai-agent-governance-scanner)
* [Source Code](https://github.com/jagmarques/asqav-compliance)

## Best Practices

> [accordion] Enable fail-on-gaps in production
>
> Set `fail-on-gaps: true` for production repos so governance gaps block merges rather than just warning.

> [accordion] Add error handling to every agent
>
> Wrap `agent.start()` calls in try/except blocks to satisfy the Error Handling governance check.

> [accordion] Log agent actions
>
> Use Python logging around agent operations to satisfy the Audit Trail check.

> [accordion] Review PR comments regularly
>
> Asqav posts a compliance score on every PR - include it in your code review checklist.

## Related

> [card] [Custom Tools](https://praison.ai/docs/tools/custom.md)
>
> Build your own agent tools

> [card] [Tools Overview](https://praison.ai/docs/tools/tools.md)
>
> Browse PraisonAI tool documentation


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