Quick Start

Get a Programmable Agent running in three steps.

1

Create an Agent YAML

Commit this file at .dinoai/agents/data-quality-checker.yml in your repo:

name: data-quality-checker
version: 1

role: >
  dbt™ Data Quality Specialist focused on test coverage and documentation
  completeness across analytics models.

goal: >
  Ensure all dbt™ models have appropriate tests and are fully documented
  before promotion to production.

backstory: >
  You have deep knowledge of dbt™ best practices and data quality patterns.
  You are methodical and prefer to verify before acting.

tools:
  mode: allowlist
  list:
    - read_file
    - search_files_and_directories
    - ripgrep_search
    - run_sql_query
    - list_all_snowflake_databases
    - list_all_columns_in_snowflake_table
    - post_slack_message

slack:
  channel: "#data-quality-alerts"
2

Trigger a Run

cURL

curl -X POST $PARADIME_API_ENDPOINT \
  -H "X-API-KEY: $PARADIME_API_KEY" \
  -H "X-API-SECRET: $PARADIME_API_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "mutation Trigger($agent: String, $message: String) { triggerDinoaiAgentRun(agent: $agent, message: $message) { ok agentSessionId status } }",
    "variables": {"agent": "data-quality-checker", "message": "Focus on stg_orders"}
  }'

Python

import requests

url = f"$PARADIME_API_ENDPOINT"
headers = {
    "X-API-KEY": api_key,
    "X-API-SECRET": api_secret,
    "Content-Type": "application/json",
}

mutation = """
mutation Trigger($agent: String, $message: String) {
  triggerDinoaiAgentRun(agent: $agent, message: $message) {
    ok
    agentSessionId
    status
  }
}
"""

response = requests.post(url, headers=headers, json={
    "query": mutation,
    "variables": {"agent": "data-quality-checker", "message": "Focus on stg_orders"},
})
session_id = response.json()["data"]["triggerDinoaiAgentRun"]["agentSessionId"]

Response:

{
  "data": {
    "triggerDinoaiAgentRun": {
      "ok": true,
      "agentSessionId": "run_abc123",
      "status": "queued"
    }
  }
}
3

Poll for Results

curl -X POST https://api.paradime.io/api/v1/{company_token}/graphql \
  -H "X-API-KEY: $PARADIME_API_KEY" \
  -H "X-API-SECRET: $PARADIME_API_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "query Run($id: String!) { dinoaiAgentRun(agentSessionId: $id) { ok status messages { ts role content } childSessionIds } }",
    "variables": {"id": "run_abc123"}
  }'

status will progress through: QUEUEDRUNNINGCOMPLETED or FAILED


Next Steps

Last updated

Was this helpful?