> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vijil.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Building Trusted Agents

> Integrate evaluation and protection into your development workflow, catch failures before they reach production.

> [!TIP]
>
> **TL;DR:** Vijil integrates into your development workflow via MCP (natural language), REST API, or the Python SDK (`vijil-sdk`). [Diamond](https://docs.vijil.ai/developer-guide/evaluate/overview.md) evaluates your [Agent](https://docs.vijil.ai/owner-guide/register-agents/what-is-an-agent.md) before deployment, while [Dome](https://docs.vijil.ai/developer-guide/protect/overview.md) protects it at runtime. A behavioral evaluation produces a [Trust Score](https://docs.vijil.ai/concepts/trust-score/introduction.md) (0–100) you can use as a deployment gate. A Red Team evaluation produces findings and a report on adaptive attacks.

## The Problem With Testing Agents

Traditional software testing catches bugs, but Agents also fail in ways that do not look like bugs. They hallucinate confidently, follow requests they should refuse, and behave differently under adversarial pressure than in demos. Your unit and integration tests can pass even when your Agent remains vulnerable in production.

This guide shows you how to catch those failures before deployment. You will learn to run behavioral evaluations against adversarial [Scenarios](https://docs.vijil.ai/concepts/evaluation-components/scenario.md), use Red Team evaluations for adaptive attacks, integrate trust gates into your CI/CD pipeline, and add runtime protection that blocks attacks your evaluations did not anticipate.

> [!NOTE]
>
> If you manage Agents through a web Console rather than code, see the [Agent Owner Guide](https://docs.vijil.ai/owner-guide/getting-started/introduction.md). This guide focuses on programmatic integration.

## What You Get From Vijil

Vijil provides two products that work together:

**[Diamond](https://docs.vijil.ai/developer-guide/evaluate/overview.md)** offers two evaluation types. Behavioral evaluations send adversarial [Probes](https://docs.vijil.ai/concepts/evaluation-components/probe.md) to your Agent and produce a Trust Score for Reliability, Security, and Safety. [Red Team evaluations](https://docs.vijil.ai/developer-guide/evaluate/running-evaluations.md#red-team-evidence) run adaptive waves of attacks and produce findings and a report.

**[Dome](https://docs.vijil.ai/developer-guide/protect/overview.md)** scans Agent inputs and outputs at runtime. Your application or framework integration can use the scan result to block or sanitize flagged content, while `secure_agent()` can apply configured [Trust Runtime controls](https://docs.vijil.ai/developer-guide/protect/trust-runtime.md).

## Integration Methods

Vijil exposes three interfaces. Choose the one that fits your workflow, or mix them:

### At a Glance

| Method | Best For | Requires |
| - | - | - |
| **MCP** | Interactive development, natural language evaluation | Claude Code + `vijil-mcp` |
| **REST API** | Custom integrations, non-Python environments | HTTP client + API key |
| **SDK** | Python apps, notebooks, programmatic pipelines | `vijil-sdk` package (Python 3.12+) |

> [card] [MCP](https://docs.vijil.ai/developer-guide/agentic/quickstart.md)
>
> **Natural language, no commands.** Connect Claude Code to your Console and run Agent Evaluations through conversation. Best for interactive development and exploration.

> [card] [REST API](https://docs.vijil.ai/developer-guide/agentic/quickstart.md)
>
> **HTTP requests.** Call the Console API directly from any language. Best for custom integrations, dashboards, and non-Python environments.

> [card] [SDK](https://docs.vijil.ai/developer-guide/sdk/setup.md)
>
> **Native Python.** Install `vijil-sdk` and run Evaluations from Python applications, notebooks, and pipelines.

> [!TIP]
>
> Building an Agent in Claude Code? The [Claude Code plugin](https://docs.vijil.ai/developer-guide/getting-started/claude-code-plugin.md) bundles the MCP server and adds `/vijil` commands that inspect, evaluate, and harden the Agent in your repository.

## Three Developer Workflows

Different roles use Vijil differently. This guide serves all three:

> [card] Build & Test
>
> **Individual Developer**
>
> You are building an Agent and want feedback on its trustworthiness. [Evaluate the Agent running on your workstation](https://docs.vijil.ai/developer-guide/evaluate/local-agent.md), inspect the findings, and iterate.

> [card] Automate & Gate
>
> **Platform Engineer**
>
> You are integrating Vijil into CI/CD. Use the [Python SDK](https://docs.vijil.ai/developer-guide/sdk/setup.md) to run Evaluations and apply Trust Score thresholds.

> [card] Protect & Audit
>
> **Security and Compliance**
>
> You need evidence that Agents meet security requirements. Trust Reports document what Diamond tested, and Dome provides runtime defense-in-depth.
>
> **Start here:**
>
> <ul>
>   <li>[Understand Results](https://docs.vijil.ai/developer-guide/evaluate/understanding-results.md)</li>
>   <li>[Protection Overview](https://docs.vijil.ai/developer-guide/protect/overview.md)</li>
> </ul>

## What Vijil Measures

Behavioral evaluations test Agents across three dimensions:

| Dimension | What It Measures | Example Failures |
| - | - | - |
| **[Reliability](https://docs.vijil.ai/concepts/trust-score/reliability.md)** | Does the Agent complete intended tasks accurately and consistently? | Hallucinations, task failures, inconsistent responses |
| **[Security](https://docs.vijil.ai/concepts/trust-score/security.md)** | Can the Agent resist adversarial manipulation? | Prompt injection, data exfiltration, jailbreaks |
| **[Safety](https://docs.vijil.ai/concepts/trust-score/safety.md)** | Does the Agent stay within acceptable boundaries? | Policy violations, harmful content, unauthorized actions |

Each behavioral evaluation produces a **Trust Score** with breakdowns by dimension. The Console displays scores on a 0–100 scale; the SDK returns them on a 0.0–1.0 scale. Use the score and [findings](https://docs.vijil.ai/developer-guide/evaluate/understanding-results.md) to identify weaknesses and decide whether the Agent meets your deployment threshold. Red Team evaluations produce evidence of attacks, vulnerabilities, and successful strategies in a report.

## Get Your First Trust Score

Start with [MCP](https://docs.vijil.ai/developer-guide/agentic/quickstart.md) to use natural-language requests from Claude Code. For custom or non-Python integrations, follow the [REST API path](https://docs.vijil.ai/developer-guide/agentic/quickstart.md). For Python code, install and configure the [SDK](https://docs.vijil.ai/developer-guide/sdk/setup.md). Then [run an Evaluation](https://docs.vijil.ai/developer-guide/evaluate/running-evaluations.md) and add [Dome protection](https://docs.vijil.ai/developer-guide/protect/overview.md) when you need runtime controls.

All three paths require access to a [Vijil Console gateway](https://docs.vijil.ai/developer-guide/deploy-vijil/deploy-vijil-console.md) and a registered [Agent](https://docs.vijil.ai/owner-guide/register-agents/what-is-an-agent.md) endpoint.

## Integration Points

Vijil integrates with the tools you already use:

| Framework | Integration |
| - | - |
| **[LangChain](https://docs.vijil.ai/developer-guide/protect/integrations/langchain.md)** | Add Dome Guardrails to chains with `GuardrailRunnable` |
| **[LangGraph](https://docs.vijil.ai/developer-guide/protect/integrations/langgraph.md)** | Scan graph inputs and outputs, or use `secure_agent()` for configured Trust Runtime controls |
| **[Google ADK](https://docs.vijil.ai/developer-guide/protect/integrations/adk.md)** | Add Dome model callbacks, or use `secure_agent()` for configured Trust Runtime controls |
| **[Custom Python](https://docs.vijil.ai/developer-guide/protect/using-guardrails.md)** | Call Dome before and after Agent execution and handle the scan results |
| **[CI/CD](https://docs.vijil.ai/developer-guide/getting-started/agent-lifecycle-workflow.md#gate-deployment-in-ci/cd)** | Run SDK Evaluations and apply a Trust Score gate before release |

For evaluation, expose your Agent through a [supported endpoint](https://docs.vijil.ai/developer-guide/evaluate/cloud-providers.md). If the Agent runs on your workstation, use the [local Agent workflow](https://docs.vijil.ai/developer-guide/evaluate/local-agent.md) to make it reachable through an authenticated tunnel.


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