Developer docs

DAAI Console documentation

Add approval, policy checks, and audit receipts before risky AI-agent actions execute.

Overview

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.

The core flow

1

Register an action in the dashboard

2

Install the Python SDK

3

Call DAAI before the risky function

4

DAAI returns allowed, pending approval, or blocked

5

Execute only when executable

6

Report execution result

7

Review the receipt

Create a workspace first.

The examples below use placeholders until your workspace and keys exist.

Create workspace

Quickstart

Run your first governed action with the Python SDK.

1

Create a workspace

Create a client workspace from the dashboard. DAAI will generate the keys your app needs to call the API.
2

Install the SDK

Install the current beta package in the Python environment that runs the automation.

Shell
pip install daai-python
3

Set environment variables

Use the API key, workspace key, and API base URL from your workspace setup page. The docs never display secret values.

Environment
export DAAI_API_KEY="your_api_key"
export DAAI_WORKSPACE_KEY="your_workspace_key"
export DAAI_BASE_URL="https://beta.api.daaihq.com"
4

Register an action

In the dashboard, register an action named send_invoice_reminder.

  • Risk level: medium
  • Policy: always require approval or require approval above amount
  • Approver email: your test email
5

Call intercept before execution

Put the SDK call before the risky function. If your action uses an amount policy, keep amount at the top level of the payload.

Python
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.")
6

Check the dashboard

After running the script, open the workspace action runs page. You should see the proposed action with its governance status.
7

Approve or reject

If the policy requires approval, open the approval email and approve or reject the action. DAAI updates the action run and creates a governance receipt.
8

Expected result

At the end of the quickstart, you should have:

  • one registered action
  • one action run
  • one approval decision or allowed decision
  • one governance receipt

Core concepts

The smallest mental model you need before integrating.

Registered action

An action type configured in DAAI, such as send_invoice_reminder or mark_invoice_paid.

Action run

One proposed execution of a registered action.

Policy

The deterministic rule DAAI uses to decide whether to allow, block, or request approval.

Approval

A human decision collected through a secure approval link.

Executable

A boolean returned by DAAI. Your app should only execute the real action when executable is true.

Receipt

The audit record showing what was proposed, what DAAI decided, and what happened after execution was reported.

Visual flow

A governed action moves through a short lifecycle.

1

Propose

2

Decide

3

Approve if needed

4

Execute locally

5

Report result

6

Receipt

Python SDK

Use the low-level client before risky execution, then report what happened after your app runs the real action.

Install

Shell
pip install daai-python

Initialize client

Python
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"),
)

intercept()

Use intercept before the risky function. DAAI returns the governance status and whether the app may execute now.

status()

Use status to check whether a pending action became executable after approval.

report_executed()

Call after your app successfully executes the real business action.

report_failed()

Call if your app attempted execution but failed.
Check status
status = client.status(action_run_id)

print(status.governance_status)
print(status.execution_status)
print(status.executable)
Report execution
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.",
)

Approval flow

Some actions should not run immediately. DAAI creates a pending action run and sends an approval email to the configured approver.

Pending approval does not mean the action failed. It means your app should wait and avoid executing until DAAI returns executable=true.

Governance statuses

allowed

Policy allowed the action immediately.

pending_approval

DAAI sent or attempted to send an approval request.

approved

A human approved the action. The app may execute if executable is true.

rejected

A human rejected the action. The app must not execute.

blocked

Policy blocked the action. The app must not execute.

Execution statuses

not_executed

The developer app has not reported execution.

awaiting_execution_report

The action can execute and DAAI is waiting for the app result.

executed

The developer app reported successful execution.

failed

The developer app reported execution failure.

Run approved actions later

For approval-based workflows, your app may need to store pending actions and run them after approval.

Python runner
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()
Store pending action
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)

Governance receipts

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.

A receipt should answer

  • What action was proposed?
  • Who or what proposed it?
  • What policy applied?
  • Was approval required?
  • Was it allowed, approved, rejected, or blocked?
  • Did the connected app report execution?

Free beta limits

These limits are enforced server-side during the beta to protect system reliability.

Free beta includesLimit
Client workspaces2 client workspaces
Registered actions3 registered actions per workspace
Audit records1,000 action-run audit records per month
Approval emails100 approval emails per month
SDK rate limitsRequest limits that protect launch reliability

If you hit a limit while testing a real workflow, contact us.

Troubleshooting

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.