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

# Recipes

> Practical integrations

# Recipes

## Protect an Agent Endpoint

```ts theme={null}
import express from 'express';
import { createTrustProxy } from '@agntor/trust-proxy';
import { TicketIssuer } from '@agntor/sdk';

const app = express();
app.use(express.json());

const issuer = new TicketIssuer({
  signingKey: process.env.AGNTOR_SECRET_KEY!,
  issuer: 'agntor.com',
});

app.use('/api/agent', createTrustProxy({ issuer }));
```

## Guard Inputs Before Execution

```ts theme={null}
import { guard } from '@agntor/sdk';

const policy = { injectionPatterns: [/system prompt/i] };
const result = await guard(input, policy);
if (result.classification === 'block') {
  throw new Error('Blocked input');
}
```
