> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# StateSet Cloud Overview

> Deploy serverless Actions and services — code, secrets, deployments, and logs, without managing infrastructure.

# StateSet Cloud

StateSet Cloud creates, manages, and deploys **serverless functions — called Actions — and
services**. You get a developer dashboard with code editing, deployment management, and
infrastructure integrations; the platform handles provisioning and scaling.

It's where an agent's tools live when you'd rather not run a server for them.

## The model

| Concept        | What it is                                                            |
| -------------- | --------------------------------------------------------------------- |
| **Action**     | A serverless function. Has its own runtime, npm packages, and secrets |
| **Service**    | A deployable unit, usually created from a template                    |
| **Template**   | A starting point for a new service                                    |
| **Deployment** | A running instance of a service, with logs and a lifecycle            |
| **Tracer**     | Progress of a long-running workflow                                   |

## Quickstart

```bash theme={null}
npm install -g @stateset/cli

# Store your API key (from the dashboard)
stateset cloud login --api-key $STATESET_API_KEY

# Confirm who you are
stateset cloud whoami
```

Then create and deploy a service from a template:

```bash theme={null}
stateset cloud templates list
stateset cloud services create --name my-service --template 12
stateset cloud services deploy 123
stateset cloud logs --service 123 --since 30m
```

## Project types

`stateset init` scaffolds a project of one of these shapes:

| Type        | For                                                  |
| ----------- | ---------------------------------------------------- |
| **Chatbot** | Conversational applications                          |
| **RAG**     | Retrieval-augmented generation over a knowledge base |
| **Agent**   | Autonomous agents with tool use                      |
| **API**     | AI-powered API services                              |
| **Custom**  | Start from scratch                                   |

**Runtimes:** Node.js (TypeScript), Python, Deno.
**AI providers:** OpenAI, Anthropic, or both.

## Local development

```bash theme={null}
stateset init          # scaffold
stateset dev           # run locally
stateset deploy        # ship it
stateset logs          # tail output
stateset list          # what's deployed
```

<Tip>
  Develop against `stateset dev` before deploying. It runs the same handler locally, so you're
  debugging your function rather than a deployment pipeline.
</Tip>

## Managing an Action

An Action carries its own dependencies and secrets:

```bash theme={null}
stateset cloud actions list
stateset cloud actions get 42

# npm packages
stateset cloud actions packages list 42
stateset cloud actions packages add 42 --name lodash --version 4.17.21
stateset cloud actions packages remove 42 --name lodash

# secrets — never commit these to the repo
stateset cloud actions secrets set 42 --data '{"OPENAI_API_KEY":"sk-..."}'
stateset cloud actions secrets get 42
```

<Warning>
  Action secrets are how a function reaches a provider API. Set them through the CLI or dashboard —
  an API key committed to your repository is a leaked key, and connecting source control means the
  platform can see that history.
</Warning>

## Deployments and logs

```bash theme={null}
stateset cloud deployments list --service 123
stateset cloud deployments terminate deployment-name
stateset cloud deployments delete deployment-name

stateset cloud logs --service 123 --search "error" --since 30m
```

`terminate` stops a running deployment; `delete` removes the record. Terminate first when you're
responding to a misbehaving deploy.

## What the platform handles

* **Automatic deployment and scaling** — infrastructure is provisioned and scaled to demand.
* **Integrated authentication** — the same auth system as the rest of the StateSet platform, so
  access is consistent across services.
* **Monitoring** — performance and usage metrics per service.
* **Consumption pricing** — functions run when called, so you pay for compute used rather than
  idle servers.

## Next

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/cloud-api-reference/authentication">
    Tokens, and connecting source control.
  </Card>

  <Card title="API keys" icon="lock" href="/cloud-api-reference/api-keys">
    Create, list, and revoke keys.
  </Card>

  <Card title="Deployments API" icon="rocket" href="/cloud-api-reference/deployments/list">
    The REST surface.
  </Card>

  <Card title="Projects API" icon="folder" href="/cloud-api-reference/projects/list">
    Manage projects programmatically.
  </Card>
</CardGroup>
