Framework-based AI agent testing with convention over configuration.
agent-qa/
├── packages/
│ ├── core/ # @agent-qa/core - Main framework
│ ├── cost-registry/ # @agent-qa/cost-registry - LLM pricing
│ └── traces-tempo/ # @agent-qa/traces-tempo - Tempo traces provider
├── examples/
│ └── demo-agent/ # Working example
├── docs/ # Documentation
└── .github/workflows/ # CI/CD
# Install dependencies
pnpm install
# Build all packages
pnpm build
# Run tests
pnpm test
# Type check
pnpm type-check
# Lint
pnpm lint@agent-qa/core
├── @agent-qa/cost-registry (required)
└── @agent-qa/traces-tempo (optional)
- Config files:
agentqa.config.ts - Environment variables:
$VARsyntax resolved at load time - Type-safe config via
defineConfig()
AgentAdapter: HTTP communication with AI agentDatabaseAdapter: Entity queries (Drizzle built-in, custom supported)VectorStoreAdapter: Vector store queries (Milvus built-in)TracesProvider: Trace collection for diagnostics (Tempo built-in, custom supported)
The traces system uses an adapter pattern allowing pluggable backends:
// Use built-in Tempo provider
import { createTempoProvider } from '@agent-qa/traces-tempo';
diagnostics: {
traces: {
provider: createTempoProvider({ url: 'http://localhost:3200' })
}
}
// Or implement your own
const myProvider: TracesProvider = {
name: 'langfuse',
async isReachable() { /* ... */ },
async getTraceByCorrelationId(id) { /* ... */ },
};Core types are in @agent-qa/core/traces:
TracesProvider- Interface for any tracing backendParsedTrace,ParsedSpan- Backend-agnostic trace typesTraceMetrics- Token/cost metrics from traces
- Suite:
scenarios/suite.yaml - Steps: chat, verify, wait, setup
- Assertions: tools, response, created, usage
globalSetup: Start infrastructure before testshooks.beforeEach/afterEach: Per-scenario setup/teardown
# Run specific package tests
pnpm --filter @agent-qa/core test
pnpm --filter @agent-qa/cost-registry test
pnpm --filter @agent-qa/traces-tempo test
# Run with coverage
pnpm --filter @agent-qa/core test:coverage- Add implementation in appropriate package
- Export from package index.ts
- Add tests in
src/__tests__/ - Update documentation in
docs/ - Add/update CLAUDE.md in the package
# Build all packages
pnpm build
# Publish (handled by CI on release)
pnpm -r publish