CX Agent Studio
Customer Experience Agent Studio (CX Agent Studio) is a minimal code conversational agent builder built on the Agent Development Kit (ADK), representing the evolution of Dialogflow CX.
Core Capabilities
- - AI-Augmented Building: Generate agents using Gemini with a 1-2 sentence goal.
- Bi-directional Streaming: Ultra-low latency voice interactions.
- Asynchronous Tool Calling: Maintains natural conversation flow during backend calls.
Quick Actions
1. Generating an Agent with AI
To generate an agent automatically:
- - Provide a clear 1-2 sentence goal.
- Optionally provide up to 5 knowledge documents (under 8MB total) like FAQs or tool catalogs.
Note: Only works for the root agent and empty agents.
2. Architecture & Design
- - Agents: Root (steering) agents orchestrate tasks and delegate to sub-agents. Read
references/agents.md. - Flows: Integrate legacy Dialogflow CX flows for deterministic business logic (auth, sequential validation). Read
references/flows.md. - Variables: Store and retrieve runtime conversation data. Read
references/variables.md.
3. Writing Agent Instructions
Agent instructions guide the model's behavior, persona, and tool/agent usage.
- Variables:
{variable_name}
- Tools:
{@TOOL: tool_name}
- Sub-Agents:
{@AGENT: Agent Name}
- - For complex instructions or recommended XML formatting, read: INLINECODE6
- Best Practices: Start simple, use specific/structured instructions, flat parameter structures. Read
references/best-practices.md.
4. Tools & Callbacks
- - Tools: Connect your agent to external systems. Wrap complex APIs in Python tools to reduce context overhead. Read
references/tools.md. - Callbacks: Advanced Python hooks (
before_agent_callback, after_model_callback, etc.) to control execution, validate states, or inject custom JSON payloads. Read references/callbacks.md.
5. Guardrails & Safety
- - Guardrails: Protect against prompt attacks and enforce Responsible AI policies. Read
references/guardrails.md.
6. Agent Evaluation
Evaluation ensures agent performance via automated test cases.
- - Scenario Test Cases: AI-generated simulated user conversations based on a user goal.
- Golden Test Cases: Specific, ideal conversation paths for regression testing.
- For detailed evaluation metrics, personas, and test case creation, read: INLINECODE13
CX Agent Studio
客户体验代理工作室(CX Agent Studio)是一个基于代理开发工具包(ADK)构建的极简代码对话式代理构建器,代表了Dialogflow CX的演进方向。
核心能力
- - AI增强构建:使用Gemini通过1-2句话的目标即可生成代理。
- 双向流式传输:超低延迟的语音交互体验。
- 异步工具调用:在后端调用期间保持自然的对话流程。
快速操作指南
1. 使用AI生成代理
要自动生成代理:
- - 提供清晰的一两句目标描述。
- 可选提供最多5份知识文档(总大小不超过8MB),如常见问题解答或工具目录。
注意:仅适用于根代理和空代理。
2. 架构与设计
- - 代理:根(引导)代理负责编排任务并委派给子代理。详见references/agents.md。
- 流程:集成传统Dialogflow CX流程,用于确定性业务逻辑(身份验证、顺序验证)。详见references/flows.md。
- 变量:存储和检索运行时对话数据。详见references/variables.md。
3. 编写代理指令
代理指令用于引导模型的行为、角色设定以及工具/代理的使用方式。
- 变量:{变量名}
- 工具:{@TOOL: 工具名称}
- 子代理:{@AGENT: 代理名称}
- - 复杂指令或推荐的XML格式,详见:references/instructions.md
- 最佳实践:从简单开始,使用具体/结构化指令,扁平化参数结构。详见references/best-practices.md。
4. 工具与回调
- - 工具:将代理连接到外部系统。将复杂API封装在Python工具中,以减少上下文开销。详见references/tools.md。
- 回调:高级Python钩子(beforeagentcallback、aftermodelcallback等),用于控制执行流程、验证状态或注入自定义JSON负载。详见references/callbacks.md。
5. 护栏与安全
- - 护栏:防范提示攻击,并强制执行负责任AI政策。详见references/guardrails.md。
6. 代理评估
评估通过自动化测试用例确保代理性能。
- - 场景测试用例:基于用户目标由AI生成的模拟用户对话。
- 黄金测试用例:用于回归测试的特定理想对话路径。
- 关于详细评估指标、角色设定和测试用例创建,详见:references/evaluation.md