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

# Server Adapters CLI

> Command-line interface for running AI servers

Run Agent HTTP servers from the command line.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
graph LR
    User([User]) --> CLI[CLI]
    CLI --> Agent[Agent]
    Agent --> HTTP([HTTP Server])

    classDef agent fill:#8B0000,stroke:#7C90A0,color:#fff
    classDef tool fill:#189AB4,stroke:#7C90A0,color:#fff

    class Agent agent
    class CLI,HTTP tool
    classDef agent fill:#8B0000,color:#fff
    classDef tool fill:#189AB4,color:#fff
```

Run AI agent servers from the command line.

## Quick Start

<Steps>
  <Step title="Simple Usage">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    praisonai-ts server start --port 3000 --instructions "You are helpful"
    ```
  </Step>

  <Step title="With Configuration">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    praisonai-ts server start --framework express --port 3000 --streaming
    ```
  </Step>
</Steps>

***

## Commands

### Start Server

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
# Start HTTP server
praisonai-ts server start \
  --port 3000 \
  --instructions "You are a helpful assistant"

# With specific framework
praisonai-ts server start \
  --framework express \
  --port 3000

# With streaming
praisonai-ts server start \
  --streaming \
  --cors "*"
```

## Options

| Option           | Type    | Default  | Description                              |
| ---------------- | ------- | -------- | ---------------------------------------- |
| `--port`         | number  | `3000`   | Server port                              |
| `--framework`    | string  | `http`   | Framework (http, express, hono, fastify) |
| `--instructions` | string  | -        | Agent instructions                       |
| `--model`        | string  | `gpt-4o` | Model to use                             |
| `--streaming`    | boolean | `false`  | Enable streaming                         |
| `--cors`         | string  | -        | CORS origin                              |

## Examples

### Express Server

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai-ts server start \
  --framework express \
  --port 3000 \
  --instructions "You are a helpful API assistant" \
  --streaming
```

### With Tools

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai-ts server start \
  --port 3000 \
  --tools calculator,search \
  --streaming
```

## Environment Variables

| Variable         | Required | Description   |
| ---------------- | -------- | ------------- |
| `OPENAI_API_KEY` | Yes      | For the agent |
| `PORT`           | No       | Server port   |

## Related

<CardGroup cols={2}>
  <Card title="Server Adapters" icon="server" href="/docs/js/server-adapters">
    Express, Hono, Fastify
  </Card>

  <Card title="Agent" icon="robot" href="/docs/js/agent">
    Agent configuration
  </Card>
</CardGroup>
