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

# Control who can call your agent

> Only your organization's members can call your agent until you name others. Let in services, other agents and forwarders in jaccard.toml, then deploy.

Jaccard checks every request that starts or continues a session before it reaches your agent. Members sign in as themselves, and your services sign in with a service credential.

## Give a service a credential

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
jaccard service create acme-web
```

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
created service acme-web in organization acme

client id      m2m-client-live-91c2…
client secret  …
token URL      https://…/v1/oauth2/token
subject        tenant:acme:service:m2m-client-live-91c2…
```

> [!WARNING]
>
> The client secret is shown only this once, and you can't see it again. Store it in your service's secret store. If you lose it, `jaccard service rotate acme-web` issues a new one.

Rotate or delete credentials with [`jaccard service`](/docs/reference/cli/service).

## Let services and other agents call

Add their subjects to `callers` in `jaccard.toml`, then deploy:

```toml jaccard.toml theme={"theme":{"light":"github-light","dark":"github-dark"}}
[access]
callers = ["tenant:acme:service:m2m-client-live-91c2…", "tenant:acme:agent:router"]
```

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
jaccard deploy
```

A service's subject is the one `jaccard service create` printed. Another agent's is `tenant:<organization id>:agent:<agent>`. The list takes effect from the next request after the deploy. Every deploy sends the whole list, so removing an entry removes that access. The full format is in the [`jaccard.toml` reference](/docs/reference/jaccard-toml).

## Let a service call on behalf of its users

Without this, the agent sees your service as the caller, so all its users share one caller's memory, approvals and connections. To have the agent see each user, trust the service to name them:

1. Add the service to `forwarders` as well as `callers`:

   ```toml jaccard.toml theme={"theme":{"light":"github-light","dark":"github-dark"}}
   [access]
   callers    = ["tenant:acme:service:m2m-client-live-91c2…"]
   forwarders = ["tenant:acme:service:m2m-client-live-91c2…"]
   ```

2. Accept forwarded users in `agent/channels/eve.ts`. `jaccardForwarders` needs `@jaccard-ai/eve-auth` 0.2.1 or later:

   ```ts agent/channels/eve.ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
   import { eveChannel } from "eve/channels/eve";
   import { localDev } from "eve/channels/auth";
   import { jaccardForwarders, jaccardOidc } from "@jaccard-ai/eve-auth";

   export default eveChannel({
     auth: [localDev(), jaccardOidc()],
     trustedForwarders: jaccardForwarders(),
   });
   ```

3. Run `jaccard deploy`.

The service then names the user on each message: see [Calls from your service](/docs/connect/your-service.md#call-on-behalf-of-your-users) or [Chat in your web app](/docs/connect/web-app.md#add-your-users).

## How the eve channel checks callers

`agent/channels/eve.ts` decides which requests the agent accepts:

```ts agent/channels/eve.ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
import { eveChannel } from "eve/channels/eve";
import { localDev } from "eve/channels/auth";
import { jaccardOidc } from "@jaccard-ai/eve-auth";

export default eveChannel({
  auth: [localDev(), jaccardOidc()],
});
```

`localDev()` lets requests in under `pnpm dev`, and `jaccardOidc()` lets in the callers the platform has already checked when deployed. eve's docs use `vercelOidc()` instead, which is for agents on Vercel and lets no one in on Jaccard. Keep `localDev()` first. The other way round, `pnpm dev` refuses every request with `Jaccard agent auth is not configured`, since `jaccardOidc()` only works on Jaccard. Without this file, the deployed agent refuses every session, even from your organization's members.


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