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

# Introduction

> Add AI agent capabilities to your applications — embed a chat widget or execute tasks programmatically

# Sigmic AI Developer Docs

Sigmic AI lets you use and integrate AI agents into your applications. There are three ways to get started:

* **Chat UI** — use AI agents directly through a hosted web interface, no code required
* **Embeddable Widget** — drop a chat UI into any website with two script tags
* **Task API** — execute tasks programmatically with full streaming, file upload, and multi-turn support

All paths run on isolated cloud sandboxes with per-project configuration, MCP server support, and environment variable injection.

## Integration Paths

<CardGroup cols={2}>
  <Card title="Chat UI" icon="comments" href="/chat-ui/overview">
    Use AI agents through a hosted web interface — no code required. Every session runs on a full remote computer.
  </Card>

  <Card title="Embeddable Widget" icon="browser" href="/widget">
    Add AI chat to any website. Your backend exchanges credentials for a JWT, the browser handles the rest.
  </Card>

  <Card title="Task API" icon="code" href="/tasks/create">
    Programmatic task execution with streaming responses, file uploads, follow-ups, and artifact retrieval.
  </Card>

  <Card title="Console" icon="sliders" href="/console">
    Manage projects, API keys, widget apps, and MCP server configurations through a visual interface.
  </Card>
</CardGroup>

## Key Features

### Sandbox Isolation

Every task and widget conversation runs in an isolated cloud sandbox:

* **Process isolation** — each execution has its own environment
* **Filesystem isolation** — users cannot access files from other sessions
* **Environment injection** — pass `env` and `secrets` per request, available as `process.env` in the sandbox

### Fire-and-Forget Execution

POST endpoints return JSON immediately. Execution runs in the background:

* **`POST /tasks`** returns `{ id, status }` instantly
* **`GET /tasks/:id/stream`** delivers history + live events via SSE
* Disconnect and reconnect anytime — tasks keep running

### Unified SSE Stream

The stream endpoint provides everything you need to build a chat UI:

* **History replay** — all past messages delivered on connect
* **Live events** — real-time content, tool calls, and status updates
* **Reconnectable** — full state replay on every connection
* **Heartbeat** — 15-second keepalive for connection stability

### File Upload & Artifacts

Upload files and retrieve generated outputs:

* Maximum 20 files per request, up to 50MB each
* ZIP files are automatically extracted
* List and download workspace artifacts via the artifacts API

### Session Auto-Restore

Expired sessions are automatically restored on follow-up messages:

* Continue conversations at any time
* No need to handle session expiry errors
* Full conversation history and workspace files are preserved

## Base URL

All API requests should be made to:

```
https://api.sigmic.ai
```

## Quick Example

```bash theme={null}
# 1. Create a task (returns JSON immediately)
RESPONSE=$(curl -s -X POST https://api.sigmic.ai/api/v1/tasks \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "message=What is the capital of France?")

# 2. Stream the execution
TASK_ID=$(echo $RESPONSE | jq -r '.data.id')
curl -N https://api.sigmic.ai/api/v1/tasks/$TASK_ID/stream \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Embed the Widget" icon="browser" href="/widget">
    Add AI chat to any website with a JWT and two script tags
  </Card>

  <Card title="Create a Task" icon="plus" href="/tasks/create">
    Start executing tasks with the API
  </Card>

  <Card title="Authentication" icon="key" href="/authentication">
    Learn how to authenticate your API requests
  </Card>

  <Card title="Streaming Events" icon="wave-pulse" href="/streaming">
    Understand the SSE event format
  </Card>
</CardGroup>
