# How it works

{% hint style="info" %}
The bot can be used in several different ways.\
To experience the bot in its simplest form, you can use the [chat feature](#ai-chat).\
If you want to directly configure the bot to be active on your entire server, then see the [Characters](#characters) and [Behaviors](#behaviors) sections.
{% endhint %}

### AI Chat

> AI Chat is a simple way of creating chat threads with characters that you create yourself without using advanced features such as characters and behaviours.\
> You will be able to chat with a specific character but there will be no automatic interaction on the server.

{% hint style="info" %}
[**Here**](/fundamentals/ai-chat.md) is the information page on AI Chat creation
{% endhint %}

### Characters

> CharacterWeaver allows you to create characters with customizable and automatic behaviors. The first thing you'll do is create the characters you want to add.

{% hint style="info" %}
[**Here**](/fundamentals/getting-set-up/configure-a-character.md) is the information page on character creation
{% endhint %}

### Behaviors

> By default, a character has no behavior and **never** interacts on your server.

> CharacterWeaver allows you to create behaviors that are triggered automatically when certain events are called. For example, a message sent by a user or a new member who joins your server.

> It is possible to create several behaviors, each behavior is associated with a specific event. The list of available events can be found [**here**](/behavior/event-types.md).

> <mark style="color:yellow;">⚠️</mark> The name you give to a behavior is never visible and only serves as an identifier. The identifier will be used when you change it, so choose something short like "auto-response".

### Actions

> A behavior is firstly composed of actions. An action is triggered when a behavior is triggered (therefore depending on the type of event). The list of available action types can be found [**here**](/behavior/actions.md#list).

> An action is for example, sending a message. So if you have created a behavior with the [`MESSAGE`](/behavior/event-types.md#message) event type, and you configure an action that sends a message, it is possible to simulate a conversation.

> 💡 As with behaviors, the name you give to an action is never visible and only serves as an identifier.

{% hint style="info" %}
[**Here**](/fundamentals/getting-set-up/configure-a-behavior.md#adding-an-action-to-a-behavior) is the information page on action creation
{% endhint %}

> Once your behavior is created, you can add it to one or more characters with the command `/character behavior add <character_name> <behavior_name>`

### Filters

> By default, an event associated with a behavior is very general and it is intentional.\
> Typically, the [MESSAGE](/behavior/event-types.md#message) event is triggered when anyone sends a message in any channel on your server. This is **not always** what you want to do, which is why there is a way to “filter” these events.

> It is possible to add several filters to a behavior precisely to prevent it from being too general. It is possible, for example, to only trigger events (and therefore actions) if a message is sent in a certain [CHANNEL](/behavior/filters.md#channel). The list of available filters types can be found [**here**](/behavior/filters.md#list).

> 💡 As with behaviors or actions, the name you give to an filter is never visible and only serves as an identifier.

{% hint style="info" %}
[**Here**](/fundamentals/getting-set-up/configure-a-behavior.md#adding-a-filter-to-a-behavior) is the information page on filter creation
{% endhint %}

{% hint style="info" %}
To understand how placeholders work, refer to [**this**](/behavior/placeholders.md#how-it-works) page.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.characterweaver.com/overview/how-it-works.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
