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

# Introduction

> Cycls is the deep-stack AI SDK for Python. Runtime, interface, intelligence and state are composable primitives in one file, deployed with one command.

Write the agent, the container it runs in, the interface it serves and the
storage it keeps, in one Python file. Then ship it.

```python hello.py theme={null}
import cycls

llm = (
    cycls.LLM()
    .model("anthropic/claude-sonnet-4-6")
    .system("You are a helpful assistant.")
    .allowed_tools(["Bash", "Editor", "WebSearch"])
)


@cycls.agent(volumes={"/workspace": cycls.Volume("hello-chats")})
async def hello(context):
    async for ev in llm.run(context=context):
        yield ev
```

```bash theme={null}
cycls deploy hello.py
#   https://hello.cycls.ai
```

That deploy produces a chat interface, sign-in, per-user file storage, chat
history, share links, an OpenAI-compatible API endpoint and a sandboxed tool
loop. There is no Dockerfile, no YAML and no separate infrastructure repository.

![A Cycls agent streaming a markdown table and a Python code block in the chat interface](https://mintcdn.com/cycls/Vjgw_hSP7-Pr95Zb/img/chat-ui.png?fit=max\&auto=format\&n=Vjgw_hSP7-Pr95Zb\&q=85\&s=70bf54900d7aeb37599c9fbe1c982336)

Every agent ships with this interface. Text, tables, code, files and tool steps stream as the model produces them.

## The four layers

| Layer | Primitive | What you declare |
| - | - | - |
| Runtime | [`cycls.Image`](https://docs.cycls.com/build/images) | pip packages, system packages, bundled files, build commands |
| Interface | [`cycls.Web`](https://docs.cycls.com/web/interface) | branding, auth, themes, analytics, workspaces |
| Intelligence | [`cycls.LLM`](https://docs.cycls.com/agents/models) | model, system prompt, tools, budgets, reasoning |
| State | [`cycls.Volume`](https://docs.cycls.com/build/volumes) | named persistent storage, attached by mount path |

Each primitive is an immutable builder, so every method returns a new object and
one base configuration can be branched without side effects.

## Three decorators

Decorators accept exactly the primitives they need. Each one extends the layer
below it, so anything a function can do, an app can do, and anything an app can
do, an agent can do.

```
@cycls.agent      chat product, managed LLM loop, web UI
  extends
@cycls.app        blocking ASGI service, auth, per-user storage
  extends
@cycls.function   containerized Python, volumes, schedules
```

> [card] [Function](https://docs.cycls.com/build/functions.md)
>
> Run Python in a container locally, in the cloud, or on a schedule. Freeze it
> as a named endpoint anyone with your key can call.

> [card] [App](https://docs.cycls.com/build/apps.md)
>
> Return a FastAPI application and get a URL, sign-in and per-user storage.

> [card] [Agent](https://docs.cycls.com/agents/overview.md)
>
> A chat product with a managed model loop, tools, memory, files and a web
> interface.

## What an agent includes

> [card] Interface
>
> Streaming chat in light and dark, English and Arabic, a file canvas, voice
> input, share links and generated social previews.

> [card] Managed loop
>
> Tool calling, retries, context compaction, cost accounting, and background
> runs that survive a dropped connection.

> [card] Tools
>
> Sandboxed bash, file editing, web search, a real browser, a key-value store,
> a canvas, app building, and your own Python handlers.

> [card] State
>
> Per-user files and chats on a volume you own, team workspaces, trash and
> restore, and shareable conversations.

> [card] Identity
>
> Clerk out of the box or any OIDC provider. Organizations, roles, plans and
> feature flags arrive as `context.user`.

> [card] Connectors
>
> OAuth and API-key grants a user makes once, with per-tool approvals, an audit
> trail, and remote MCP servers on any provider.

## Model support

One builder covers Anthropic natively and every OpenAI-compatible endpoint
through a base URL.

```python theme={null}
cycls.LLM().model("anthropic/claude-sonnet-4-6")
cycls.LLM().model("openai/gpt-5.4")
cycls.LLM().model("groq/llama-3.3-70b").base_url("https://api.groq.com/openai/v1")
cycls.LLM().model("local/qwen3").base_url("http://localhost:8000/v1")
```

Reasoning control, tool calls and streaming are unified across providers. See
[Models](https://docs.cycls.com/agents/models.md).

## Start here

> [card] [Quickstart](https://docs.cycls.com/get-started/quickstart.md)
>
> Install, run locally, deploy. About five minutes.

> [card] [Core concepts](https://docs.cycls.com/get-started/concepts.md)
>
> Layers, builders, and the difference between run, remote and deploy.

> [card] [Build your first agent](https://docs.cycls.com/guides/first-agent.md)
>
> A guided build with tools, branding and a quota check.

> [card] [CLI reference](https://docs.cycls.com/ship/cli.md)
>
> Every command, flag and default.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.