# Overview

> What sideagent is and the two ways to run it: the open-source library or sideagent Cloud.

Source: https://sideagent.dev/docs

sideagent embeds a chat agent in your app. You give it an OpenAPI spec and an OpenAI-compatible LLM host and key. It gives you a secure agent endpoint and a React chat UI. The agent calls your API on behalf of the signed-in user, using that user's own credentials.

## Two ways to run it

- **sideagent** (open source, MIT): a TypeScript library you run in your own server. See [Server](https://sideagent.dev/docs/server.md) and [Chat UI](https://sideagent.dev/docs/chat-ui.md).
- **sideagent Cloud**: the same agent, hosted. You configure it in a dashboard and embed it with a publishable key. See [sideagent Cloud](https://sideagent.dev/docs/cloud.md).

## How a request flows

1. The browser sends a chat message to the agent endpoint, with the user's `Authorization` header.
2. The server verifies the user ([User authentication](https://sideagent.dev/docs/auth.md)) and loads the agent.
3. The model picks operations from your allowlist ([Operations](https://sideagent.dev/docs/operations.md)).
4. Calls that change data pause for the user's approval ([Approvals](https://sideagent.dev/docs/approvals.md)).
5. Allowed calls go to your API with the user's own credentials, and the result streams back to the chat.

## Where to go next

- New here: [Quickstart](https://sideagent.dev/docs/quickstart.md).
- Hosted setup, no server code: [sideagent Cloud](https://sideagent.dev/docs/cloud.md).
- What protects you and your users: [Security model](https://sideagent.dev/docs/security.md).
- Building your own client: [Wire protocol](https://sideagent.dev/docs/protocol.md).

## For LLMs and tools

Every page here is also available as Markdown: add `.md` to the page URL, for example `/docs/quickstart.md`. [`/llms.txt`](https://sideagent.dev/llms.txt) lists all pages. [`/llms-full.txt`](https://sideagent.dev/llms-full.txt) has the whole documentation in one file.
