Skip to content

Run the Tryll Server

Start a Tryll server so clients can connect to it.

Prerequisites

  • A Windows 10/11 machine (Linux support is evolving but not officially released).
  • Either a pre-built tryll_server.exe from a release, or the source tree and a CMake + Visual Studio 2022 toolchain to build from source.

Option A — use a pre-built server

If you have a packaged tryll_server.exe plus its data/ folder:

  1. Unpack the release into a directory, e.g. C:\tryll.
  2. Open data\server-config.json. The defaults are fine for local development; only change what you need. See Server Configuration for every field.
  3. Confirm data\models.json lists at least one model you can use. If not, either add a local entry (see Use Your Own Local Model) or plan to download one after connecting.
  4. Start the server:

    cd C:\tryll
    tryll_server.exe
    

    You should see a log line like Listening on 0.0.0.0:9100 (or whichever port you configured).

  5. In a new terminal, verify the port is open:

    netstat -an | findstr 9100
    

Option B — build from source

If you want to hack on the server or your platform does not have a release yet:

  1. Install prerequisites: CMake 3.24+, Visual Studio 2022 with the C++ workload, and Git.
  2. Clone the repository and configure:

    cd server
    cmake --preset default
    

    The default preset uses the Visual Studio 17 2022 generator with TRYLL_VULKAN=PREBUILT, which downloads the matching Vulkan DLL — no GPU SDK needed. For a CPU-only build add -DTRYLL_VULKAN=OFF. For CUDA or ROCm see the full build notes in the internal developer docs. 3. Build:

    cmake --build --preset debug
    
  3. Run:

    build\server\Debug\tryll_server.exe
    

    To point the server at a different config file:

    tryll_server.exe --config path\to\server-config.json
    

    To listen on a different port without editing the config file:

    tryll_server.exe --port 9200
    

    Both flags can be combined. --port overrides the port field from the config file. When using ManagedServer (C++ or Python clients) or the Unreal plugin auto-launch, the port is passed automatically — you do not need to edit server-config.json.

What to edit in server-config.json

The fields you most often want to touch:

  • logs_dir — where log files land. Empty string means console-only. Default is data/logs.
  • log_mode"production" rotates a single tryll.log; "dev" opens a new tryll_<timestamp>.log per run. Use "dev" while developing so you can diff runs.
  • log_level"info" is a fine default. "trace" turns on the per-turn workflow trace, which logs every node execution — noisy but great for debugging graphs.
  • default_canned_responses_path and default_guardrail_patterns_pathserver-admin fallback. Point these at files to supply defaults for CannedResponse and HumanMessageGuardrail nodes when the client has not created a string storage. Most client workflows won't need these — use CreateStringStorageRequest (inline or file_path) instead.

Every field is documented in Server Configuration.

Verify it is working

In another terminal, try connecting with the C++ or Python client:

from tryll_client import TryllClient
c = TryllClient.connect("127.0.0.1", 9100)
print(c.list_models())
c.shutdown()
#include <tryll/TryllClient.h>
auto client = Tryll::TryllClient::Connect("127.0.0.1", 9100);
auto models = client.ListModels();
client.Shutdown();

The server log should show an accept, a SessionReady, and a ListModelsRequest.

Graceful shutdown

Ctrl+C in the server console triggers a clean shutdown: the server cancels all active agent turns, closes all sessions, and exits. No client-visible data is kept across restarts — each session starts from scratch.