Skip to content

API Reference

Welcome! This section is your complete reference for everything cxas_scrapi exposes. Whether you are writing a quick script or building a full automation pipeline, you'll find every class, method, and parameter documented here.

The library is organized into four main areas:

  • Core — the primary building blocks for interacting with CX Agent Studio resources (apps, agents, sessions, tools, and more).
  • Evals — evaluation runners for tools, simulations, callbacks, and guardrails.
  • Utils — helpers for loading eval files, linting agent repos, working with Secret Manager and Google Sheets, and processing changelogs.
  • Migration — visualization and dependency tools to help you understand and migrate Dialogflow CX (DFCX) agents to CX Agent Studio.

Class Hierarchy

Every core class ultimately inherits from Common, which takes care of authentication and shared GCP utilities for you.

CXAS SCRAPI Class Hierarchy

Class inheritance hierarchy — all core classes inherit from Common, which handles authentication.

All Classes at a Glance

Core

Class Description
Common Authentication base — all other classes inherit from this.
Apps List, create, update, delete, import, and export CXAS apps.
Agents Manage LLM, DFCX, and workflow agents within an app.
Sessions Send text or audio turns to a CXAS session and parse the response.
Tools Manage tool and toolset definitions; execute tools directly.
Guardrails Create and manage content safety guardrails.
Deployments Manage app deployments and deployment configurations.
Evaluations List, run, export, and manage golden and scenario evaluations.
Variables Manage app-level session variable definitions and defaults.
Versions Create and restore app version snapshots.
Changelogs Read the audit changelog for an app.
Callbacks Manage before/after model, agent, and tool Python callbacks.
ConversationHistory Browse and retrieve recorded conversation logs.
Insights CCAI Insights API operations including scorecard management.

Evals

Class Description
ToolEvals Run unit tests for individual tools from YAML test files.
SimulationEvals AI-driven end-to-end conversation simulations using Gemini.
CallbackEvals Run pytest-based tests for agent Python callbacks.
GuardrailEvals Test guardrail behavior and responses.

Utils

Class Description
EvalUtils Load, convert, and export evaluation YAML files.
Linter Rule-based lint engine for validating CXAS agent repos.
SecretManagerUtils Create and retrieve GCP Secret Manager secrets.
ChangelogUtils Helpers for parsing and formatting app changelogs.
GoogleSheetsUtils Read and write data to Google Sheets.

Migration

Classes Description
Migration Tools Visualize DFCX flows and playbooks; resolve dependencies for migration.