# Agents

> Custom assistants with instructions, a model, tools, connectors, knowledge scopes and starters; private until published to the organization or the public store, with installs, ratings and provider skills.

- Category: AI
- Module: `agents`
- Modes: `managed`
- Docs: https://bettersupabase.com/docs/blocks/agents
- Page: https://bettersupabase.com/blocks/agents

## Install

```bash
npx better-supabase add agents
```

The command also installs `updated-at`, `memberships`, `permissions`.

## Configure

Add the block to `better-supabase.config.ts`:

```ts
import { defineConfig } from "better-supabase/config";

export default defineConfig({
  blocks: {
    // Required by agents; add installs them too.
    "updated-at": {},
    memberships: {},
    permissions: {},
    // Modes: "managed". The default is "managed".
    agents: { mode: "managed" },
  },
});
```

## Client

The block has no React entry yet. Its server-side TypeScript is in `better-supabase/blocks/agents`.

## Events

- `agent.archived`
- `agent.created`
- `agent.installed`
- `agent.published`
- `agent.purged`
- `agent.restored`
- `agent.uninstalled`
- `agent.updated`

## Related blocks

Requires: [memberships](https://bettersupabase.com/blocks/memberships.md), [permissions](https://bettersupabase.com/blocks/permissions.md)

## Recipes

- [Agent activity](https://bettersupabase.com/recipes/agent-run-trace.md): The agent runs for the organization with their steps and the approvals that wait for a person.
