К основному содержанию
скилл CX Codex

adk-evals — скилл для Claude Code: что делает и как установить

Справочник по написанию и запуску диалоговых тестов для агентов Botpress ADK. Помогает проверять ответы бота, вызовы инструментов и состояние без моков.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add botpress/skills --skill adk-evals -a claude-code
Открыть на GitHub

Что делает adk-evals

Скилл даёт справочник по созданию и запуску автотестов (evals) для диалоговых агентов на базе Botpress ADK. Внутри собраны правила описания тестовых сценариев на TypeScript через пакет @botpress/evals, категории проверок и параметры интерфейса adk evals.

Сценарии проверяют реплики бота, вызовы инструментов, мутации состояния и запуск воркфлоу. Тесты выполняются против работающего локального процесса через команду adk dev. За счёт этого проверяется весь стек агента без использования моков.

Каждый шаг сценария обязан содержать поле user или event. Передать только флаг expectSilence: true нельзя, такой тест упадёт при валидации. Проверку итогового состояния диалога скилл рекомендует выносить в блок outcome.

Какие задачи решает

  • написать сценарий тестирования диалога для бота ADK
  • проверить вызов инструмента и извлечение аргументов
  • протестировать сохранение состояния и запуск воркфлоу
  • настроить прогон тестов в CI через команду adk evals --format json

Примеры запросов агенту

  • Напиши тест для проверки вызова инструмента createTicket с приоритетом high
  • Как проверить в eval, что агент молчит после события payment.failed?
  • Покажи команду для запуска только регрессионных тестов в adk

Как установить adk-evals

1Через Skills CLI (Vercel)

npx skills add botpress/skills --skill adk-evals -a claude-code

2Вручную: положить файлы

~/.claude/skills/adk-evals/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/adk-evals/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о adk-evals

Как установить adk-evals в Claude Code?

Выполните команду npx skills add botpress/skills --skill adk-evals -a claude-code. Файл навыка сохранится в ~/.claude/skills/adk-evals/SKILL.md.

Что проверяет скилл adk-evals?

Он помогает составить автотесты для Botpress ADK, которые отслеживают текст реплик, вызовы внешних инструментов, изменения стейта и завершение воркфлоу.

Работают ли тесты adk на моках?

Нет, тесты запускаются прямо против работающего инстанса через adk dev. Это гарантирует сквозную проверку реальной логики бота.

Исходный текст

SKILL.md · MIT
---
name: adk-evals
description: Complete reference for writing, running, and iterating on evals (automated conversation tests) for ADK agents. Covers eval file format, all assertion types, CLI usage, and per-primitive testing patterns.
license: MIT
---

# ADK Evals Skill

## What are Evals?

Evals are automated conversation tests for ADK agents. Each eval defines a scenario — a sequence of user messages or events — and asserts on what the bot should do: what it says, which tools it calls, how state changes, which workflows run, and more.

Evals run against a live dev bot (`adk dev`), so they test the full stack — not mocks.

## When to Use This Skill

Use this skill when the developer asks about:

- **Writing evals** — file format, assertions, turn types, setup
- **Running evals** — CLI commands, filtering, output interpretation
- **Testing specific primitives** — how to test actions, tools, workflows, conversations, state
- **The testing loop** — write → run → inspect traces → iterate
- **CI integration** — exit codes, `--format json` flag, tagging strategies
- **Eval configuration** — idleTimeout, judgePassThreshold, judgeModel

Or when you are developing an ADK bot and need to write the equivalent of unit/end-to-end tests.

**Trigger questions:**

- "How do I write an eval?"
- "How do I test my workflow?"
- "How do I assert that a tool was called with specific params?"
- "My eval is failing, how do I debug it?"
- "How do I test that the bot stays silent?"
- "How do I run evals in CI?"
- "How do I seed state before an eval?"
- "How do I trigger a workflow in an eval?"

## Available Documentation

| File                             | Contents                                                                                                      |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| `references/eval-format.md`      | Complete file format — all fields, turn types, assertion categories, match operators, setup, outcome, options |
| `references/testing-workflow.md` | Running evals, interpreting output, using traces, the write → test → iterate loop, CI integration             |
| `references/test-patterns.md`    | Per-primitive patterns for actions, tools, workflows, conversations, and state                                |

## How to Answer

1. **Writing an eval** → Read `eval-format.md` for structure and assertions
2. **Running evals** → Read `testing-workflow.md` for CLI commands and output
3. **Testing a specific primitive** → Read `test-patterns.md` for the relevant section
4. **Debugging a failure** → Combine `testing-workflow.md` (inspect traces) + `eval-format.md` (check assertion syntax)

---

## Quick Reference

### Eval file structure

```typescript
import { Eval } from '@botpress/evals'

export default new Eval({
  name: 'greeting',
  type: 'regression',
  tags: ['basic'],

  setup: {
    state: { bot: { welcomeSent: false } },
    workflow: { trigger: 'onboarding', input: { userId: 'test-1' } },
  },

  conversation: [
    {
      user: 'Hi!',
      assert: {
        response: [{ not_contains: 'error' }, { llm_judge: 'Response is friendly and offers to help' }],
        tools: [{ not_called: 'createTicket' }],
        state: [{ path: 'conversation.greeted', equals: true }],
      },
    },
  ],

  outcome: {
    state: [{ path: 'conversation.greeted', equals: true }],
  },

  options: {
    idleTimeout: 60000,
    judgePassThreshold: 4,
  },
})
```

