Configurator
Package: agentrouter.configurator.v1 Service: ConfiguratorService
Endpoints
Get configuration
What it does: Retrieves the latest configuration for a user. Returns configuration only if the version is newer than the provided version. Supports batch queries for multiple users for efficiency.
Request fields:
| Field | Required | Description |
|---|---|---|
queries | no | List of user queries to check for updates. Supports batch queries for efficiency. |
Response fields:
| Field | Required | Description |
|---|---|---|
configurations | no | List of configurations with updates. Only includes configs where version > current_version in request. |
{"signatures":{"go":"func (x *ConfiguratorClient) GetConfiguration(ctx context.Context, req *configuratorv1.GetConfigurationRequest) (*configuratorv1.GetConfigurationResponse, error)","python":"get_configuration(req: configurator_pb2.GetConfigurationRequest) -\u003e GetConfigurationResponse","typescript":"getConfiguration(req: MessageInitShape\u003c typeof tars_configurator_v1_configurator_pb.GetConfigurationRequestSchema \u003e): Promise\u003cGetConfigurationResponse\u003e","cli":"tare api configurator configuration get","curl":"curl -X POST \"${AGENTROUTER_BASE_URL}/configurator/v1/config\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"queries\": []\n }'"},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n\tconfiguratorv1 \"github.com/tetrateio/agentrouter-go/genapi/api/tars/configurator/v1\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\t// Populate the request fields -- see the \"Request fields\" table above for\n\t// the available fields and which are required.\n\treq := \u0026configuratorv1.GetConfigurationRequest{}\n\n\tresp, err := client.Configurator().GetConfiguration(ctx, req)\n\tif err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Printf(\"%+v\\n\", resp)\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/configurator/getconfiguration\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom tars.configurator.v1 import configurator_pb2\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Populate the request fields -- see the \"Request fields\" table above\n# for the available fields and which are required.\nreq = configurator_pb2.GetConfigurationRequest()\ntry:\n result = client.configurator.get_configuration(req)\n print(result)\nexcept Exception as err:\n print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n# agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n baseUrl: process.env.AGENTROUTER_BASE_URL,\n apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Populate the request fields -- see the \"Request fields\" table above\n// for the available fields and which are required.\nconst req = {}\ntry {\n const result = await client.configurator.getConfiguration(req)\n console.log(result)\n} catch (err) {\n console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n \"name\": \"configurator\",\n \"version\": \"0.1.0\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^20.0.0\",\n \"typescript\": \"^5.4.0\"\n }\n}\n"},{"name":"tsconfig.json","content":"{\n \"compilerOptions\": {\n \"target\": \"ES2020\",\n \"module\": \"ESNext\",\n \"moduleResolution\": \"bundler\",\n \"strict\": true,\n \"esModuleInterop\": true,\n \"skipLibCheck\": true\n }\n}\n"}]},"cli":"tare api configurator configuration get","curl":"curl -X POST \"${AGENTROUTER_BASE_URL}/configurator/v1/config\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"queries\": []\n }'"},"persona":"Admin","httpVerb":"POST","httpPath":"/configurator/v1/config","slug":"get-configuration"}
Trigger update
What it does: Triggers a configuration update for a specific user and config type. This is called by the dashboard when configuration changes.
Request fields:
| Field | Required | Description |
|---|---|---|
user_id | no | User ID for the configuration. If not provided, uses authenticated user ID. Use "system" for global configuration. |
config_type | no | Configuration type to update. |
event_type | no | Event type that triggered this update. |
key_id | no | Optional key ID for user-specific configurations. Used for BYOK, MCP profiles, etc. |
workspace_id | no | Optional workspace (data plane) scope for the event. When set, the configurator emits a single event scoped to this workspace only. When unset, the configurator fans the event out to every workspace belonging to the caller's customer, so every data plane in that customer converges on the new configuration. |
metadata | no | Optional inline payload for config types that take operator-provided params. Ignored by config types that read their state from DB. Today only CONFIG_TYPE_DATAPLANE_UPGRADE consumes this. The fields end up merged into the persisted event.metadata JSON so the worker can read them at dispatch time. |
Response fields:
| Field | Required | Description |
|---|---|---|
configuration | no | Configuration that was generated/updated. |
configuration_updated | no | Whether a new configuration was generated. |
{"signatures":{"go":"func (x *ConfiguratorClient) TriggerUpdate(ctx context.Context, req *configuratorv1.TriggerUpdateRequest) (*configuratorv1.TriggerUpdateResponse, error)","python":"trigger_update(req: configurator_pb2.TriggerUpdateRequest) -\u003e TriggerUpdateResponse","typescript":"triggerUpdate(req: MessageInitShape\u003c typeof tars_configurator_v1_configurator_pb.TriggerUpdateRequestSchema \u003e): Promise\u003cTriggerUpdateResponse\u003e","cli":"tare api configurator update trigger","curl":"curl -X POST \"${AGENTROUTER_BASE_URL}/configurator/v1/trigger\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"user_id\": \"...\",\n \"config_type\": \"...\",\n \"event_type\": \"...\",\n \"key_id\": \"...\",\n \"workspace_id\": \"...\",\n \"metadata\": {}\n }'"},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n\tconfiguratorv1 \"github.com/tetrateio/agentrouter-go/genapi/api/tars/configurator/v1\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\t// Populate the request fields -- see the \"Request fields\" table above for\n\t// the available fields and which are required.\n\treq := \u0026configuratorv1.TriggerUpdateRequest{}\n\n\tresp, err := client.Configurator().TriggerUpdate(ctx, req)\n\tif err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Printf(\"%+v\\n\", resp)\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/configurator/triggerupdate\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom tars.configurator.v1 import configurator_pb2\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Populate the request fields -- see the \"Request fields\" table above\n# for the available fields and which are required.\nreq = configurator_pb2.TriggerUpdateRequest()\ntry:\n result = client.configurator.trigger_update(req)\n print(result)\nexcept Exception as err:\n print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n# agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n baseUrl: process.env.AGENTROUTER_BASE_URL,\n apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Populate the request fields -- see the \"Request fields\" table above\n// for the available fields and which are required.\nconst req = {}\ntry {\n const result = await client.configurator.triggerUpdate(req)\n console.log(result)\n} catch (err) {\n console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n \"name\": \"configurator\",\n \"version\": \"0.1.0\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^20.0.0\",\n \"typescript\": \"^5.4.0\"\n }\n}\n"},{"name":"tsconfig.json","content":"{\n \"compilerOptions\": {\n \"target\": \"ES2020\",\n \"module\": \"ESNext\",\n \"moduleResolution\": \"bundler\",\n \"strict\": true,\n \"esModuleInterop\": true,\n \"skipLibCheck\": true\n }\n}\n"}]},"cli":"tare api configurator update trigger","curl":"curl -X POST \"${AGENTROUTER_BASE_URL}/configurator/v1/trigger\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"user_id\": \"...\",\n \"config_type\": \"...\",\n \"event_type\": \"...\",\n \"key_id\": \"...\",\n \"workspace_id\": \"...\",\n \"metadata\": {}\n }'"},"persona":"Admin","httpVerb":"POST","httpPath":"/configurator/v1/trigger","slug":"trigger-update"}
List configurations
What it does: Lists all configurations with optional filtering. Used for debugging and monitoring.
Request fields:
| Field | Required | Description |
|---|---|---|
user_id | no | Filter by user ID (optional). |
config_type | no | Filter by config type (optional). |
page_size | no | Pagination. |
page_token | no | Page token returned by a prior call's next_page_token. |
Response fields:
| Field | Required | Description |
|---|---|---|
configurations | no | Configurations matching the request filters for this page. |
next_page_token | no | Token to pass as page_token to fetch the next page; empty when no more. |
{"signatures":{"go":"func (x *ConfiguratorClient) ListConfigurations(ctx context.Context, req *configuratorv1.ListConfigurationsRequest) (*configuratorv1.ListConfigurationsResponse, error)","python":"list_configurations(req: configurator_pb2.ListConfigurationsRequest) -\u003e ListConfigurationsResponse","typescript":"listConfigurations(req: MessageInitShape\u003c typeof tars_configurator_v1_configurator_pb.ListConfigurationsRequestSchema \u003e): Promise\u003cListConfigurationsResponse\u003e","cli":"tare api configurator configurations list","curl":"curl \"${AGENTROUTER_BASE_URL}/configurator/v1/configs\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\""},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n\tconfiguratorv1 \"github.com/tetrateio/agentrouter-go/genapi/api/tars/configurator/v1\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\t// Populate the request fields -- see the \"Request fields\" table above for\n\t// the available fields and which are required.\n\treq := \u0026configuratorv1.ListConfigurationsRequest{}\n\n\tresp, err := client.Configurator().ListConfigurations(ctx, req)\n\tif err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Printf(\"%+v\\n\", resp)\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/configurator/listconfigurations\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom tars.configurator.v1 import configurator_pb2\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Populate the request fields -- see the \"Request fields\" table above\n# for the available fields and which are required.\nreq = configurator_pb2.ListConfigurationsRequest()\ntry:\n result = client.configurator.list_configurations(req)\n print(result)\nexcept Exception as err:\n print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n# agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n baseUrl: process.env.AGENTROUTER_BASE_URL,\n apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Populate the request fields -- see the \"Request fields\" table above\n// for the available fields and which are required.\nconst req = {}\ntry {\n const result = await client.configurator.listConfigurations(req)\n console.log(result)\n} catch (err) {\n console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n \"name\": \"configurator\",\n \"version\": \"0.1.0\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^20.0.0\",\n \"typescript\": \"^5.4.0\"\n }\n}\n"},{"name":"tsconfig.json","content":"{\n \"compilerOptions\": {\n \"target\": \"ES2020\",\n \"module\": \"ESNext\",\n \"moduleResolution\": \"bundler\",\n \"strict\": true,\n \"esModuleInterop\": true,\n \"skipLibCheck\": true\n }\n}\n"}]},"cli":"tare api configurator configurations list","curl":"curl \"${AGENTROUTER_BASE_URL}/configurator/v1/configs\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\""},"persona":"Admin","httpVerb":"GET","httpPath":"/configurator/v1/configs","slug":"list-configurations"}
List pending events
What it does: Returns configuration events that need processing. Used by workers to discover which configurations have updates. The worker piggybacks its tare-doctor runtime observation onto this poll (request.doctor_runtime) so MP can explain a stale doctor report — hence this is no longer NO_SIDE_EFFECTS: a poll updates the data plane's doctor-runtime state.
Request fields:
| Field | Required | Description |
|---|---|---|
limit | no | Maximum number of events to return. If not specified, defaults to 100. |
doctor_runtime | no | The liaison's out-of-band observation of the tare-doctor CronJob, piggybacked on the poll. Lets MP surface *why* the doctor stopped reporting — the doctor can't report when it is itself the broken component, so the (live) worker reports on its behalf. Empty on legacy workers and until the worker's first doctor sweep. |
Response fields:
| Field | Required | Description |
|---|---|---|
events | no | Pending configuration events awaiting worker processing. |
{"signatures":{"go":"func (x *ConfiguratorClient) ListPendingEvents(ctx context.Context, req *configuratorv1.ListPendingEventsRequest) (*configuratorv1.ListPendingEventsResponse, error)","python":"list_pending_events(req: configurator_pb2.ListPendingEventsRequest) -\u003e ListPendingEventsResponse","typescript":"listPendingEvents(req: MessageInitShape\u003c typeof tars_configurator_v1_configurator_pb.ListPendingEventsRequestSchema \u003e): Promise\u003cListPendingEventsResponse\u003e","cli":"tare api configurator pending-events list","curl":"curl \"${AGENTROUTER_BASE_URL}/configurator/v1/pending-events\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\""},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n\tconfiguratorv1 \"github.com/tetrateio/agentrouter-go/genapi/api/tars/configurator/v1\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\t// Populate the request fields -- see the \"Request fields\" table above for\n\t// the available fields and which are required.\n\treq := \u0026configuratorv1.ListPendingEventsRequest{}\n\n\tresp, err := client.Configurator().ListPendingEvents(ctx, req)\n\tif err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Printf(\"%+v\\n\", resp)\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/configurator/listpendingevents\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom tars.configurator.v1 import configurator_pb2\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Populate the request fields -- see the \"Request fields\" table above\n# for the available fields and which are required.\nreq = configurator_pb2.ListPendingEventsRequest()\ntry:\n result = client.configurator.list_pending_events(req)\n print(result)\nexcept Exception as err:\n print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n# agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n baseUrl: process.env.AGENTROUTER_BASE_URL,\n apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Populate the request fields -- see the \"Request fields\" table above\n// for the available fields and which are required.\nconst req = {}\ntry {\n const result = await client.configurator.listPendingEvents(req)\n console.log(result)\n} catch (err) {\n console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n \"name\": \"configurator\",\n \"version\": \"0.1.0\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^20.0.0\",\n \"typescript\": \"^5.4.0\"\n }\n}\n"},{"name":"tsconfig.json","content":"{\n \"compilerOptions\": {\n \"target\": \"ES2020\",\n \"module\": \"ESNext\",\n \"moduleResolution\": \"bundler\",\n \"strict\": true,\n \"esModuleInterop\": true,\n \"skipLibCheck\": true\n }\n}\n"}]},"cli":"tare api configurator pending-events list","curl":"curl \"${AGENTROUTER_BASE_URL}/configurator/v1/pending-events\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\""},"persona":"Admin","httpVerb":"GET","httpPath":"/configurator/v1/pending-events","slug":"list-pending-events"}
Reconcile workspace
What it does: Re-enqueues missing or stale slot events for the caller's workspace by cloning the latest sibling event of each slot the workspace has not yet converged on. Used by the worker's periodic drift sweep. Workspace is resolved from the caller's auth claims; callers without a workspace claim are rejected.
Request body: None.
Response fields:
| Field | Required | Description |
|---|---|---|
replayed_total | no | Total slot events enqueued across all buckets (sum of the fields below). |
replayed_global | no | Events enqueued for the global (system-wide) config slot. |
replayed_per_user | no | Events enqueued for per-user config slots. |
replayed_per_user_per_key | no | Events enqueued for per-user, per-key config slots. |
{"signatures":{"go":"func (x *ConfiguratorClient) ReconcileWorkspace(ctx context.Context, req *configuratorv1.ReconcileWorkspaceRequest) (*configuratorv1.ReconcileWorkspaceResponse, error)","python":"reconcile_workspace(req: configurator_pb2.ReconcileWorkspaceRequest) -\u003e ReconcileWorkspaceResponse","typescript":"reconcileWorkspace(req: MessageInitShape\u003c typeof tars_configurator_v1_configurator_pb.ReconcileWorkspaceRequestSchema \u003e): Promise\u003cReconcileWorkspaceResponse\u003e","cli":"tare api configurator workspace reconcile","curl":"curl -X POST \"${AGENTROUTER_BASE_URL}/configurator/v1/reconcile-workspace\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{}'"},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n\tconfiguratorv1 \"github.com/tetrateio/agentrouter-go/genapi/api/tars/configurator/v1\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\t// Populate the request fields -- see the \"Request fields\" table above for\n\t// the available fields and which are required.\n\treq := \u0026configuratorv1.ReconcileWorkspaceRequest{}\n\n\tresp, err := client.Configurator().ReconcileWorkspace(ctx, req)\n\tif err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Printf(\"%+v\\n\", resp)\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/configurator/reconcileworkspace\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom tars.configurator.v1 import configurator_pb2\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Populate the request fields -- see the \"Request fields\" table above\n# for the available fields and which are required.\nreq = configurator_pb2.ReconcileWorkspaceRequest()\ntry:\n result = client.configurator.reconcile_workspace(req)\n print(result)\nexcept Exception as err:\n print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n# agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n baseUrl: process.env.AGENTROUTER_BASE_URL,\n apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Populate the request fields -- see the \"Request fields\" table above\n// for the available fields and which are required.\nconst req = {}\ntry {\n const result = await client.configurator.reconcileWorkspace(req)\n console.log(result)\n} catch (err) {\n console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n \"name\": \"configurator\",\n \"version\": \"0.1.0\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^20.0.0\",\n \"typescript\": \"^5.4.0\"\n }\n}\n"},{"name":"tsconfig.json","content":"{\n \"compilerOptions\": {\n \"target\": \"ES2020\",\n \"module\": \"ESNext\",\n \"moduleResolution\": \"bundler\",\n \"strict\": true,\n \"esModuleInterop\": true,\n \"skipLibCheck\": true\n }\n}\n"}]},"cli":"tare api configurator workspace reconcile","curl":"curl -X POST \"${AGENTROUTER_BASE_URL}/configurator/v1/reconcile-workspace\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{}'"},"persona":"Admin","httpVerb":"POST","httpPath":"/configurator/v1/reconcile-workspace","slug":"reconcile-workspace"}
Full sync workspace
What it does: Is the heavier "last resort" replay path: walks liaison_configurations directly rather than sibling events, so it can recover legacy unscoped events the drift sweep can't see. Worker calls this once on startup and every Nth drift sweep tick. Workspace and customer are resolved from the caller's auth claims.
Request body: None.
Response fields:
| Field | Required | Description |
|---|---|---|
replayed_total | no | Total per-user slot events enqueued (sum of the fields below). |
replayed_per_user | no | Events enqueued for per-user config slots. |
replayed_per_user_per_key | no | Events enqueued for per-user, per-key config slots. |
{"signatures":{"go":"func (x *ConfiguratorClient) FullSyncWorkspace(ctx context.Context, req *configuratorv1.FullSyncWorkspaceRequest) (*configuratorv1.FullSyncWorkspaceResponse, error)","python":"full_sync_workspace(req: configurator_pb2.FullSyncWorkspaceRequest) -\u003e FullSyncWorkspaceResponse","typescript":"fullSyncWorkspace(req: MessageInitShape\u003c typeof tars_configurator_v1_configurator_pb.FullSyncWorkspaceRequestSchema \u003e): Promise\u003cFullSyncWorkspaceResponse\u003e","cli":"tare api configurator sync-workspace full","curl":"curl -X POST \"${AGENTROUTER_BASE_URL}/configurator/v1/full-sync-workspace\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{}'"},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n\tconfiguratorv1 \"github.com/tetrateio/agentrouter-go/genapi/api/tars/configurator/v1\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\t// Populate the request fields -- see the \"Request fields\" table above for\n\t// the available fields and which are required.\n\treq := \u0026configuratorv1.FullSyncWorkspaceRequest{}\n\n\tresp, err := client.Configurator().FullSyncWorkspace(ctx, req)\n\tif err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Printf(\"%+v\\n\", resp)\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/configurator/fullsyncworkspace\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom tars.configurator.v1 import configurator_pb2\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Populate the request fields -- see the \"Request fields\" table above\n# for the available fields and which are required.\nreq = configurator_pb2.FullSyncWorkspaceRequest()\ntry:\n result = client.configurator.full_sync_workspace(req)\n print(result)\nexcept Exception as err:\n print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n# agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n baseUrl: process.env.AGENTROUTER_BASE_URL,\n apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Populate the request fields -- see the \"Request fields\" table above\n// for the available fields and which are required.\nconst req = {}\ntry {\n const result = await client.configurator.fullSyncWorkspace(req)\n console.log(result)\n} catch (err) {\n console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n \"name\": \"configurator\",\n \"version\": \"0.1.0\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^20.0.0\",\n \"typescript\": \"^5.4.0\"\n }\n}\n"},{"name":"tsconfig.json","content":"{\n \"compilerOptions\": {\n \"target\": \"ES2020\",\n \"module\": \"ESNext\",\n \"moduleResolution\": \"bundler\",\n \"strict\": true,\n \"esModuleInterop\": true,\n \"skipLibCheck\": true\n }\n}\n"}]},"cli":"tare api configurator sync-workspace full","curl":"curl -X POST \"${AGENTROUTER_BASE_URL}/configurator/v1/full-sync-workspace\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{}'"},"persona":"Admin","httpVerb":"POST","httpPath":"/configurator/v1/full-sync-workspace","slug":"full-sync-workspace"}
Acknowledge event
What it does: Marks an event as acknowledged by a worker. This prevents other workers from processing the same event.
Request fields:
| Field | Required | Description |
|---|---|---|
event_id | no | Event ID to acknowledge. |
worker_id | no | Worker ID that is acknowledging the event. |
Response fields:
| Field | Required | Description |
|---|---|---|
success | no | True if the event was acknowledged (claimed) by this worker. |
{"signatures":{"go":"func (x *ConfiguratorClient) AcknowledgeEvent(ctx context.Context, req *configuratorv1.AcknowledgeEventRequest) (*configuratorv1.AcknowledgeEventResponse, error)","python":"acknowledge_event(req: configurator_pb2.AcknowledgeEventRequest) -\u003e AcknowledgeEventResponse","typescript":"acknowledgeEvent(req: MessageInitShape\u003c typeof tars_configurator_v1_configurator_pb.AcknowledgeEventRequestSchema \u003e): Promise\u003cAcknowledgeEventResponse\u003e","cli":"tare api configurator event acknowledge","curl":"curl -X POST \"${AGENTROUTER_BASE_URL}/configurator/v1/acknowledge-event\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"event_id\": \"...\",\n \"worker_id\": \"...\"\n }'"},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n\tconfiguratorv1 \"github.com/tetrateio/agentrouter-go/genapi/api/tars/configurator/v1\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\t// Populate the request fields -- see the \"Request fields\" table above for\n\t// the available fields and which are required.\n\treq := \u0026configuratorv1.AcknowledgeEventRequest{}\n\n\tresp, err := client.Configurator().AcknowledgeEvent(ctx, req)\n\tif err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Printf(\"%+v\\n\", resp)\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/configurator/acknowledgeevent\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom tars.configurator.v1 import configurator_pb2\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Populate the request fields -- see the \"Request fields\" table above\n# for the available fields and which are required.\nreq = configurator_pb2.AcknowledgeEventRequest()\ntry:\n result = client.configurator.acknowledge_event(req)\n print(result)\nexcept Exception as err:\n print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n# agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n baseUrl: process.env.AGENTROUTER_BASE_URL,\n apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Populate the request fields -- see the \"Request fields\" table above\n// for the available fields and which are required.\nconst req = {}\ntry {\n const result = await client.configurator.acknowledgeEvent(req)\n console.log(result)\n} catch (err) {\n console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n \"name\": \"configurator\",\n \"version\": \"0.1.0\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^20.0.0\",\n \"typescript\": \"^5.4.0\"\n }\n}\n"},{"name":"tsconfig.json","content":"{\n \"compilerOptions\": {\n \"target\": \"ES2020\",\n \"module\": \"ESNext\",\n \"moduleResolution\": \"bundler\",\n \"strict\": true,\n \"esModuleInterop\": true,\n \"skipLibCheck\": true\n }\n}\n"}]},"cli":"tare api configurator event acknowledge","curl":"curl -X POST \"${AGENTROUTER_BASE_URL}/configurator/v1/acknowledge-event\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"event_id\": \"...\",\n \"worker_id\": \"...\"\n }'"},"persona":"Admin","httpVerb":"POST","httpPath":"/configurator/v1/acknowledge-event","slug":"acknowledge-event"}
Set dataplane URL
What it does: Persists the customer-facing gateway URL for a data plane (workspace). Called by tare install to register the URL at install time and by the management-plane dashboard when an admin edits it later. trigger_update=false (install path) only writes the system_settings row. trigger_update=true (admin-edit path) additionally fires a PROXY_URL configuration event so the running data plane converges on the new URL via the worker's existing event-handling loop.
Request fields:
| Field | Required | Description |
|---|---|---|
workspace_id | no | Workspace ID of the data plane whose URL is being set. Must match the workspace claim on the caller's service-account token. |
url | no | Full gateway URL (scheme + host + optional port), e.g. "https://router.acmecorp.tetrate.ai". |
trigger_update | no | When true, fire a PROXY_URL configuration event after persisting the URL so the running data plane converges on the new value via the worker's event loop. Dashboard admin edits set this; tare install leaves it false because the data plane is being created and the chart populates tars-config[proxy-url] directly at install time. |
{"signatures":{"go":"func (x *ConfiguratorClient) SetDataplaneURL(ctx context.Context, req *configuratorv1.SetDataplaneURLRequest) (*configuratorv1.SetDataplaneURLResponse, error)","python":"set_dataplane_url(req: configurator_pb2.SetDataplaneURLRequest) -\u003e SetDataplaneURLResponse","typescript":"setDataplaneURL(req: MessageInitShape\u003c typeof tars_configurator_v1_configurator_pb.SetDataplaneURLRequestSchema \u003e): Promise\u003cSetDataplaneURLResponse\u003e","cli":"tare api configurator dataplane-url set","curl":"curl -X POST \"${AGENTROUTER_BASE_URL}/configurator/v1/dataplane-url\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"workspace_id\": \"...\",\n \"url\": \"...\",\n \"trigger_update\": false\n }'"},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n\tconfiguratorv1 \"github.com/tetrateio/agentrouter-go/genapi/api/tars/configurator/v1\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\t// Populate the request fields -- see the \"Request fields\" table above for\n\t// the available fields and which are required.\n\treq := \u0026configuratorv1.SetDataplaneURLRequest{}\n\n\tresp, err := client.Configurator().SetDataplaneURL(ctx, req)\n\tif err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Printf(\"%+v\\n\", resp)\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/configurator/setdataplaneurl\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom tars.configurator.v1 import configurator_pb2\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Populate the request fields -- see the \"Request fields\" table above\n# for the available fields and which are required.\nreq = configurator_pb2.SetDataplaneURLRequest()\ntry:\n result = client.configurator.set_dataplane_url(req)\n print(result)\nexcept Exception as err:\n print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n# agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n baseUrl: process.env.AGENTROUTER_BASE_URL,\n apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Populate the request fields -- see the \"Request fields\" table above\n// for the available fields and which are required.\nconst req = {}\ntry {\n const result = await client.configurator.setDataplaneURL(req)\n console.log(result)\n} catch (err) {\n console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n \"name\": \"configurator\",\n \"version\": \"0.1.0\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^20.0.0\",\n \"typescript\": \"^5.4.0\"\n }\n}\n"},{"name":"tsconfig.json","content":"{\n \"compilerOptions\": {\n \"target\": \"ES2020\",\n \"module\": \"ESNext\",\n \"moduleResolution\": \"bundler\",\n \"strict\": true,\n \"esModuleInterop\": true,\n \"skipLibCheck\": true\n }\n}\n"}]},"cli":"tare api configurator dataplane-url set","curl":"curl -X POST \"${AGENTROUTER_BASE_URL}/configurator/v1/dataplane-url\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"workspace_id\": \"...\",\n \"url\": \"...\",\n \"trigger_update\": false\n }'"},"persona":"Admin","httpVerb":"POST","httpPath":"/configurator/v1/dataplane-url","slug":"set-dataplane-url"}
Upsert MCP catalog server
What it does: Wires a deployed in-cluster MCP server into the customer's catalog. Used by tare mcp enable <server>: the CLI looks up the server's seed entry in mcp-catalog-tare-mcp-with-tools.json, asks the operator for the in-cluster URL, and submits this RPC to set is_enabled=true on the corresponding mcp_catalog_servers row. Default behaviour (force_overwrite=false): if the row exists, only url + is_enabled (+updated_at) are updated; dashboard-set fields (description / icon / categories / tools / etc.) are preserved. If the row is new, the seed-provided fields are used to populate it. force_overwrite=true: every seed field is written, clobbering any dashboard edits. Use sparingly — intended for "reset this row to seed defaults" repairs.
Request fields:
| Field | Required | Description |
|---|---|---|
workspace_id | no | Workspace ID — must match the workspace claim on the caller's SA token. API-key callers (admin scope) are trusted across workspaces. |
id | no | Stable identifier — matches mcp_catalog_servers.id. Comes from the catalog seed JSON; the operator picks the server name on the command line (tare mcp enable jira). |
url | no | In-cluster (or public) URL the operator wants the dashboard to use as this server's backend endpoint. The only field the operator explicitly enters — everything else flows from the seed JSON. |
name | no | Seed-derived display fields. Used only when the row is being INSERTed (or when force_overwrite=true); ignored on sparse updates of an existing row. |
description | no | Human-readable description of the MCP server. |
icon_url | no | URL of the server's display icon. |
categories | no | Catalog category tags the server is grouped under. |
authentication | no | Auth metadata, also seed-derived. Same write semantics as the display fields. |
requires_auth | no | Whether clients must authenticate to use this server. |
force_overwrite | no | When true, every field above (including url) replaces the existing row, clobbering dashboard edits. Default false: sparse update — only url + is_enabled (+ updated_at) move on an existing row. |
Response fields:
| Field | Required | Description |
|---|---|---|
created | no | True if a new row was inserted; false if an existing row was updated. |
{"signatures":{"go":"func (x *ConfiguratorClient) UpsertMCPCatalogServer(ctx context.Context, req *configuratorv1.UpsertMCPCatalogServerRequest) (*configuratorv1.UpsertMCPCatalogServerResponse, error)","python":"upsert_mcp_catalog_server(req: configurator_pb2.UpsertMCPCatalogServerRequest) -\u003e UpsertMCPCatalogServerResponse","typescript":"upsertMCPCatalogServer(req: MessageInitShape\u003c typeof tars_configurator_v1_configurator_pb.UpsertMCPCatalogServerRequestSchema \u003e): Promise\u003cUpsertMCPCatalogServerResponse\u003e","cli":"tare api configurator mcp-catalog-server upsert","curl":"curl -X POST \"${AGENTROUTER_BASE_URL}/configurator/v1/mcp-catalog/upsert\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"workspace_id\": \"...\",\n \"id\": \"...\",\n \"url\": \"...\",\n \"name\": \"...\",\n \"description\": \"...\",\n \"icon_url\": \"...\",\n \"categories\": [],\n \"authentication\": \"...\",\n \"requires_auth\": false,\n \"force_overwrite\": false\n }'"},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n\tconfiguratorv1 \"github.com/tetrateio/agentrouter-go/genapi/api/tars/configurator/v1\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\t// Populate the request fields -- see the \"Request fields\" table above for\n\t// the available fields and which are required.\n\treq := \u0026configuratorv1.UpsertMCPCatalogServerRequest{}\n\n\tresp, err := client.Configurator().UpsertMCPCatalogServer(ctx, req)\n\tif err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Printf(\"%+v\\n\", resp)\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/configurator/upsertmcpcatalogserver\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom tars.configurator.v1 import configurator_pb2\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Populate the request fields -- see the \"Request fields\" table above\n# for the available fields and which are required.\nreq = configurator_pb2.UpsertMCPCatalogServerRequest()\ntry:\n result = client.configurator.upsert_mcp_catalog_server(req)\n print(result)\nexcept Exception as err:\n print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n# agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n baseUrl: process.env.AGENTROUTER_BASE_URL,\n apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Populate the request fields -- see the \"Request fields\" table above\n// for the available fields and which are required.\nconst req = {}\ntry {\n const result = await client.configurator.upsertMCPCatalogServer(req)\n console.log(result)\n} catch (err) {\n console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n \"name\": \"configurator\",\n \"version\": \"0.1.0\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^20.0.0\",\n \"typescript\": \"^5.4.0\"\n }\n}\n"},{"name":"tsconfig.json","content":"{\n \"compilerOptions\": {\n \"target\": \"ES2020\",\n \"module\": \"ESNext\",\n \"moduleResolution\": \"bundler\",\n \"strict\": true,\n \"esModuleInterop\": true,\n \"skipLibCheck\": true\n }\n}\n"}]},"cli":"tare api configurator mcp-catalog-server upsert","curl":"curl -X POST \"${AGENTROUTER_BASE_URL}/configurator/v1/mcp-catalog/upsert\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"workspace_id\": \"...\",\n \"id\": \"...\",\n \"url\": \"...\",\n \"name\": \"...\",\n \"description\": \"...\",\n \"icon_url\": \"...\",\n \"categories\": [],\n \"authentication\": \"...\",\n \"requires_auth\": false,\n \"force_overwrite\": false\n }'"},"persona":"Admin","httpVerb":"POST","httpPath":"/configurator/v1/mcp-catalog/upsert","slug":"upsert-mcp-catalog-server"}
Complete event
What it does: Marks an event as successfully applied or failed.
Request fields:
| Field | Required | Description |
|---|---|---|
event_id | no | Event ID to complete. |
success | no | Whether the event was successfully applied. |
error_message | no | Error message if failed. |
Response fields:
| Field | Required | Description |
|---|---|---|
success | no | True if the event status was updated to applied or failed. |
{"signatures":{"go":"func (x *ConfiguratorClient) CompleteEvent(ctx context.Context, req *configuratorv1.CompleteEventRequest) (*configuratorv1.CompleteEventResponse, error)","python":"complete_event(req: configurator_pb2.CompleteEventRequest) -\u003e CompleteEventResponse","typescript":"completeEvent(req: MessageInitShape\u003c typeof tars_configurator_v1_configurator_pb.CompleteEventRequestSchema \u003e): Promise\u003cCompleteEventResponse\u003e","cli":"tare api configurator event complete","curl":"curl -X POST \"${AGENTROUTER_BASE_URL}/configurator/v1/complete-event\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"event_id\": \"...\",\n \"success\": false,\n \"error_message\": \"...\"\n }'"},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n\tconfiguratorv1 \"github.com/tetrateio/agentrouter-go/genapi/api/tars/configurator/v1\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\t// Populate the request fields -- see the \"Request fields\" table above for\n\t// the available fields and which are required.\n\treq := \u0026configuratorv1.CompleteEventRequest{}\n\n\tresp, err := client.Configurator().CompleteEvent(ctx, req)\n\tif err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Printf(\"%+v\\n\", resp)\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/configurator/completeevent\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom tars.configurator.v1 import configurator_pb2\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Populate the request fields -- see the \"Request fields\" table above\n# for the available fields and which are required.\nreq = configurator_pb2.CompleteEventRequest()\ntry:\n result = client.configurator.complete_event(req)\n print(result)\nexcept Exception as err:\n print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n# agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n baseUrl: process.env.AGENTROUTER_BASE_URL,\n apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Populate the request fields -- see the \"Request fields\" table above\n// for the available fields and which are required.\nconst req = {}\ntry {\n const result = await client.configurator.completeEvent(req)\n console.log(result)\n} catch (err) {\n console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n \"name\": \"configurator\",\n \"version\": \"0.1.0\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^20.0.0\",\n \"typescript\": \"^5.4.0\"\n }\n}\n"},{"name":"tsconfig.json","content":"{\n \"compilerOptions\": {\n \"target\": \"ES2020\",\n \"module\": \"ESNext\",\n \"moduleResolution\": \"bundler\",\n \"strict\": true,\n \"esModuleInterop\": true,\n \"skipLibCheck\": true\n }\n}\n"}]},"cli":"tare api configurator event complete","curl":"curl -X POST \"${AGENTROUTER_BASE_URL}/configurator/v1/complete-event\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"event_id\": \"...\",\n \"success\": false,\n \"error_message\": \"...\"\n }'"},"persona":"Admin","httpVerb":"POST","httpPath":"/configurator/v1/complete-event","slug":"complete-event"}
List active users
What it does: Returns a list of user IDs that have active configurations. Used for monitoring and debugging.
Request fields:
| Field | Required | Description |
|---|---|---|
limit | no | Maximum number of users to return. If not specified, defaults to 100. |
Response fields:
| Field | Required | Description |
|---|---|---|
user_ids | no | User IDs that currently have active configurations. |
{"signatures":{"go":"func (x *ConfiguratorClient) ListActiveUsers(ctx context.Context, req *configuratorv1.ListActiveUsersRequest) (*configuratorv1.ListActiveUsersResponse, error)","python":"list_active_users(req: configurator_pb2.ListActiveUsersRequest) -\u003e ListActiveUsersResponse","typescript":"listActiveUsers(req: MessageInitShape\u003c typeof tars_configurator_v1_configurator_pb.ListActiveUsersRequestSchema \u003e): Promise\u003cListActiveUsersResponse\u003e","cli":"tare api configurator active-users list","curl":"curl \"${AGENTROUTER_BASE_URL}/configurator/v1/active-users\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\""},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n\tconfiguratorv1 \"github.com/tetrateio/agentrouter-go/genapi/api/tars/configurator/v1\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\t// Populate the request fields -- see the \"Request fields\" table above for\n\t// the available fields and which are required.\n\treq := \u0026configuratorv1.ListActiveUsersRequest{}\n\n\tresp, err := client.Configurator().ListActiveUsers(ctx, req)\n\tif err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Printf(\"%+v\\n\", resp)\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/configurator/listactiveusers\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom tars.configurator.v1 import configurator_pb2\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Populate the request fields -- see the \"Request fields\" table above\n# for the available fields and which are required.\nreq = configurator_pb2.ListActiveUsersRequest()\ntry:\n result = client.configurator.list_active_users(req)\n print(result)\nexcept Exception as err:\n print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n# agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n baseUrl: process.env.AGENTROUTER_BASE_URL,\n apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Populate the request fields -- see the \"Request fields\" table above\n// for the available fields and which are required.\nconst req = {}\ntry {\n const result = await client.configurator.listActiveUsers(req)\n console.log(result)\n} catch (err) {\n console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n \"name\": \"configurator\",\n \"version\": \"0.1.0\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^20.0.0\",\n \"typescript\": \"^5.4.0\"\n }\n}\n"},{"name":"tsconfig.json","content":"{\n \"compilerOptions\": {\n \"target\": \"ES2020\",\n \"module\": \"ESNext\",\n \"moduleResolution\": \"bundler\",\n \"strict\": true,\n \"esModuleInterop\": true,\n \"skipLibCheck\": true\n }\n}\n"}]},"cli":"tare api configurator active-users list","curl":"curl \"${AGENTROUTER_BASE_URL}/configurator/v1/active-users\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\""},"persona":"Admin","httpVerb":"GET","httpPath":"/configurator/v1/active-users","slug":"list-active-users"}
List active providers
What it does: Returns a list of active (enabled) AI providers. Used for monitoring, debugging, and querying available provider configurations.
Request body: None.
Response fields:
| Field | Required | Description |
|---|---|---|
providers | no | Active (enabled) AI providers from the database. |
{"signatures":{"go":"func (x *ConfiguratorClient) ListActiveProviders(ctx context.Context, req *configuratorv1.ListActiveProvidersRequest) (*configuratorv1.ListActiveProvidersResponse, error)","python":"list_active_providers(req: configurator_pb2.ListActiveProvidersRequest) -\u003e ListActiveProvidersResponse","typescript":"listActiveProviders(req: MessageInitShape\u003c typeof tars_configurator_v1_configurator_pb.ListActiveProvidersRequestSchema \u003e): Promise\u003cListActiveProvidersResponse\u003e","cli":"tare api configurator active-providers list","curl":"curl \"${AGENTROUTER_BASE_URL}/configurator/v1/active-providers\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\""},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n\tconfiguratorv1 \"github.com/tetrateio/agentrouter-go/genapi/api/tars/configurator/v1\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\t// Populate the request fields -- see the \"Request fields\" table above for\n\t// the available fields and which are required.\n\treq := \u0026configuratorv1.ListActiveProvidersRequest{}\n\n\tresp, err := client.Configurator().ListActiveProviders(ctx, req)\n\tif err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Printf(\"%+v\\n\", resp)\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/configurator/listactiveproviders\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom tars.configurator.v1 import configurator_pb2\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Populate the request fields -- see the \"Request fields\" table above\n# for the available fields and which are required.\nreq = configurator_pb2.ListActiveProvidersRequest()\ntry:\n result = client.configurator.list_active_providers(req)\n print(result)\nexcept Exception as err:\n print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n# agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n baseUrl: process.env.AGENTROUTER_BASE_URL,\n apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Populate the request fields -- see the \"Request fields\" table above\n// for the available fields and which are required.\nconst req = {}\ntry {\n const result = await client.configurator.listActiveProviders(req)\n console.log(result)\n} catch (err) {\n console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n \"name\": \"configurator\",\n \"version\": \"0.1.0\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^20.0.0\",\n \"typescript\": \"^5.4.0\"\n }\n}\n"},{"name":"tsconfig.json","content":"{\n \"compilerOptions\": {\n \"target\": \"ES2020\",\n \"module\": \"ESNext\",\n \"moduleResolution\": \"bundler\",\n \"strict\": true,\n \"esModuleInterop\": true,\n \"skipLibCheck\": true\n }\n}\n"}]},"cli":"tare api configurator active-providers list","curl":"curl \"${AGENTROUTER_BASE_URL}/configurator/v1/active-providers\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\""},"persona":"Admin","httpVerb":"GET","httpPath":"/configurator/v1/active-providers","slug":"list-active-providers"}
Save BYOK backends
What it does: Saves BYOK provider backends configuration. Used by workers to persist BYOK backend metadata to database.
Request fields:
| Field | Required | Description |
|---|---|---|
user_id | no | User ID who owns these backends. |
key_address | no | Key address (owner identifier) for these backends. |
backends | no | List of provider backends to save. |
Response fields:
| Field | Required | Description |
|---|---|---|
configuration | no | Configuration that was saved. |
updated | no | Whether the configuration was created or updated. |
{"signatures":{"go":"func (x *ConfiguratorClient) SaveBYOKBackends(ctx context.Context, req *configuratorv1.SaveBYOKBackendsRequest) (*configuratorv1.SaveBYOKBackendsResponse, error)","python":"save_byok_backends(req: configurator_pb2.SaveBYOKBackendsRequest) -\u003e SaveBYOKBackendsResponse","typescript":"saveBYOKBackends(req: MessageInitShape\u003c typeof tars_configurator_v1_configurator_pb.SaveBYOKBackendsRequestSchema \u003e): Promise\u003cSaveBYOKBackendsResponse\u003e","cli":"tare api configurator byok-backends save","curl":"curl -X POST \"${AGENTROUTER_BASE_URL}/configurator/v1/byok-backends\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"user_id\": \"...\",\n \"key_address\": \"...\",\n \"backends\": []\n }'"},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n\tconfiguratorv1 \"github.com/tetrateio/agentrouter-go/genapi/api/tars/configurator/v1\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\t// Populate the request fields -- see the \"Request fields\" table above for\n\t// the available fields and which are required.\n\treq := \u0026configuratorv1.SaveBYOKBackendsRequest{}\n\n\tresp, err := client.Configurator().SaveBYOKBackends(ctx, req)\n\tif err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Printf(\"%+v\\n\", resp)\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/configurator/savebyokbackends\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom tars.configurator.v1 import configurator_pb2\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Populate the request fields -- see the \"Request fields\" table above\n# for the available fields and which are required.\nreq = configurator_pb2.SaveBYOKBackendsRequest()\ntry:\n result = client.configurator.save_byok_backends(req)\n print(result)\nexcept Exception as err:\n print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n# agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n baseUrl: process.env.AGENTROUTER_BASE_URL,\n apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Populate the request fields -- see the \"Request fields\" table above\n// for the available fields and which are required.\nconst req = {}\ntry {\n const result = await client.configurator.saveBYOKBackends(req)\n console.log(result)\n} catch (err) {\n console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n \"name\": \"configurator\",\n \"version\": \"0.1.0\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^20.0.0\",\n \"typescript\": \"^5.4.0\"\n }\n}\n"},{"name":"tsconfig.json","content":"{\n \"compilerOptions\": {\n \"target\": \"ES2020\",\n \"module\": \"ESNext\",\n \"moduleResolution\": \"bundler\",\n \"strict\": true,\n \"esModuleInterop\": true,\n \"skipLibCheck\": true\n }\n}\n"}]},"cli":"tare api configurator byok-backends save","curl":"curl -X POST \"${AGENTROUTER_BASE_URL}/configurator/v1/byok-backends\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"user_id\": \"...\",\n \"key_address\": \"...\",\n \"backends\": []\n }'"},"persona":"Admin","httpVerb":"POST","httpPath":"/configurator/v1/byok-backends","slug":"save-byok-backends"}
Delete BYOK backends
What it does: Deletes BYOK provider backends configuration. Used by workers to remove BYOK backend metadata from database.
Request fields:
| Field | Required | Description |
|---|---|---|
user_id | no | User ID who owns these backends. |
Response fields:
| Field | Required | Description |
|---|---|---|
deleted | no | Whether the configuration was deleted. |
{"signatures":{"go":"func (x *ConfiguratorClient) DeleteBYOKBackends(ctx context.Context, req *configuratorv1.DeleteBYOKBackendsRequest) (*configuratorv1.DeleteBYOKBackendsResponse, error)","python":"delete_byok_backends(req: configurator_pb2.DeleteBYOKBackendsRequest) -\u003e DeleteBYOKBackendsResponse","typescript":"deleteBYOKBackends(req: MessageInitShape\u003c typeof tars_configurator_v1_configurator_pb.DeleteBYOKBackendsRequestSchema \u003e): Promise\u003cDeleteBYOKBackendsResponse\u003e","cli":"tare api configurator byok-backends delete","curl":"curl -X DELETE \"${AGENTROUTER_BASE_URL}/configurator/v1/byok-backends/01H...\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\""},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n\tconfiguratorv1 \"github.com/tetrateio/agentrouter-go/genapi/api/tars/configurator/v1\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\t// Populate the request fields -- see the \"Request fields\" table above for\n\t// the available fields and which are required.\n\treq := \u0026configuratorv1.DeleteBYOKBackendsRequest{}\n\n\tresp, err := client.Configurator().DeleteBYOKBackends(ctx, req)\n\tif err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Printf(\"%+v\\n\", resp)\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/configurator/deletebyokbackends\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom tars.configurator.v1 import configurator_pb2\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Populate the request fields -- see the \"Request fields\" table above\n# for the available fields and which are required.\nreq = configurator_pb2.DeleteBYOKBackendsRequest()\ntry:\n result = client.configurator.delete_byok_backends(req)\n print(result)\nexcept Exception as err:\n print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n# agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n baseUrl: process.env.AGENTROUTER_BASE_URL,\n apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Populate the request fields -- see the \"Request fields\" table above\n// for the available fields and which are required.\nconst req = {}\ntry {\n const result = await client.configurator.deleteBYOKBackends(req)\n console.log(result)\n} catch (err) {\n console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n \"name\": \"configurator\",\n \"version\": \"0.1.0\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^20.0.0\",\n \"typescript\": \"^5.4.0\"\n }\n}\n"},{"name":"tsconfig.json","content":"{\n \"compilerOptions\": {\n \"target\": \"ES2020\",\n \"module\": \"ESNext\",\n \"moduleResolution\": \"bundler\",\n \"strict\": true,\n \"esModuleInterop\": true,\n \"skipLibCheck\": true\n }\n}\n"}]},"cli":"tare api configurator byok-backends delete","curl":"curl -X DELETE \"${AGENTROUTER_BASE_URL}/configurator/v1/byok-backends/01H...\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\""},"persona":"Admin","httpVerb":"DELETE","httpPath":"/configurator/v1/byok-backends/{user_id}","slug":"delete-byok-backends"}
Revoke user token
What it does: Revokes a user token by JTI. Used by workers in enterprise mode to revoke tokens when API keys are deleted.
Request fields:
| Field | Required | Description |
|---|---|---|
jti | no | JWT ID (JTI) of the token to revoke. |
user_id | no | User ID who owns the token being revoked. Used to populate revoked_by field. |
reason | no | Optional reason for revocation. |
Response fields:
| Field | Required | Description |
|---|---|---|
success | no | Whether the token was successfully revoked. |
revoked_at | no | When the token was revoked. |
{"signatures":{"go":"func (x *ConfiguratorClient) RevokeUserToken(ctx context.Context, req *configuratorv1.RevokeUserTokenRequest) (*configuratorv1.RevokeUserTokenResponse, error)","python":"revoke_user_token(req: configurator_pb2.RevokeUserTokenRequest) -\u003e RevokeUserTokenResponse","typescript":"revokeUserToken(req: MessageInitShape\u003c typeof tars_configurator_v1_configurator_pb.RevokeUserTokenRequestSchema \u003e): Promise\u003cRevokeUserTokenResponse\u003e","cli":"tare api configurator user-token revoke","curl":"curl -X POST \"${AGENTROUTER_BASE_URL}/configurator/v1/user-tokens/01H...:revoke\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"user_id\": \"...\",\n \"reason\": \"...\"\n }'"},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n\tconfiguratorv1 \"github.com/tetrateio/agentrouter-go/genapi/api/tars/configurator/v1\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\t// Populate the request fields -- see the \"Request fields\" table above for\n\t// the available fields and which are required.\n\treq := \u0026configuratorv1.RevokeUserTokenRequest{}\n\n\tresp, err := client.Configurator().RevokeUserToken(ctx, req)\n\tif err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Printf(\"%+v\\n\", resp)\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/configurator/revokeusertoken\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom tars.configurator.v1 import configurator_pb2\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Populate the request fields -- see the \"Request fields\" table above\n# for the available fields and which are required.\nreq = configurator_pb2.RevokeUserTokenRequest()\ntry:\n result = client.configurator.revoke_user_token(req)\n print(result)\nexcept Exception as err:\n print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n# agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n baseUrl: process.env.AGENTROUTER_BASE_URL,\n apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Populate the request fields -- see the \"Request fields\" table above\n// for the available fields and which are required.\nconst req = {}\ntry {\n const result = await client.configurator.revokeUserToken(req)\n console.log(result)\n} catch (err) {\n console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n \"name\": \"configurator\",\n \"version\": \"0.1.0\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^20.0.0\",\n \"typescript\": \"^5.4.0\"\n }\n}\n"},{"name":"tsconfig.json","content":"{\n \"compilerOptions\": {\n \"target\": \"ES2020\",\n \"module\": \"ESNext\",\n \"moduleResolution\": \"bundler\",\n \"strict\": true,\n \"esModuleInterop\": true,\n \"skipLibCheck\": true\n }\n}\n"}]},"cli":"tare api configurator user-token revoke","curl":"curl -X POST \"${AGENTROUTER_BASE_URL}/configurator/v1/user-tokens/01H...:revoke\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"user_id\": \"...\",\n \"reason\": \"...\"\n }'"},"persona":"Admin","httpVerb":"POST","httpPath":"/configurator/v1/user-tokens/{jti}:revoke","slug":"revoke-user-token"}
Submit dataplane upgrade credentials
What it does: Stores operator-provided registry credentials for a DATAPLANE_UPGRADE event parked in NeedsCredentials. Payload is KEK-envelope encrypted at MP and stored in dataplane_upgrade_credentials. Dashboard (admin) is the only caller.
Request fields:
| Field | Required | Description |
|---|---|---|
upgrade_event_id | no | Upgrade event id (the liaison_configuration_events.id whose metadata carries the trigger). Workspace claim must match. |
credentials | no | Operator-supplied registry credentials, one entry per required slot. |
persist_in_cluster | no | When true, the worker creates the in-cluster Secret WITHOUT an ownerReference back to the TarsUpgrade CR, and labels it tars.tetrate.ai/persistent=true. The Secret survives the upgrade so future upgrades and image pulls can reuse it. When false (the default), the Secret is short-lived: ownerRef cascade-deletes it when the CR is removed, and the orphan janitor sweeps after terminal phases. Operators who don't tick the form's "save for future upgrades" box get this. Either way, MP DELETEs the ciphertext row from dataplane_upgrade_credentials as soon as AckDataplaneUpgradeCredentials arrives — the secret material never sits in the MP DB after sync completes. |
Response fields:
| Field | Required | Description |
|---|---|---|
credentials_id | no | Echoes back the row id of the stored ciphertext for audit log correlation. |
success | no | True if the ciphertext row was stored successfully. |
{"signatures":{"go":"func (x *ConfiguratorClient) SubmitDataplaneUpgradeCredentials(ctx context.Context, req *configuratorv1.SubmitDataplaneUpgradeCredentialsRequest) (*configuratorv1.SubmitDataplaneUpgradeCredentialsResponse, error)","python":"submit_dataplane_upgrade_credentials(req: configurator_pb2.SubmitDataplaneUpgradeCredentialsRequest) -\u003e SubmitDataplaneUpgradeCredentialsResponse","typescript":"submitDataplaneUpgradeCredentials(req: MessageInitShape\u003c typeof tars_configurator_v1_configurator_pb.SubmitDataplaneUpgradeCredentialsRequestSchema \u003e): Promise\u003cSubmitDataplaneUpgradeCredentialsResponse\u003e","cli":"tare api configurator dataplane-upgrade-credentials submit","curl":"curl -X POST \"${AGENTROUTER_BASE_URL}/configurator/v1/dataplane-upgrade-credentials\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"upgrade_event_id\": \"...\",\n \"credentials\": [],\n \"persist_in_cluster\": false\n }'"},"examples":{"go":{"files":[{"name":"main.go","content":"// Command example is a runnable example for the AgentRouter Go SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then `go run .`.\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\tagentrouter \"github.com/tetrateio/agentrouter-go\"\n\tconfiguratorv1 \"github.com/tetrateio/agentrouter-go/genapi/api/tars/configurator/v1\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\n\tclient, err := agentrouter.New(ctx,\n\t\tagentrouter.WithBaseURL(os.Getenv(\"AGENTROUTER_BASE_URL\")),\n\t\tagentrouter.WithAPIKey(os.Getenv(\"AGENTROUTER_API_KEY\")),\n\t)\n\tif err != nil {\n\t\tlog.Fatalf(\"client: %v\", err)\n\t}\n\n\t// Populate the request fields -- see the \"Request fields\" table above for\n\t// the available fields and which are required.\n\treq := \u0026configuratorv1.SubmitDataplaneUpgradeCredentialsRequest{}\n\n\tresp, err := client.Configurator().SubmitDataplaneUpgradeCredentials(ctx, req)\n\tif err != nil {\n\t\tlog.Fatalf(\"call: %v\", err)\n\t}\n\n\tfmt.Printf(\"%+v\\n\", resp)\n}\n"},{"name":"go.mod","content":"module github.com/tetrateio/agentrouter-go-examples/configurator/submitdataplaneupgradecredentials\n\ngo 1.26\n\nrequire github.com/tetrateio/agentrouter-go v0.1.1\n\n// Point this at the directory you extracted the downloaded Go SDK tarball into.\n// The directory name matches the tarball stem on the Download SDK page.\nreplace github.com/tetrateio/agentrouter-go =\u003e ./third_party/agentrouter-go-0.1.1\n"}]},"python":{"files":[{"name":"main.py","content":"\"\"\"Runnable example for the AgentRouter Python SDK.\n\nSet AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `python main.py`.\n\"\"\"\nimport os\n\nfrom tars.configurator.v1 import configurator_pb2\n\nfrom agentrouter_sdk import Client\n\nclient = Client(\n base_url=os.environ[\"AGENTROUTER_BASE_URL\"],\n api_key=os.environ[\"AGENTROUTER_API_KEY\"],\n)\n\n# Populate the request fields -- see the \"Request fields\" table above\n# for the available fields and which are required.\nreq = configurator_pb2.SubmitDataplaneUpgradeCredentialsRequest()\ntry:\n result = client.configurator.submit_dataplane_upgrade_credentials(req)\n print(result)\nexcept Exception as err:\n print(\"Error:\", err)\n"},{"name":"requirements.txt","content":"# Point this at the directory you extracted the downloaded Python SDK tarball\n# into. The directory name matches the tarball stem on the Download SDK page.\n# To install instead from PyPI once published, replace the line below with:\n# agentrouter-sdk\u003e=0.1.0\nagentrouter-sdk @ file:./third_party/agentrouter-python-0.1.1\n"}]},"typescript":{"files":[{"name":"index.ts","content":"// Runnable example for the AgentRouter TypeScript SDK.\n// Set AGENTROUTER_BASE_URL and AGENTROUTER_API_KEY in the environment, then run `npm install \u0026\u0026 npx tsx index.ts`.\nimport { Client } from '@tetrate/agentrouter-sdk'\n\nconst client = new Client({\n baseUrl: process.env.AGENTROUTER_BASE_URL,\n apiKey: process.env.AGENTROUTER_API_KEY,\n})\n\n// Populate the request fields -- see the \"Request fields\" table above\n// for the available fields and which are required.\nconst req = {}\ntry {\n const result = await client.configurator.submitDataplaneUpgradeCredentials(req)\n console.log(result)\n} catch (err) {\n console.error('Error:', err)\n}\n"},{"name":"package.json","content":"{\n \"name\": \"configurator\",\n \"version\": \"0.1.0\",\n \"private\": true,\n \"type\": \"module\",\n \"dependencies\": {\n \"@tetrate/agentrouter-sdk\": \"file:./third_party/agentrouter-typescript-0.1.1\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^20.0.0\",\n \"typescript\": \"^5.4.0\"\n }\n}\n"},{"name":"tsconfig.json","content":"{\n \"compilerOptions\": {\n \"target\": \"ES2020\",\n \"module\": \"ESNext\",\n \"moduleResolution\": \"bundler\",\n \"strict\": true,\n \"esModuleInterop\": true,\n \"skipLibCheck\": true\n }\n}\n"}]},"cli":"tare api configurator dataplane-upgrade-credentials submit","curl":"curl -X POST \"${AGENTROUTER_BASE_URL}/configurator/v1/dataplane-upgrade-credentials\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"upgrade_event_id\": \"...\",\n \"credentials\": [],\n \"persist_in_cluster\": false\n }'"},"persona":"Admin","httpVerb":"POST","httpPath":"/configurator/v1/dataplane-upgrade-credentials","slug":"submit-dataplane-upgrade-credentials"}
Cancel dataplane upgrade
What it does: Emits a pending UPGRADE_CANCEL event against the workspace. The liaison worker picks it up via the normal ListPendingEvents poll, matches the in-flight TarsUpgrade CR by name (= upgrade_event_id), and patches spec.cancel so the running Job initiates helm --atomic rollback at its next 5s poll tick. Idempotent: a no-op when the CR already has spec.cancel=true or has reached a terminal phase.
Request fields:
| Field | Required | Description |
|---|---|---|
upgrade_event_id | no | Upgrade event id whose in-flight CR should be cancelled. |
Response fields:
| Field | Required | Description |
|---|---|---|
success | no | undocumented |
{"signatures":{"go":"c.Configurator().CancelDataplaneUpgrade(ctx, \u0026configuratorv1.CancelDataplaneUpgradeRequest{...})","python":"client.configurator.canceldataplaneupgrade(...)","typescript":"client.configurator.canceldataplaneupgrade({...})","cli":"tare api configurator dataplane-upgrade cancel","curl":"curl -X POST \"${AGENTROUTER_BASE_URL}/configurator/v1/dataplane-upgrade/cancel\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"upgrade_event_id\": \"...\"\n }'"},"examples":{"go":"// No Go SDK wrapper for ConfiguratorService yet -- use the CLI or curl example below.","python":"# No Python SDK wrapper for ConfiguratorService yet -- use the CLI or curl example below.","typescript":"// No TypeScript SDK wrapper for ConfiguratorService yet -- use the CLI or curl example below.","cli":"tare api configurator dataplane-upgrade cancel","curl":"curl -X POST \"${AGENTROUTER_BASE_URL}/configurator/v1/dataplane-upgrade/cancel\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"upgrade_event_id\": \"...\"\n }'"},"persona":"Admin","httpVerb":"POST","httpPath":"/configurator/v1/dataplane-upgrade/cancel","slug":"cancel-dataplane-upgrade"}
Rollback dataplane upgrade
What it does: Emits a pending UPGRADE_ROLLBACK event against the workspace. Operator-initiated post-Completed rollback: dashboard shows a Rollback button after a successful upgrade so the operator can return to the prior helm revision (e.g. they want to unwind a release that's behaving badly under real traffic). Worker spawns a new rollback Job that runs helm rollback tars <prev-revision> --wait --atomic. The new event becomes the latest dataplane-upgrade view so the dashboard renders the in-flight rollback through phase RollingBack → RolledBack.
Request fields:
| Field | Required | Description |
|---|---|---|
upgrade_event_id | no | Upgrade event id of the completed upgrade being rolled back. Used for audit + display ("rollback of upgrade <id>") and so the worker can resolve the workspace + target revision from the original event metadata. |
Response fields:
| Field | Required | Description |
|---|---|---|
success | no | undocumented |
rollback_event_id | no | Event id of the new rollback event. The dashboard polls this id to watch the rollback Job progress. |
{"signatures":{"go":"c.Configurator().RollbackDataplaneUpgrade(ctx, \u0026configuratorv1.RollbackDataplaneUpgradeRequest{...})","python":"client.configurator.rollbackdataplaneupgrade(...)","typescript":"client.configurator.rollbackdataplaneupgrade({...})","cli":"tare api configurator dataplane-upgrade rollback","curl":"curl -X POST \"${AGENTROUTER_BASE_URL}/configurator/v1/dataplane-upgrade/rollback\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"upgrade_event_id\": \"...\"\n }'"},"examples":{"go":"// No Go SDK wrapper for ConfiguratorService yet -- use the CLI or curl example below.","python":"# No Python SDK wrapper for ConfiguratorService yet -- use the CLI or curl example below.","typescript":"// No TypeScript SDK wrapper for ConfiguratorService yet -- use the CLI or curl example below.","cli":"tare api configurator dataplane-upgrade rollback","curl":"curl -X POST \"${AGENTROUTER_BASE_URL}/configurator/v1/dataplane-upgrade/rollback\" \\\n -H \"Authorization: Bearer ak-${AGENTROUTER_API_KEY}\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"upgrade_event_id\": \"...\"\n }'"},"persona":"Admin","httpVerb":"POST","httpPath":"/configurator/v1/dataplane-upgrade/rollback","slug":"rollback-dataplane-upgrade"}