# Server

Run TnsAI as a backend — WebSocket API, session management, human-in-the-loop tool approval.

## Pages

- [WebSocket](websocket.md) — The v1 WebSocket protocol.
- [Tool Approval](tool-approval.md) — Human-gated destructive operations.
- [Advanced](advanced.md) — Scaling, persistence, multi-tenant deployment.

> For production RAG pipelines, see [RAG Pipeline](../capabilities/rag/pipeline.md).

## Server tools

`ServerFileTools`, `ServerGitTools`, and `ServerShellTools` are the
backend POJO tools. TnsAI 0.14.0 (`TnsAI@11035829`, TAN-4383)
drains `ServerShellTools` stdout and stderr on separate threads
**before** `waitFor`, matching `ServerGitTools`. Maven Central `0.13.0`
read both pipes only after the process exited, so any command that
filled the OS pipe buffer (~16–64 KB) hung until timeout and returned
`{"error":"Command timed out"}`. Maven Central `0.14.1` drains first.