### Turn types

| Turn                  | When to use                                    |
| --------------------- | ---------------------------------------------- |
| `user: 'message'`     | Standard user message                          |
| `event: { payload }`  | Push a custom event (arrives as `chat:custom`) |
| `expectSilence: true` | Assert bot does NOT respond                    |

### Assertion categories

| Category   | What it checks                                              |
| ---------- | ----------------------------------------------------------- |
| `response` | Bot reply text (contains, not_contains, matches, llm_judge) |
| `tools`    | Tool calls (called, not_called, call_order, params)         |
| `state`    | Bot/user/conversation state (equals, changed)               |
| `workflow` | Workflow execution (entered, completed)                     |
| `timing`   | Response time in ms (lte, gte)                              |

### CLI commands

```bash
adk evals                        # run all evals
adk evals <name>                 # run one eval
adk evals --tag <tag>            # filter by tag
adk evals --type regression      # filter by type
adk evals --verbose              # show all assertions
adk evals --format json          # JSON output for CI

adk evals runs                   # list recent runs
adk evals runs --latest          # most recent run
adk evals runs --latest -v       # with full details
```

---

## Critical Patterns

✅ **Every turn needs `user` or `event`**

```typescript
// CORRECT
{ user: 'hello', expectSilence: true }
{ event: { payload: { kind: 'payment.failed' } }, expectSilence: true }
```

❌ **`expectSilence` alone is not a valid turn**

```typescript
// WRONG — missing user or event
{
  expectSilence: true
}
```

---

✅ **Assert tool params to verify correct extraction**

```typescript
// CORRECT — verifies the LLM extracted the right values
{ called: 'createTicket', params: { priority: { equals: 'high' } } }
```

❌ **Only asserting the tool was called**

```typescript
// INCOMPLETE — doesn't verify params were correct
{
  called: 'createTicket'
}
```

---

✅ **Use `outcome` for post-conversation state and workflow assertions**

```typescript
// CORRECT — final state checked once after all turns
outcome: {
  state: [{ path: 'conversation.resolved', equals: true }],
  workflow: [{ name: 'ticketFlow', completed: true }],
}
```

---

✅ **Seed state to test conditional behavior without running setup turns**

```typescript
// CORRECT — start in a known state
setup: {
  state: {
    user: { plan: 'pro' },
    conversation: { phase: 'support' },
  },
}
```

❌ **Using conversation turns to set up state (slow and fragile)**

```typescript
// WRONG — depends on the bot correctly processing setup turns
conversation: [
  { user: 'I am on the pro plan' }, // hoping bot sets user.plan
  { user: 'I need help with billing' }, // actual test turn
]
```

---

## Example Questions

**Writing evals:**

- "Write an eval that tests my createTicket tool is called with the right priority"
- "How do I assert that the bot stays silent after an internal event?"
- "How do I test a multi-turn conversation where context is retained?"

**Running evals:**

- "How do I run only regression evals?"
- "How do I see which assertions failed and why?"
- "How do I integrate evals into GitHub Actions?"

**Debugging:**

- "My eval says the tool wasn't called but I think it was — how do I check?"
- "How do I inspect what the bot actually did during an eval?"

**Per-primitive:**

- "How do I test a workflow that uses step.sleep()?"
- "How do I test that state changed from the seeded value?"

---

## Response Format

**Match depth to the question.**

### Simple questions ("what assertions are available?", "how do I run evals?")

Answer directly — show the relevant table or CLI command. Don't generate a full eval file for an informational question.

### Writing an eval

1. Show the complete `new Eval({})` call with realistic field values
2. Include imports (`import { Eval } from '@botpress/evals'`)
3. Briefly explain non-obvious assertions — skip if the assertion is self-explanatory
4. Suggest the CLI command to run it: `adk evals <name>`

### Debugging a failing eval

1. Ask for or show the failing assertion (`expected` / `actual` diff)
2. Suggest opening traces in the Dev Console to see what the bot did
3. Identify whether the issue is in the eval assertion or the bot's behavior

© botpress · MIT · botpress/skills

Похожие скиллы

Все скиллы по теме «Тесты и QA» →
improve-codebase-architecture Matt Pocock Скилл ищет архитектурные узкие места в кодовой базе и показывает варианты углубления модулей в HTML-отчёте. Подойдёт для ревью перед рефакторингом. 1 163 035установок design-taste-frontend Leonxlnx Скилл задаёт арт-дирекцию для публичных страниц и рабочих экранов, а затем проверяет результат в браузере по скриншотам. Нужен, когда интерфейс выглядит шаблонным или недоработанным. CX Codex +1 678 700установок tdd Matt Pocock Скилл управляет циклом красный-зелёный в TDD: проверяет, что тесты пишутся до кода, держит их на уровне публичных интерфейсов и не завязывает на внутреннюю структуру. 1 141 062установок skill-creator официальный anthropics Помогает создать новый скилл, доработать существующий и проверить результат через тестовые промпты и оценки. 414 180установок agent-browser vercel-labs Скилл управляет браузером через CLI: открывает страницы, заполняет формы, нажимает кнопки и проверяет веб-приложения. Подходит для задач, где агенту нужно действовать в интерфейсе. CX Codex +1 1 200 000установок prototype Matt Pocock Создаёт временный прототип, чтобы проверить логику, модель состояния или вид интерфейса до работы над основным кодом. 986 201установок

Из того же набора6

Спонсоры проекта

Компании, которые помогают держать аналитику открытой