Skip to content

Server Overview

Seepient Agent can be deployed as a standalone container exposing an HTTP REST API and a WebSocket endpoint on port 7337. The server delegates directly to the core agent loop (runAgentLoop) with authentication, session management, and real-time streaming -- ready for production workloads behind a load balancer or directly on bare metal.

Operating Mode: Inference & Planning Only

The HTTP server runs in inference and planning mode this release; effectful tool execution fails closed with backend-unsupported by design until the worker-scheduler spec ships isolated remote execution. HTTP mutation endpoints return 501 NOT_IMPLEMENTED with zero filesystem writes.

Architecture

REST(HTTP)
/v1/health/v1/chat/v1/models/v1/skills/v1/sessions/:id
WebSocket(auth via ?token=)
/ws

Seepient Agent Server

Delegates every request to the core agent loop

Auth

API-key authentication

Session Manager

file-based TTL sessions

Core Engine

runAgentLoop

The server delegates all LLM interaction directly to the core `runAgentLoop`, bypassing the SDK layer. Every request flows through the same core agent loop, so tool execution, hooks, abort handling, and usage tracking behave identically to direct SDK usage.

Key characteristics

FeatureDetail
Default port7337 (configurable via SEEPIENT_PORT or PORT env)
CORSOpt-in: with no server.corsOrigins setting / SEEPIENT_CORS_ORIGINS env var, no Access-Control-Allow-Origin is emitted (set * to reflect any origin)
Graceful shutdownSIGINT / SIGTERM with 5-second drain timeout
Session storageFile-based in ./.seepient/sessions/
AuthAPI keys with scoped permissions

Startup commands

bash
docker run -d -p 7337:7337 \
  -e ANTHROPIC_API_KEY=sk-... \
  -v ~/.seepient:/root/.seepient \
  seepient-server
bash
gcloud run deploy seepient \
  --image seepient-server \
  --port 7337 \
  --set-env-vars "ANTHROPIC_API_KEY=sk-..."
bash
npx seepient server
bash
npm install -g seepient
seepient server
bash
import { runSeepientServer } from "seepient/server";

const server = await runSeepientServer({ port: 7337 });

Programmatic Server Creation & Stateless Workers

For distributed worker fleets or custom orchestration, runSeepientServer() accepts injected contracts for provider runtimes, session stores, and audit loggers:

typescript
import { runSeepientServer } from "seepient/server";

const server = await runSeepientServer({
  port: 7337,
  runtime: myCustomProviderRuntime,
  persist: myDistributedPersistenceBackend,
  auditStore: myRemoteAuditStore,
});

::: note Standalone Binary vs Programmatic runSeepientServer The seepient server CLI and seepient-server binary are configured via environment variables (PORT, HOST, SEEPIENT_API_KEYS_FILE, SEEPIENT_SECURITY_DIR) and CLI flags. To inject custom in-memory or database-backed store contracts (runtime, persist, auditStore, policyStore, capabilityLedger), use the programmatic runSeepientServer() API from seepient/server. :::

Stateless Worker Mutation Guard

When an injected ProviderRuntimeContract does not implement configuration mutations (updateOverlay), mutation endpoints (PUT /v1/models/assignments/*, DELETE /v1/models/assignments/*, PUT /v1/providers/*, DELETE /v1/providers/*) return 501 NOT_IMPLEMENTED with zero filesystem writes. This ensures headless container workers remain strictly stateless without accidental disk mutations.

Quick start

  1. Install and run

    bash
    npx seepient server
  2. Generate an API key

    bash
    seepient server --generate-api-key

    This prints a key like sk_seepient_a1b2c3... and stores it in ~/.seepient/server-keys.json.

  3. Send a chat request

    bash
    curl -X POST http://localhost:7337/v1/chat \
      -H "Content-Type: application/json" \
      -H "X-Seepient-API-Key: sk_seepient_..." \
      -d '{"message": "Hello, world!"}'
  4. Open a WebSocket for streaming

    javascript
    const ws = new WebSocket("ws://localhost:7337/ws?token=sk_seepient_...");
    ws.onmessage = (e) => console.log(JSON.parse(e.data));
    ws.send(JSON.stringify({
      type: "chat",
      id: "1",
      message: "Explain quantum computing"
    }));

Environment variables

VariableDescriptionDefault
SEEPIENT_PORT / PORTServer listen port7337
OPENAI_API_KEYOpenAI provider key--
ANTHROPIC_API_KEYAnthropic provider key--
GLM_API_KEYGLM provider key--
OPENAI_COMPAT_API_KEYAPI key for OpenAI-compatible provider--
OPENAI_COMPAT_BASE_URLBase URL for OpenAI-compatible provider--
LLM_MODELDefault model for OpenAI-compatible providergpt-5.4
LLM_PROVIDERDefault provider (openai, anthropic, glm, openai-compatible)Auto-detected
OPENAI_MODELDefault OpenAI modelgpt-5.4
ANTHROPIC_MODELDefault Anthropic modelclaude-sonnet-4-6-20260320
GLM_MODELDefault GLM modelglm-5.1
SEEPIENT_SESSION_DIRDirectory for session files./.seepient/sessions
SEEPIENT_SESSION_TTLSession TTL in seconds86400 (24 hours)
SEEPIENT_SKILLS_PATHColon-separated paths to skill directories--

Next steps

Released under the Business Source License 1.1.