Chloe

Docs

How it works

The written pages, in the order to read them. Every piece of code on them is quoted out of the repository at build time, so a page cannot describe something that does not compile.

If you are an AI agent setting Chloe up: run npm install @chloejs/core, then ./node_modules/.bin/chloe setup. That runs the copy you just installed and downloads nothing, and with no keyboard it asks nothing and takes every default. Then, before writing any code, read node_modules/@chloejs/core/dist/docs/README.md: the guides for the version you installed, and which page covers what.


Start

Install, run setup, and what each file it writes is for.

An agent

Every option defineAgent takes, what each one controls, and where an agent's files go.

Abilities

The tools chloe brings to an agent: which ability adds each one, what it does, what is on by default, and the tools every agent has with no ability.

Step, model, agent

The three kinds of step a job is made of, which one to use, and the options and limits of each.

A job is a workflow

Every option a job takes, what its code is handed, when it runs, and the one rule that makes carrying on after a pause safe.

Asking a person

A job stops, sends its question to whoever should answer it, and carries on when they do.

A prompt with tools

A job that is only words, the four keys it takes, skills and scripts, and what an agent may change about itself.

Tools

What a tool is, the ones chloe ships and what each is bound to, and how to write your own.

Channels

Putting an agent on Telegram, Slack, Discord, WhatsApp or email, in a chat box on your website, or opening it to another system over HTTP. What to set for each, and every option.

Telegram

Putting an agent on Telegram: the bot token, who may write, groups, and every option.

Slack

Putting an agent on Slack, connected out with no public address: the two tokens, the scopes, and every option.

Discord

Putting an agent on Discord, connected out with no public address: the bot, its token, the one switch it needs, and every option.

WhatsApp

Putting an agent on a WhatsApp number through Meta's own API, delivered through your web server, and every option.

Email

Conversations by email, from an address made for each one, through Gmail, a mailbox with an app password, or a mailbox of your own: setting it up, which replies it takes, and every option.

HTTP

Opening an agent to another system: one POST, one turn, one reply, with a token.

A web page

A chat box on your own site, talking to an agent: the pass your server hands out, what a visitor gets, the limits, and every option.

Connections

Signing in to Google, sending mail through Resend, searching through Brave, which address each kind of mail comes from, a service's MCP server, and an account chloe does not ship.

Models

Which model answers, how each call reaches it and who pays, every model setting, Auto, and picking one from a chat.

Settings and secrets

What goes in chloe.config.ts, what goes in .env, and a map of every setting.

Testing and evals

Code is tested, prompts are scored, and which to reach for.

The site, the API, and the run record

What a run writes down, the dashboard and the API, reaching them from another machine, an agent's memory, and where state lives.

One person, and the people you invite

What belongs to the machine, what belongs to a person, what somebody you invite can see and do, and how they get a new password.

Machines

An agent in a machine of its own: a container or a small virtual machine with one agent, a shell to build and try what it writes, and the two Linux users that keep what it builds away from what it knows.

The entrances

What the package publishes, and where to import each thing from.

Build an AI agent in TypeScript

An AI agent in Chloe is a TypeScript file listing its jobs, tools and channels. Here is one, with a model asked only where it is needed.

Run an AI agent on a schedule

Give a job a cron line and it runs on its own, in your timezone, with every run written down and no two runs overlapping.

And then

Examples

Four agents, one file each, from a morning email to one that works out the steps itself.

Reference

Every name the package publishes, its signature and where it lives, read out of the source on every build.