# Binary Agent as Judge (/evals/agent-as-judge/usage/agent-as-judge-binary)



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

<Steps>
  <Step title="Add the following code to your Python file">
    ```python title="agent_as_judge_binary.py"
    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'}")

    ```
  </Step>

    <Step title="Set up your virtual environment">
      <CodeBlockTabs defaultValue="Mac">
        <CodeBlockTabsList>
          <CodeBlockTabsTrigger value="Mac">
            Mac
          </CodeBlockTabsTrigger>

          <CodeBlockTabsTrigger value="Windows">
            Windows
          </CodeBlockTabsTrigger>
        </CodeBlockTabsList>

        <CodeBlockTab value="Mac">
          ```bash
          uv venv --python 3.12
          source .venv/bin/activate
          ```
        </CodeBlockTab>

        <CodeBlockTab value="Windows">
          ```bash
          uv venv --python 3.12
          .venv\Scripts\activate
          ```
        </CodeBlockTab>
      </CodeBlockTabs>
    </Step>

  <Step title="Install dependencies">
    ```bash
    uv pip install -U agno openai sqlalchemy
    ```
  </Step>

  <Step title="Export your OpenAI API key">
    <CodeBlockTabs defaultValue="Mac/Linux">
      <CodeBlockTabsList>
        <CodeBlockTabsTrigger value="Mac/Linux">
          Mac/Linux
        </CodeBlockTabsTrigger>

        <CodeBlockTabsTrigger value="Windows">
          Windows
        </CodeBlockTabsTrigger>
      </CodeBlockTabsList>

      <CodeBlockTab value="Mac/Linux">
        ```bash
          export OPENAI_API_KEY="your_openai_api_key_here"
        ```
      </CodeBlockTab>

      <CodeBlockTab value="Windows">
        ```bash
          $Env:OPENAI_API_KEY="your_openai_api_key_here"
        ```
      </CodeBlockTab>
    </CodeBlockTabs>
  </Step>

  <Step title="Run the example">
    ```bash
    python agent_as_judge_binary.py
    ```
  </Step>
</Steps>
