> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Binary Agent as Judge

> Binary pass/fail evaluation without numeric scoring

Use binary mode to get a PASS/FAIL verdict without numeric scoring.

**1. Add the following code to your Python file**

```python agent_as_judge_binary.py theme={null}
from agno.agent import Agent
from agno.db.sqlite import SqliteDb
from agno.eval.agent_as_judge import AgentAsJudgeEval
from agno.models.openai import OpenAIResponses

# Setup database to persist eval results
db = SqliteDb(db_file="tmp/agent_as_judge_binary.db")

agent = Agent(
    model=OpenAIResponses(id="gpt-5.2"),
    instructions="You are a customer service agent. Respond professionally.",
    db=db,
)

response = agent.run("I need help with my account")

evaluation = AgentAsJudgeEval(
    name="Professional Tone Check",
    criteria="Response must maintain professional tone without informal language or slang",
    db=db,
)

result = evaluation.run(
    input="I need help with my account",
    output=str(response.content),
    print_results=True,
    print_summary=True,
)

print(f"Result: {'PASSED' if result.results[0].passed else 'FAILED'}")

```

<Snippet file="create-venv-step.mdx" />

**2. Install dependencies**

```bash theme={null}
uv pip install -U agno openai sqlalchemy
```

**3. Export your OpenAI API key**

```bash Mac/Linux theme={null}
  export OPENAI_API_KEY="your_openai_api_key_here"
```

```bash Windows theme={null}
  $Env:OPENAI_API_KEY="your_openai_api_key_here"
```

**4. Run the example**

```bash theme={null}
python agent_as_judge_binary.py
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.