Overview
The Agent Server provides:- OpenAI-compatible API:
/v1/chat/completionsendpoint for easy integration. - SSE Streaming: Real-time streaming of responses and tool executions.
- Built-in LLM Support: Native integration with OpenAI, Anthropic, Together AI, and Groq.
- Kubiya Integration: Automatically connects the LLM to Kubiya’s MCP tools.
Installation
To use the Agent Server, install the SDK with themcp extra:
Running the Server
Start the server using the CLI:Configuration Options
| Option | Flag | Description |
|---|---|---|
| Provider | --provider, -p | LLM provider (openai, anthropic, together, groq) |
| Model | --model, -m | Specific model name (defaults vary by provider) |
| Port | --port, -P | Server port (default: 8000) |
| Host | --host, -H | Server host (default: 0.0.0.0) |
| Kubiya Key | --kubiya-key | Kubiya API Key (or KUBIYA_API_KEY env var) |
| Provider Key | --api-key | LLM Provider API Key (or OPENAI_API_KEY, etc.) |
Environment Variables
You can also configure the server using environment variables:KUBIYA_API_KEY: Your Kubiya Platform API KeyOPENAI_API_KEY: Required if using OpenAI providerANTHROPIC_API_KEY: Required if using Anthropic providerTOGETHER_API_KEY: Required if using Together AI providerGROQ_API_KEY: Required if using Groq provider
API Endpoints
Chat Completions
POST /v1/chat/completions
Standard OpenAI chat completion endpoint. Supports streaming.
Request:
Discovery
GET /discover
Returns metadata about the agent server, useful for frontend auto-configuration.
Response:
Health Check
GET /health
Returns 200 OK if the server is running.