The core flow
Register an action in the dashboard
Install the Python SDK
Call DAAI before the risky function
DAAI returns allowed, pending approval, or blocked
Execute only when executable
Report execution result
Review the receipt
Developer docs
Add approval, policy checks, and audit receipts before risky AI-agent actions execute.
Understand the boundary first: DAAI decides whether your app may execute. Your app still owns the real business action.
DAAI Console is a Python-first governance layer for AI automations. It lets developers register risky actions, check those actions against policy, request human approval when needed, and record governance receipts.
DAAI is not the executor. Your app still performs the real business action. DAAI tells your app whether the action is allowed, blocked, or waiting for approval.
Use DAAI when an AI agent or automation is about to perform an action that affects customers, money, records, external communication, or business state.
Register an action in the dashboard
Install the Python SDK
Call DAAI before the risky function
DAAI returns allowed, pending approval, or blocked
Execute only when executable
Report execution result
Review the receipt
Create a workspace first.
The examples below use placeholders until your workspace and keys exist.
Run your first governed action with the Python SDK.
Install the current beta package in the Python environment that runs the automation.
pip install daai-pythonUse the API key, workspace key, and API base URL from your workspace setup page. The docs never display secret values.
export DAAI_API_KEY="your_api_key"
export DAAI_WORKSPACE_KEY="your_workspace_key"
export DAAI_BASE_URL="https://beta.api.daaihq.com"In the dashboard, register an action named send_invoice_reminder.
Put the SDK call before the risky function. If your action uses an amount policy, keep amount at the top level of the payload.
import os
from daai import DaaiClient
client = DaaiClient(
api_key=os.environ["DAAI_API_KEY"],
workspace_key=os.environ["DAAI_WORKSPACE_KEY"],
base_url=os.environ.get("DAAI_BASE_URL", "https://beta.api.daaihq.com"),
)
result = client.intercept(
action="send_invoice_reminder",
payload={
"actor": "finance_agent",
"invoice_id": "INV-1025",
"customer_name": "ABC Pty Ltd",
"customer_email": "accounts@example.com",
"amount": 1250,
"reasoning": "Invoice is overdue and no reply has been received.",
"source": {
"type": "finance_admin_agent",
"ref": "INV-1025",
},
},
idempotency_key="invoice-reminder:INV-1025",
)
print(result.governance_status)
print(result.executable)
print(result.governance_reason)
if result.executable:
print("Run the real action here.")
else:
print("Do not execute yet.")At the end of the quickstart, you should have:
The smallest mental model you need before integrating.
send_invoice_reminder or mark_invoice_paid.executable is true.A governed action moves through a short lifecycle.
Propose
Decide
Approve if needed
Execute locally
Report result
Receipt
Use the low-level client before risky execution, then report what happened after your app runs the real action.
pip install daai-pythonimport os
from daai import DaaiClient
client = DaaiClient(
api_key=os.environ["DAAI_API_KEY"],
workspace_key=os.environ["DAAI_WORKSPACE_KEY"],
base_url=os.environ.get("DAAI_BASE_URL", "https://beta.api.daaihq.com"),
)intercept before the risky function. DAAI returns the governance status and whether the app may execute now.status to check whether a pending action became executable after approval.status = client.status(action_run_id)
print(status.governance_status)
print(status.execution_status)
print(status.executable)client.report_executed(
action_run_id,
execution_result={
"result_summary": "Invoice reminder email sent successfully.",
},
)
client.report_failed(
action_run_id,
execution_error="SMTP provider rejected the message.",
)Some actions should not run immediately. DAAI creates a pending action run and sends an approval email to the configured approver.
executable=true.Policy allowed the action immediately.
DAAI sent or attempted to send an approval request.
A human approved the action. The app may execute if executable is true.
A human rejected the action. The app must not execute.
Policy blocked the action. The app must not execute.
The developer app has not reported execution.
The action can execute and DAAI is waiting for the app result.
The developer app reported successful execution.
The developer app reported execution failure.
For approval-based workflows, your app may need to store pending actions and run them after approval.
import os
from daai import DaaiClient
client = DaaiClient(
api_key=os.environ["DAAI_API_KEY"],
workspace_key=os.environ["DAAI_WORKSPACE_KEY"],
base_url=os.environ.get("DAAI_BASE_URL", "https://beta.api.daaihq.com"),
)
from daai import DaaiActionRunner, PendingActionManager, SQLitePendingStore
store = SQLitePendingStore("daai_pending.db")
manager = PendingActionManager(client=client, pending_store=store)
runner = DaaiActionRunner(client=client, pending_store=store)
def send_invoice_reminder_executor(payload):
print(f"Sending reminder for {payload['invoice_id']}")
return {"result_summary": "Invoice reminder sent successfully."}
runner.when_executable(
action="send_invoice_reminder",
run=send_invoice_reminder_executor,
)
runner.run_pending_once()ticket = manager.propose(
action="send_invoice_reminder",
payload={
"actor": "finance_agent",
"invoice_id": "INV-1025",
"customer_name": "ABC Pty Ltd",
"customer_email": "accounts@example.com",
"amount": 1250,
"reasoning": "Invoice is overdue.",
},
idempotency_key="invoice-reminder:INV-1025",
)
if ticket.executable:
send_invoice_reminder_executor(ticket.payload)DAAI creates receipts for final governance decisions such as allowed, blocked, approved, or rejected. Execution result can be attached later when the developer app reports success or failure.
These limits are enforced server-side during the beta to protect system reliability.
| Free beta includes | Limit |
|---|---|
| Client workspaces | 2 client workspaces |
| Registered actions | 3 registered actions per workspace |
| Audit records | 1,000 action-run audit records per month |
| Approval emails | 100 approval emails per month |
| SDK rate limits | Request limits that protect launch reliability |
If you hit a limit while testing a real workflow, contact us.
Most integration issues are setup mismatches, pending approvals, or payload shape problems.
Issue
pip install fails
Advice
Confirm you are using Python 3.9+ and try again in a fresh virtual environment.
Issue
Authentication failed
Advice
Check DAAI_API_KEY and DAAI_WORKSPACE_KEY. Make sure both come from the same workspace.
Issue
Unknown action blocked
Advice
Register the action name in the dashboard before calling intercept. The action string in code must exactly match the registered action name.
Issue
Action is pending approval
Advice
This is expected when policy requires approval. Do not execute the real action yet. Approve it from the email link or dashboard flow.
Issue
No approval email received
Advice
Check the approver email on the registered action. Check spam. Confirm the free beta approval email limit has not been reached.
Issue
Payload too large
Advice
Send only the fields needed for policy and review. Do not send full documents, large emails, or raw files in the action payload.