Home/Tools/@tpmjs/tools-judge

judgeConversation

@tpmjs/tools-judge

Evaluate an AI conversation across 10 quality metrics. Use this tool frequently in agentic loops to verify the AI is making progress, staying on track, and actually completing what the user intended. Returns scores, reasoning, must-dos, and improvement suggestions for each metric.

Official
agent
v0.1.0
MIT

Interactive Playground

Test @tpmjs/tools-judge (judgeConversation) with AI-powered execution

0/2000 characters

Installation & Usage

Install this tool and use it with the AI SDK

1. Install the package

npm install @tpmjs/tools-judge
pnpm add @tpmjs/tools-judge
yarn add @tpmjs/tools-judge
bun add @tpmjs/tools-judge
deno add npm:@tpmjs/tools-judge

2. Import the tool

import { judgeConversation } from '@tpmjs/tools-judge';

3. Use with AI SDK

import { generateText } from 'ai';
import { openai } from '@ai-sdk/openai';
import { judgeConversation } from '@tpmjs/tools-judge';

const result = await generateText({
  model: openai('gpt-4o'),
  tools: { judgeConversation },
  prompt: 'Your prompt here...',
});

console.log(result.text);

Signature

(messages: { role: string; content: string; toolCalls: { args: Record<string, unknown>; toolName: string }[]; toolResults: { result: {  }; toolName: string }[] }[], context?: string, strictMode?: boolean, originalUserRequest?: string) => Promise<unknown>

Tags

across
agent
agentic
ai
conversation
evaluate
evaluation
frequently
judge
loops
making
metrics
quality
tpmjs
verify

Parameters

Available configuration options

Auto-extracted
messages
Required
Type: array

Array of AI SDK messages to evaluate. Each message should have role and content.

originalUserRequest
Optional
Type: string

Optional: The original user request if different from first message

context
Optional
Type: string

Optional: Additional context about what the conversation should accomplish

strictMode
Optional
Type: boolean

Optional: If true, requires higher scores to pass (default: false)

Schema extracted: 3/3/2026, 4:21:33 AM

README

ERROR: No README data found!

Statistics

Downloads/month

4

GitHub Stars

19

Quality Score

79%

Bundle Size

NPM Keywords

tpmjs
judge
ai
evaluation
quality
metrics
agent
conversation

Maintainers

thomasdavis(thomasalwyndavis@gmail.com)

Frameworks

vercel-ai