Skip to content

ts ai agent

Enable or disable a stored agent definition. ts ai agents lists the agent definitions stored in this server's database.

Usage

text
ts ai agents [--csv] [--no-trunc]
ts ai agent set <id> enabled true|false

Description

ts ai agents lists stored agent definitions only — rows in this server's configuration, typically seeded or synced from an upstream source. Agents compiled into the server and agents supplied by application manifests are not stored rows, so they do not appear here. A short list, or no list at all, therefore does not mean the server has few agents available; it means few agents have a stored definition. When nothing is stored the command says so explicitly rather than printing an empty table.

The complete picture — compiled, manifest, and stored definitions merged into what agents can actually run — is the effective catalog, served by the API at /api/agent-catalog. ts has no command for it, and that endpoint is reachable only with a service scope, not with an administrator login. To see the effective catalog, use the Administration site under Intelligence → Agents.

Rows are ordered by definition id. ID is that definition id, the stable string name the agent is referenced by, not a GUID. VERSION is the definition's version, which is how you tell whether a synced agent is current. ORIGIN is local for a definition authored on this server, or the federation sync state — Synced, Conflicted, Unsupported — for one that arrived from an upstream source; Conflicted is worth following up on, because it means the local row and the upstream definition disagree. Run with --format=json if you also need the row's GUID, its published flag, or the last-updated timestamp.

Enablement Is The Whole Surface

ts ai agent set <id> enabled true|false is the only write, and it is the only write anywhere. Agent definition JSON cannot be authored from ts, and the Administration site cannot author one either — a definition arrives by federation or by seeding. So there is no create, no edit, and no delete to look for; toggling a stored row on or off is the entire administrative surface for an agent.

The <id> is the definition id, the ID column of ts ai agents — not a GUID, and not a display name. There is no name resolution here and no print form: ts ai agent <id> on its own is a usage error, because set is the only action.

Because only stored rows can be toggled, an id that exists solely in the effective catalog — compiled into the server, or supplied by a manifest — has nothing to write to and the command reports that it has no stored definition row. That is the same distinction the listing draws, seen from the write side.

Changes are recorded in the audit log as FederatedContentEnablementChanged, with ai/agent as the content kind.

Options

FlagDescriptionDefault/ValuesNotes
--csvTab-separated output, nothing truncated.ts ai agents only.
--no-truncDo not truncate columns.ts ai agents only.

Examples

bash
# Which agents have a stored definition here?
ts ai agents

# Full definition ids, nothing clipped
ts ai agents --no-trunc

# With row ids and timestamps, for a script
ts ai agents --format=json

# Turn a stored agent off
ts ai agent set code-review enabled false

# And back on
ts ai agent set code-review enabled true

# Compare stored definitions across two servers
ts ai agents --csv > agents.tsv
bash
# An empty result is not an empty catalog — compiled and manifest agents
# never appear here, and cannot be toggled here either. Check
# Intelligence → Agents in the Administration site for what can actually run.
ts ai agents

Output

text
ID              VERSION  ENABLED  ORIGIN
code-review     3        yes      Synced
release-notes   1        no       local

Exit Codes

0 on success, including when no stored definitions exist. -1 when the property is not enabled, or when the value is not true or false. -2 when the command is not a well-formed set <id> enabled <value> — including ts ai agent <id> with no action. -3 when the server cannot be reached. -4 when no account is signed in or the ticket has expired. -5 when the account is not a Server Administrator. -6 when the id has no stored definition row.