multitenant

command
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Command multitenant is the concurrency-model example for resolute-harness-go: one agent definition serving many tenants, where the instance id picks the tenant (per-instance system prompts via Initialize) and sessions inside an instance give independent, durably ordered conversations.

The scheduling contract on display:

  • one session = one queue: submissions to the same session run strictly in admission order (head-of-line);
  • different sessions — same tenant or different tenants — run concurrently.

Run it keyless (the local provider takes a fixed ~700ms per prompt, which makes the ordering visible on a stopwatch):

go run ./examples/multitenant

Then fire the demo load (four prompts: two queued into acme/support, one into acme/billing, one into globex — watch the queued one settle a beat later than everything else):

./examples/multitenant/load.sh

or by hand:

curl -s 'localhost:8489/agents/concierge/acme?wait=true' -d '{"kind":"user","body":"first in support","session":"support"}'
curl -N 'localhost:8489/agents/concierge/acme?session=support'   # watch a session's records

Set GEMINI_API_KEY (and optionally MODEL) to serve every tenant with the real model; the scheduling contract is the harness's and does not change.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL