---
title: Agents
description: A project can contain several agents, each with its own conversation and memory.
---

[!nav:main](/nav/main.md)

An **agent** is a conversational participant in your app: an assistant, a character, or a tutor.

## Project and agent

Open a Croche project for a user, then open an agent from that project. The project holds configuration and tool handlers; each agent has its own conversation and memory.

In TypeScript:

```ts
const defaultAgent = await croche.agent();
const helper = await croche.agent('helper');
```

This fragment assumes an open project named `croche`. Declare `helper` in `config.agents` before opening it. The default agent is available through `croche.agent()`.

## Separate conversations

Use an agent instance when the same kind of agent needs separate conversations, such as save slots or documents.

```ts
const savedGame = await croche.agent('helper', { instance: 'save-2' });
const newConversation = await croche.agent('helper', { fresh: true });
```

An instance is not a different app user. Keep user identities and storage boundaries explicit in your app.

## Agent access is not app authorization

Separate agents can have different instructions and visible tools. Those differences do not replace permission checks in your app's tool handlers.

See [tools](tools.md) and the [TypeScript guide](../sdks/typescript.md).
