# SegmentStream for coding agents

SegmentStream is an AI-native platform for building a company’s own software: a database with the company’s rules, apps, data and integrations, and a company agent that runs the routine work, in one repository the company owns. Coding agents such as Claude Code, Codex and Cursor build on it with the SegmentStream CLI. Every app starts ready for production: sign-in, roles checked on every record, credentials held by the platform and a history of every change.

## 1. Install the CLI

macOS and Linux:

```sh
curl -fsSL https://cloud.segmentstream.com/install.sh | sh
```

The CLI updates itself (`segmentstream update`). Run `segmentstream --help`, or `--help` on any command, for every option.

## 2. Sign in

Interactive: `segmentstream login` opens the browser; keep the process running until it finishes.

Non-interactive (CI, sandboxes, headless agents): ask the person to run `segmentstream api-key create --name coding-agent` and give you the key as `SEGMENTSTREAM_API_KEY`.

Check who you are with `segmentstream whoami`.

## 3. Choose the organization

```sh
segmentstream org list
# Replace org_YOUR_ID with an organization ID from the list.
segmentstream org use org_YOUR_ID
```

Every command also accepts `--organization <id>`.

## 4. Open or create a workspace

```sh
segmentstream workspace list
segmentstream workspace create acme --region eu --subdomain acme
segmentstream workspace WORKSPACE-ID clone acme && cd acme
```

The region (eu or us) is permanent.

## 5. Read the workspace's own instructions first

Every workspace repository has an AGENTS.md and skills under `.agents/skills/`. Read AGENTS.md before you write code: it has the layout, the platform rules and the commands you may run. `segmentstream sync` keeps them current with the installed CLI.

## 6. Build and deploy

```sh
git add -A && git commit -m "Describe the change"
segmentstream deploy
```

The deploy checks every part first; if it fails, production keeps serving the last good version.

## 7. Useful next steps

- Invite a member: `segmentstream ontology member invite ada@example.com --role sales`
- Connect an AI tool to the workspace's records over MCP: `segmentstream ontology mcp`
- Open the console in a browser without a sign-in form: `segmentstream auth browser` prints a single-use link valid for 60 seconds
- Start or follow a workflow: `segmentstream workflow --help`
- Read logs: `segmentstream logs`

## Reference

- Developers: https://cloud.segmentstream.com/developers
- CLI: https://cloud.segmentstream.com/developers/cli
- SDKs: https://cloud.segmentstream.com/developers/ontology-sdk, https://cloud.segmentstream.com/developers/app-sdk, https://cloud.segmentstream.com/developers/pipeline-sdk, https://cloud.segmentstream.com/developers/agent-sdk
- MCP and API: https://cloud.segmentstream.com/platform/mcp
- Site map for AI agents: https://cloud.segmentstream.com/llms.txt
