---
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://segmentstream.com/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

# segmentstream agent init

Add the starter agent and optionally connect a Telegram bot

## Usage

Command syntax

```
segmentstream agent init [OPTIONS] [DIRECTORY]
```

## Options

- `--channel [telegram|slack|whatsapp|discord|none]`

- `--token-env VAR`

  Read the bot token from VAR; never save it locally

- `--create-bot`

  Create the Telegram bot through SegmentStream instead of reading a token

- `--bot-name NAME`

  With --create-bot: the bot's suggested name (default: the workspace's name)

- `--bot-username USERNAME`

  With --create-bot: the bot's suggested username. Without an ending, a Telegram Premium account gets USERNAME_agent and others USERNAME_bot; defaults to one from the name

- `--no-wait`

  With --create-bot: print the bot link and finish; then run \`segmentstream telegram-bot wait REQUEST-ID\`

- `--yes`

  Approve the printed dependency bump plan

- `--no-bump`

  Keep SDK dependencies; print required versions

- `--api-url URL`

  SegmentStream control-plane origin

- `--organization ORG-ID`

  Organization for this command

- `--help`

  Show this message and exit.

[Read as Markdown ↗](https://segmentstream.com/docs/cli/agent/init.md)
