Skip to main content

gaas-crewai

GaaS (Governance as a Service) integration for CrewAI.

Every tool call is governed before it executes: the adapter submits a governance intent to GaaS, and only an APPROVE (or an approved escalation) lets the tool run. On BLOCK the wrapped tool never executes and GovernanceBlockedError is raised from the tool.

pip install gaas-crewai[crewai]

Quickstart

from crewai import Agent
from gaas_crewai import govern_tools, GaaSGovernanceConfig

config = GaaSGovernanceConfig(api_key="gsk_...", agent_id="my-crew-agent")

researcher = Agent(
    role="researcher",
    goal="Find and share accurate information",
    backstory="...",
    tools=govern_tools([search_tool, email_tool], config=config),
)

Works with hand-written BaseTool subclasses and @tool-decorated functions alike. Name, description, and args_schema are preserved — the agent sees an identical tool.

Verdict flow

tool call → GaaS intent → ┌─────────┐
                          │ APPROVE │ → tool executes
                          │ BLOCK   │ → GovernanceBlockedError; tool never runs
                          │ ESCALATE│ → raises by default; hold-and-poll optional
                          └─────────┘

Honest enforcement note: inside a running Crew, CrewAI's tool-usage loop catches tool exceptions and surfaces them to the agent as an error observation (it may retry). The blocked action still never executes — each retry submits a fresh intent that is re-blocked, and every attempt lands on the signed audit chain server-side. For hard-stop semantics, catch GovernanceBlockedError where you invoke the crew or use the GaaS deviation/auto-suspend controls.

Configuration

from gaas_crewai import GaaSGovernanceConfig

config = GaaSGovernanceConfig(
    api_url="https://api.gaas.is",    # GaaS API endpoint
    api_key="gsk_...",                # Your API key
    agent_id="my-crew-agent",         # Agent identifier (appears in audit trail)
    block_on_escalate=True,           # Raise GovernanceBlockedError on ESCALATE
    timeout_seconds=240.0,             # Covers a deliberated decision (30-60 s); fail open on timeout
    sensitivity="INTERNAL",           # Default sensitivity level for tool inputs
    raise_on_governance_error=False,  # Fail open if GaaS API is unreachable
    extra_regulatory_domains=["HIPAA"],   # Additional domains for all intents
    extra_data_categories=["PHI"],        # Additional data categories for all intents
    hold_on_escalate=False,           # Wait for the human decision on ESCALATE
    escalation_poll_seconds=5.0,      # Poll interval while holding
    escalation_max_wait_seconds=600.0,  # Give up (treat as timeout) after this
)

Hold-and-Poll on ESCALATE

With hold_on_escalate=True, an ESCALATE verdict no longer raises immediately. The tool call holds while GaaS routes the escalation to a human reviewer, polling until it is decided:

  • approve / modify — the tool executes.
  • deny — raises GovernanceBlockedError with verdict ESCALATE_DENY.
  • timeout — raises GovernanceBlockedError with verdict ESCALATE_TIMEOUT.

hold_on_escalate takes precedence over block_on_escalate. Transient polling errors are retried until the deadline.

Handling blocked calls

from gaas_crewai import GovernanceBlockedError

try:
    result = governed_tool.run(to="all-customers@list", subject="...")
except GovernanceBlockedError as err:
    print(err.verdict)                  # BLOCK / ESCALATE / ESCALATE_DENY / ESCALATE_TIMEOUT
    print(err.decision_id)              # audit reference
    print(err.blocking_policies)        # policy IDs that triggered the block
    print(err.governance_proof_token)   # GPT token ID for the legal audit trail

Release files for gaas-crewai 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gaas-crewai 0.1.2
File Size Uploaded
gaas_crewai-0.1.2.tar.gz 15.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gaas-crewai 0.1.2
File Interpreter ABI Platform
gaas_crewai-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 25.7 kB

Release files / gaas_crewai-0.1.2.tar.gz

Download URL gaas_crewai-0.1.2.tar.gz
Size 15.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c88f850d7d8feef0ee088c7680df5aa685f54d21a8c05f3c688d39304d59c8fa
BLAKE2b-256 checksum
How to use checksums
985c32e87a72748092976f88a164eae47e83c3e1536ac59718916bb7e77f9b40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release files / gaas_crewai-0.1.2-py3-none-any.whl

Download URL gaas_crewai-0.1.2-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
11fa2e54320b0b2eb5224bb83eff27ee3c8c085ef66745c4345f9252bc838bce
BLAKE2b-256 checksum
How to use checksums
1b39cb692ff15fdb784279ab520aaa4f8e4f4f75ab214581c643714017f1052a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page