@laburen/delta-cli 0.2.0-canary.20 → 0.2.0-canary.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/agent-checks.js +10 -3
- package/dist/commands/agent-checks.js.map +1 -1
- package/dist/commands/agent-run/body.d.ts +4 -2
- package/dist/commands/agent-run/body.js +11 -7
- package/dist/commands/agent-run/body.js.map +1 -1
- package/dist/commands/agent-run.d.ts +27 -0
- package/dist/commands/agent-run.js +11 -10
- package/dist/commands/agent-run.js.map +1 -1
- package/dist/commands/agent-send-message.d.ts +10 -0
- package/dist/commands/agent-send-message.js +134 -0
- package/dist/commands/agent-send-message.js.map +1 -0
- package/dist/commands/agent-tools/add.js +2 -1
- package/dist/commands/agent-tools/add.js.map +1 -1
- package/dist/commands/agent-tools/remove.js +2 -1
- package/dist/commands/agent-tools/remove.js.map +1 -1
- package/dist/commands/agent-tools/shared.d.ts +38 -14
- package/dist/commands/agent-tools/shared.js +17 -0
- package/dist/commands/agent-tools/shared.js.map +1 -1
- package/dist/errors.js +29 -12
- package/dist/errors.js.map +1 -1
- package/dist/generated/commands.js +3 -3
- package/dist/generated/commands.js.map +1 -1
- package/dist/generated/schemas.d.ts +8 -0
- package/dist/generated/schemas.js +19 -6
- package/dist/generated/schemas.js.map +1 -1
- package/dist/operations/schema-flag.d.ts +1 -0
- package/dist/operations/schema-flag.js +5 -2
- package/dist/operations/schema-flag.js.map +1 -1
- package/dist/program.js +2 -0
- package/dist/program.js.map +1 -1
- package/docs/SKILL.md +5 -4
- package/docs/references/commands.md +62 -9
- package/docs/references/output-and-errors.md +9 -5
- package/package.json +2 -2
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import { OPERATION_SCHEMAS } from "../generated/schemas.js";
|
|
1
|
+
import { OPERATION_SCHEMAS, WEBHOOK_SCHEMAS } from "../generated/schemas.js";
|
|
2
2
|
/** Lo que imprime `--schema`: cómo se llama el comando, sus ids y los JSON Schema de lo que manda y de lo que vuelve. */
|
|
3
3
|
export function commandSchema(op) {
|
|
4
4
|
const schemas = OPERATION_SCHEMAS[op.id];
|
|
5
|
-
|
|
5
|
+
const out = {
|
|
6
6
|
command: op.path.join(" "),
|
|
7
7
|
positionals: op.positionals,
|
|
8
8
|
body: schemas?.body ?? null,
|
|
9
9
|
response: schemas?.response ?? null,
|
|
10
10
|
};
|
|
11
|
+
// Un comando con `webhook_url` en el body (`send-message`) también imprime los eventos que llegan a esa URL.
|
|
12
|
+
const properties = schemas?.body?.properties;
|
|
13
|
+
return properties && "webhook_url" in properties ? { ...out, webhooks: WEBHOOK_SCHEMAS } : out;
|
|
11
14
|
}
|
|
12
15
|
//# sourceMappingURL=schema-flag.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-flag.js","sourceRoot":"","sources":["../../src/operations/schema-flag.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"schema-flag.js","sourceRoot":"","sources":["../../src/operations/schema-flag.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE7E,yHAAyH;AACzH,MAAM,UAAU,aAAa,CAAC,EAAyD;IAOtF,MAAM,OAAO,GAAG,iBAAiB,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IACzC,MAAM,GAAG,GAAG;QACX,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;QAC1B,WAAW,EAAE,EAAE,CAAC,WAAW;QAC3B,IAAI,EAAE,OAAO,EAAE,IAAI,IAAI,IAAI;QAC3B,QAAQ,EAAE,OAAO,EAAE,QAAQ,IAAI,IAAI;KACnC,CAAC;IACF,6GAA6G;IAC7G,MAAM,UAAU,GAAI,OAAO,EAAE,IAAwD,EAAE,UAAU,CAAC;IAClG,OAAO,UAAU,IAAI,aAAa,IAAI,UAAU,CAAC,CAAC,CAAC,EAAE,GAAG,GAAG,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;AAChG,CAAC"}
|
package/dist/program.js
CHANGED
|
@@ -4,6 +4,7 @@ import { Command, CommanderError, Option } from "commander";
|
|
|
4
4
|
import { registerAgentChecks, registerVersionNotices } from "./commands/agent-checks.js";
|
|
5
5
|
import { registerAgentFollowUpsCommand } from "./commands/agent-follow-ups.js";
|
|
6
6
|
import { registerAgentRunCommand } from "./commands/agent-run.js";
|
|
7
|
+
import { registerAgentSendMessageCommand } from "./commands/agent-send-message.js";
|
|
7
8
|
import { registerAgentToolCommands } from "./commands/agent-tools.js";
|
|
8
9
|
import { registerAuthCommands } from "./commands/auth.js";
|
|
9
10
|
import { registerCompletionCommand } from "./commands/completion.js";
|
|
@@ -90,6 +91,7 @@ export function buildProgram(ctx, authDeps = {}, orgDeps = {}, prompter = clackP
|
|
|
90
91
|
registerAgentToolCommands(program, ctx, { fetch: authDeps.fetch, prompter });
|
|
91
92
|
registerAgentRunCommand(program, ctx, { fetch: authDeps.fetch, prompter });
|
|
92
93
|
registerAgentFollowUpsCommand(program, ctx, { fetch: authDeps.fetch, prompter });
|
|
94
|
+
registerAgentSendMessageCommand(program, ctx, { fetch: authDeps.fetch, prompter });
|
|
93
95
|
registerAuthCommands(program, ctx, authDeps);
|
|
94
96
|
registerOrgCommands(program, ctx, { fetch: authDeps.fetch, ...orgDeps, prompter });
|
|
95
97
|
registerWhoamiCommand(program, ctx, { fetch: authDeps.fetch });
|
package/dist/program.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"program.js","sourceRoot":"","sources":["../src/program.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,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CAAC,cAAc,GAAG,IAAI,CAAC;QAC5F,MAAM,QAAQ,GAAG,UAAU,CAAC,GAAG,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;QACpD,UAAU,CAAC,GAAG,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;QAChC,OAAO,QAAQ,CAAC,QAAQ,CAAC;IAC1B,CAAC;YAAS,CAAC;QACV,yFAAyF;QACzF,iBAAiB,CAChB,GAAG,EACH,OAAO,EACP,GAAG,EAAE,CAAC,WAAW,EAAE,EACnB,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,EAAe,CAAC,YAAY,CAC9C,CAAC;IACH,CAAC;IACD,MAAM,IAAI,GAAG,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACrC,iHAAiH;IACjH,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;QAC9E,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,EAAe,CAAC;QAC1C,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC3C,MAAM,cAAc,CACnB,GAAG,EACH,IAAI,EACJ,gBAAgB,CAAC,GAAG,EAAE,KAAK,CAAC,YAAY,CAAC,EACzC,WAAW,EAAE,EACb,IAAI,CAAC,KAAK,CACV,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC"}
|
package/docs/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: laburen-cli
|
|
3
|
-
description: Use the `laburen` CLI to create, run and operate Laburen agents, skills, MCP connections, website chat widgets, threads (conversations), follow-ups and API tokens from the terminal, without the dashboard. Use when a task says "create an agent", "run or test an agent", "add a tool", "upload a skill", "connect an MCP", "version or activate an agent", "put the agent on a website", "add a chat widget", "create a thread or conversation", "store messages before a turn", "simulate a follow-up", "test the follow-up of an agent", or "create the worker token".
|
|
3
|
+
description: Use the `laburen` CLI to create, run and operate Laburen agents, skills, MCP connections, website chat widgets, threads (conversations), follow-ups and API tokens from the terminal, without the dashboard. Use when a task says "create an agent", "run or test an agent", "add a tool", "upload a skill", "connect an MCP", "version or activate an agent", "put the agent on a website", "add a chat widget", "create a thread or conversation", "store messages before a turn", "simulate a follow-up", "send a message and get the answer at a webhook", "test the follow-up of an agent", or "create the worker token".
|
|
4
4
|
metadata:
|
|
5
5
|
package: "@laburen/delta-cli"
|
|
6
6
|
---
|
|
@@ -51,7 +51,8 @@ Tool rules the API enforces (the wizard and `--schema` already follow them): eve
|
|
|
51
51
|
- `laburen agents widgets create <agent_id> --name <name>` puts the agent on a website: the response has the snippet ready to paste (`web_widget_script`), an `embed_iframe` and a `standalone_url` to try it. It also returns `identity_secret` **once** (same for `agents widgets rotate`): save it for the site's backend, which signs the visitor identity token with it. Details, flags and identifying visitors: [Commands](references/commands.md#widgets).
|
|
52
52
|
- `laburen threads create --agent-id <agent_id>` opens a conversation before any turn, with metadata, stored messages (`user` or `assistant`) or a link to an existing WhatsApp, CRM or Chatwoot conversation (`--channel`). Storing messages does not run the agent: run it after with `laburen agents run <agent_id> --thread <thread_id> "<message>"`. The response has `created`: `false` when it found the existing conversation of a channel (calling again appends the `messages` again). `threads get` needs `read`, the others `write`; `threads update` without metadata and without `--ai-enabled` / `--no-ai-enabled` changes nothing. `threads update <thread_id> --ai-enabled` turns the AI back on after a handoff to a human (`--no-ai-enabled` turns it off); on `chatwoot` and `crm` threads it fails with `ai_status_managed_by_channel` because Chatwoot manages it there. Replies of `agents run` on a channel thread do not go through the channel, and the model sees only the last `config.history.exchanges` exchanges (default 12, 1 to 30). Details and errors: [Commands](references/commands.md#threads).
|
|
53
53
|
- `laburen decisions create --state <text|json|@file> --questions <json|@file>` asks a decision model questions about a state (text, files and JSON) and returns one answer per question, without running an agent; `laburen decisions get <decision_id>` reads a saved decision (also the ones of an agent's input guardrail: its `state` is the end customer's message, and its `file` parts have no `url`; the guardrail also evaluates the attachments of the last message, each model only the types it reads) and `laburen decisions list` lists them, newest first (`--thread-id`, `--agent-id`, `--feature`). The ids of the guardrail decisions of a turn are in `guardrail.decision_ids` of `agents run --json`. A `score` answer is a weighted average of the indexes of `criteria` and can be fractional (`1.6`): round it to read one level. `error_code` says why a decision has `answers: null`; a `decisions create` that fails after the model call saves the decision and the error carries `details.decision_id`. `create` returns fewer fields than `get` (no `state`, `questions`, `feature`, `error_code`): read them with `decisions get`. `create` needs `query`, `get` and `list` need `read`. The API validates the rules; see [Decisions](references/commands.md#decisions).
|
|
54
|
-
- `laburen agents
|
|
54
|
+
- `laburen agents send-message <agent_id> "Hi" --webhook-url https://example.com/hook` (the message, `--thread`, `--resource` and `--file` work as in `agents run`) is the asynchronous way to talk to an agent: it answers at once with `queued_message` (`message_id` and `memory.thread`) and the answer comes later as a POST to your `--webhook-url`, with the header `X-Laburen-Event`: `agent.response` (body: the same `agent_run` as `agents run --json`) or `agent.error` (body: `{ type, error, request_id }`, the API error); both bodies add `message_ids`, the ids of the customer messages the turn answers (`message_id` in `agent.response` is the id of the agent's reply, not of those). `agent.error` also carries `x-should-retry`, and every webhook a `request-id` to give to support. If the agent has `inbound.debounce_ms`, it waits that long and answers the messages that arrived with one turn. It only accepts conversations created through the API (`thread_channel_mismatch` otherwise). `agents run` and `threads create` never wait, even with `inbound`. In one conversation use only one way: `agents run` (immediate) or `agents send-message` (queued); mixing them gives two separate answers. `reply.split` (`off` = each channel's default, `on`, `on_except_whatsapp`; WhatsApp through Chatwoot or a CRM counts as WhatsApp) sets how channels and the widget send the answer. Details and errors: [Commands](references/commands.md#send-a-message).
|
|
55
|
+
- `laburen agents follow-ups run <agent_id> --thread <thread_id>` simulates the follow-up of an agent (what it writes to a customer who stopped answering, set in `follow_up` of the config) on a disposable copy of a conversation (or on one you write with `--messages @messages.json`, a list of `{"role","parts":[{"type":"text","text"}]}`: text only, and `created_at` on all the messages or on none; without dates the filter reads 0 hours since the last customer message) and sends nothing. Needs `query` (`--drafts` needs `write`). The tools run for real and it costs credits. `--mode decider|agent|both`, `--step`, `--version-id` and `--environment evals` shape it. Details and errors: [Commands](references/commands.md#follow-ups).
|
|
55
56
|
- `laburen tokens create` returns the secret once, in `value`. Save it right away. Revoked tokens stay in `tokens list` (there is no `tokens delete`). `tokens update <token_id> --description null` clears the description.
|
|
56
57
|
|
|
57
58
|
### Facts that are easy to get wrong
|
|
@@ -79,7 +80,7 @@ Tool rules the API enforces (the wizard and `--schema` already follow them): eve
|
|
|
79
80
|
- **`credits_exhausted`** (exit 1, API code `402`): the organization has no credits left, or no active credits at all. Only running fails (`agents run`, `agents follow-ups run`, `decisions create`, and agents in production stop answering); creating, updating, reading and deleting still work. Not retryable: tell the user to buy credits from the Laburen dashboard.
|
|
80
81
|
- **`model_provider_auth_failed`**: the model provider rejected the platform's credentials, even after the platform tried its fallback models. It is not your request and not retryable; if it persists, contact support.
|
|
81
82
|
- **Fallback models**: in production a turn (also the agent turn of `agents follow-ups run`) can be answered by a fallback model when the chosen one fails; the cost is that of the model that answered. In evals there is no fallback.
|
|
82
|
-
- **`model_context_exceeded`** (400, not retryable): the conversation (history, attachments and instructions) does not fit the context window of the model (in `
|
|
83
|
+
- **`model_context_exceeded`** (400, not retryable): the conversation (history, attachments and instructions) does not fit the context window of the model (in `decisions create`, the state). Running it again fails the same way. In `agents run` and `agents follow-ups run` the `next` is `laburen models list` (a model with a larger `context_window` for the agent); in `decisions create` send a smaller state (the `next` is `laburen decisions get <decision_id>`). The filter of a follow-up uses a decision model, not one of `models list`: a conversation that does not fit it fails with `invalid_request` and `details.reason` `conversation_over_limit`.
|
|
83
84
|
- **`internal_invariant_violation`**: a bug on the server (500). Keep the `request_id` and report it; changing the request does not fix it.
|
|
84
85
|
- **`idempotency_key_in_progress`**: it comes after a slow or failed first attempt that the CLI retried: that first request is still running on the server and may still apply. Do not rerun the command as it is: a rerun sends a new request (a new key) and can duplicate. Wait, then check with `list`/`get` that the first one did not apply (the `next` is that `list` for a create or update; `agents run` has none), and only then run it again. The same goes for `threads create` without `--channel` (no `next`); with `--channel` it finds the same thread, so its `next` is to run it again after waiting.
|
|
85
86
|
|
|
@@ -94,7 +95,7 @@ Both create a new version and neither activates it unless you ask. They differ i
|
|
|
94
95
|
- `agents update <agent_id> --config @patch.json` **edits**: it starts from the latest version and replaces only the config keys you send (`{"prompt":[{"type":"text","content":"New prompt"}]}` changes the prompt and keeps the model, tools and the rest). Each top-level key is replaced whole, with no deep merge: `{"knowledge":{"project_ids":[]}}` drops `knowledge.mode`. `--skills` and `--mcp-connections` replace the whole list and also create a version. With only `--name` or `--description` no version is created.
|
|
95
96
|
- `agents versions create <agent_id> --config @config.json` **writes the whole version**: a key you omit goes back to its default, and there are no skills or MCP connections unless you send them. Use it with a full config (start from `--skeleton`).
|
|
96
97
|
|
|
97
|
-
**Warning:** `agents update --config`, `agents tools add` and `agents
|
|
98
|
+
**Warning:** `agents update --config`, `agents tools add`, `agents tools remove` and `agents versions create` (when you send what you want it to keep) start from the **latest** version, not the active one. If the latest is an inactive draft, the new version carries the draft's changes, and the active version's tools are lost if only the active one had them. When that happens the response has a warning `includes_unpublished_changes` (`Warning: ...` on stderr) with `active_version_id` and `changed_fields_from_active` (what the new version changes compared with the active one, not with the draft), and the CLI prints `Compare every change against the active version with: laburen agents versions compare <agent_id> --from <active_version_id> --to <version_id>`. It also appears with `--activate`. There is no warning when the agent has no active version, when the latest is the active one, or when the new version equals the active one. Before activating a version, compare the active one against it with that command. Deleting the latest version frees its number, and the next version reuses it (the number is the highest that exists plus one).
|
|
98
99
|
|
|
99
100
|
When the new version stays inactive, both print `Created version <n> (not active). Activate it with: laburen agents versions activate <agent_id> <version_id>` on stderr, also with `--json`. Pass `--activate` to activate it right away.
|
|
100
101
|
|
|
@@ -75,7 +75,22 @@ laburen agents update <agent_id> --config '{"prompt":[{"type":"text","content":"
|
|
|
75
75
|
laburen agents versions create <agent_id> --config @full-config.json --skills '[{"skill_id":"<skill_id>"}]' # everything the version has comes from here
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
`follow_up` is one more top-level key of the config (what the agent writes to a customer who stopped answering: `enabled`, `steps`, `quiet_hours`, `decider`, `reasons`, `instructions`, `model`; only on WhatsApp, Instagram, Chatwoot and CRM). Like the others it is replaced whole, and `--config '{"follow_up":null}'` takes it out. The rules: 1 to 3 `steps`; each `delay_hours` is at least 1 (decimals are fine) and they add up to less than 24 hours; step 1 counts from the last customer message and the next ones from the previous follow-up; `quiet_hours` has hours 0 to 23 in `timezone` (`end` is not included; `start` greater than `end`, like 22 to 6, crosses midnight; `start` equal to `end` means no quiet hours); each item of `reasons` is `{ "id", "category", "description" }` (all three required; `id` unique in the list, `description` up to 500 characters) and lives inside one of 10 categories, which send the follow-up (`open_question`, `cold_lead`, `objection`, `awaiting_confirmation`, `other_send`) or do not (`already_resolved`, `not_interested`, `asked_to_wait`, `conversation_closed`, `other_skip`). Defaults: `enabled` `false`, one step at 3 hours, quiet hours 0 to 6 in `America/Argentina/Cordoba`, `decider` off with `model` `
|
|
78
|
+
`follow_up` is one more top-level key of the config (what the agent writes to a customer who stopped answering: `enabled`, `steps`, `quiet_hours`, `decider`, `reasons`, `instructions`, `model`; only on WhatsApp, Instagram, Chatwoot and CRM). Like the others it is replaced whole, and `--config '{"follow_up":null}'` takes it out. The rules: 1 to 3 `steps`; each `delay_hours` is at least 1 (decimals are fine) and they add up to less than 24 hours; step 1 counts from the last customer message and the next ones from the previous follow-up; `quiet_hours` has hours 0 to 23 in `timezone` (`end` is not included; `start` greater than `end`, like 22 to 6, crosses midnight; `start` equal to `end` means no quiet hours); each item of `reasons` is `{ "id", "category", "description" }` (all three required; `id` unique in the list, `description` up to 500 characters) and lives inside one of 10 categories, which send the follow-up (`open_question`, `cold_lead`, `objection`, `awaiting_confirmation`, `other_send`) or do not (`already_resolved`, `not_interested`, `asked_to_wait`, `conversation_closed`, `other_skip`). Defaults: `enabled` `false`, one step at 3 hours, quiet hours 0 to 6 in `America/Argentina/Cordoba`, `decider` off with `model` `"jev-1.14.0"` and `share_with_agent` `true`, no `reasons`; without `model`, the follow-up turns use the model of the version. `model` is an object like `config.model`: `{"id":"<model_id>","reasoning_effort":"low"}` (`reasoning_effort` optional), not a plain id. `decider.model` is the other way around: a plain id of a decision model, `"jev-1.14.0"` or `"gemini-decision-1"` (the ones of `decisions create`), because the filter is not an LLM: it picks one option among the `reasons` and the 10 categories and writes no text; `decider.prompt` is the criteria it picks with. When you save, the question of the filter must fit its model, even with the filter off: up to 245 `reasons` (255 options with the 10 categories), no reason `id` named like a category, with `gemini-decision-1` each reason `id` 1 to 128 characters without spaces at the start or end, and the criteria plus the reasons within the question token limit of the model; otherwise a 400 `invalid_agent_config` with `details.field` like `config.follow_up.reasons[0].id` (the reason that does not fit) or `config.follow_up.decider` (the tokens). Edit it with `--config @config.json`: it is too long for a flag. `laburen agents create --skeleton` shows its shape, and to try it without waiting for a customer, see [Follow-ups](#follow-ups).
|
|
79
|
+
|
|
80
|
+
`inbound` and `reply` are two more top-level keys of the config, and they decide how messages come in and how the answer goes out. Like the others they are replaced whole, and `--config '{"inbound":null}'` (or `"reply":null`) takes them out.
|
|
81
|
+
|
|
82
|
+
- `inbound.debounce_ms` (0 to 60000, no default: without `inbound` there is no wait) is how many milliseconds the agent waits after the last message of the customer before it runs one turn with all the messages that arrived. `0` is no wait, and an empty `"inbound":{}` means the same: queue without waiting (`debounce_ms` 0, `queue_mode` `collect`). `inbound.queue_mode` is what happens to a message that arrives while a turn is running; the only value is `collect` (it joins the next turn). Both only act where messages are queued: on `agents send-message` (see [Send a message](#send-a-message)), on the channels (WhatsApp, Instagram, Chatwoot, CRM) and on the chat widget. `agents run`, the `stream` of the API and `threads create` ignore them and run right away, with or without `inbound`.
|
|
83
|
+
- `reply.split` has three values and defaults to `"off"`: `off` (each channel's default), `on` (the answer goes out as several messages, bubbles, with a pause between them that depends on the channel, on every channel) and `on_except_whatsapp` (bubbles everywhere except WhatsApp, where the answer goes out as one message). The channel is the contact's real channel, not the transport: WhatsApp through Chatwoot or a CRM counts as WhatsApp. `reply` acts on the channels and the widget: the webhook of `agents send-message` always gets one text. What each value does, from the code:
|
|
84
|
+
- `off`: the answer goes out as one message on every channel except Instagram, which splits it into bubbles even with `off` (up to 10 bubbles of up to 8 sentences). Any channel also cuts a message that passes its character limit: 4000 on WhatsApp, 1000 on Instagram.
|
|
85
|
+
- `on`: up to 3 bubbles of up to 3 sentences (Instagram: 10 and 8).
|
|
86
|
+
- `on_except_whatsapp`: like `on`, but when the contact's real channel is WhatsApp the answer is one message (still cut at 4000 characters).
|
|
87
|
+
- The pause between two bubbles belongs to the channel, and it is chosen by the channel the message goes through (so WhatsApp through Chatwoot pauses like Chatwoot): WhatsApp 3000 ms, Chatwoot 1000 ms and CRM 1000 ms, the same with `off` and with `on` (those channels ignore the value `reply.split` sends). Instagram is the one that changes: 700 ms with `off`, 3000 ms with `on`. On WhatsApp, `on` also waits 3000 ms before each attachment; with `off` it does not.
|
|
88
|
+
- `inbound: {}` and `reply: {}` are saved and returned as `{}`: the API does not fill in their defaults. `"inbound":{}` means no wait but the messages still go through the queue (`debounce_ms` 0, `queue_mode` `collect`), which is not the same as having no `inbound` key. `"reply":{}` means `split` at its default, `off`.
|
|
89
|
+
- The `--skeleton` of `agents create` lists `"reply": {"split": "off"}` (the contract publishes that default) but not `inbound`, which has no default: add it yourself.
|
|
90
|
+
|
|
91
|
+
```sh
|
|
92
|
+
laburen agents update <agent_id> --activate --config '{"inbound":{"debounce_ms":8000,"queue_mode":"collect"},"reply":{"split":"on_except_whatsapp"}}'
|
|
93
|
+
```
|
|
79
94
|
|
|
80
95
|
`guardrails` and `attachments` are two more top-level keys of the config. Like the others they are replaced whole, and `--config '{"guardrails":null}'` (or `"attachments":null`) takes them out.
|
|
81
96
|
|
|
@@ -108,7 +123,7 @@ Without `--json`, `compare` prints one difference per line, with the same rule a
|
|
|
108
123
|
|
|
109
124
|
Tools (reads the latest version, changes `config.tools`, and creates a new version; the new version is not active unless you pass `--activate`):
|
|
110
125
|
|
|
111
|
-
> **Warning:** `tools add` and `tools remove` start from the **latest** version, not the active one (so does `agents update --config`). If the latest version is a draft that is not active, the new version keeps the draft's
|
|
126
|
+
> **Warning:** `tools add` and `tools remove` start from the **latest** version, not the active one (so does `agents update --config`). If the latest version is a draft that is not active, the new version keeps the draft's changes and drops whatever only the active version had. The response then has the warning `includes_unpublished_changes`, and the CLI prints the ready command `laburen agents versions compare <agent_id> --from <active_version_id> --to <version_id>` to see every change against the active version (`active_version_id` and `changed_fields_from_active` are in the `--json` output). You can also check `laburen agents versions list <agent_id>` first; if the latest is not the active one, activate or delete the draft before you change tools.
|
|
112
127
|
|
|
113
128
|
```sh
|
|
114
129
|
laburen agents tools add <agent_id> --tool '{"type":"send_files"}'
|
|
@@ -199,6 +214,44 @@ The message comes from the argument; if there is none, from `--file` or the `mes
|
|
|
199
214
|
|
|
200
215
|
Ctrl+C stops reading and exits with `130`: the turn keeps running on the server and is billed. stderr says so and, if the thread was already known, prints the `continue:` command. With `--json` the run is not streamed (it waits for the whole answer), so the CLI does not catch Ctrl+C: the process ends at once with `130` from the shell and prints nothing on stdout or stderr, and the thread is not known. The turn still runs and is billed; the only way to find its conversation is the dashboard. If the turn fails midway, what was already printed stays, and the error goes to stderr (exit 1); its `next` is not `--help`. A failed turn may not have been saved, so its thread may not exist: in a new conversation the `next` is the same command again (it starts a new conversation), and only when you passed `--thread` (or `memory.thread` in `--data`) is the `next` the `continue:` command of that thread. If stdout is closed (`| head -1`) the CLI stops quietly and still prints the `continue:` line on stderr; a closed stderr also stops it quietly. A turn that takes more than 10 minutes fails with `turn_deadline_exceeded`.
|
|
201
216
|
|
|
217
|
+
## Send a message
|
|
218
|
+
|
|
219
|
+
`agents send-message` is the asynchronous way to talk to an agent: it stores the message, answers at once, and the answer of the agent arrives later as a POST to your server.
|
|
220
|
+
|
|
221
|
+
```sh
|
|
222
|
+
laburen agents send-message <agent_id> "Hi, do you have the XR 150?" --webhook-url https://example.com/hooks/laburen
|
|
223
|
+
laburen agents send-message <agent_id> "And in red?" --thread <thread_id> --webhook-url https://example.com/hooks/laburen
|
|
224
|
+
laburen agents send-message <agent_id> "Here is my invoice" --file https://example.com/invoice.pdf --webhook-url https://example.com/hooks/laburen
|
|
225
|
+
cat message.txt | laburen agents send-message <agent_id> - --webhook-url https://example.com/hooks/laburen
|
|
226
|
+
laburen agents send-message <agent_id> --data @message.json # messages, memory, contact, webhook_url
|
|
227
|
+
laburen agents send-message --schema # JSON Schema of the request and the response, plus `webhooks` (headers and body of `agent.response` and `agent.error`); no login, no API call
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
- **It answers at once.** The response is `{ "type": "queued_message", "message_id", "memory": { "thread", "resource" } }` (stdout, exit 0). The turn has not run yet: keep the `thread` to send the next message.
|
|
231
|
+
- **The answer comes to the webhook.** The server sends a POST to `--webhook-url` with the header `X-Laburen-Event`. `agent.response`: the body is the same `agent_run` that `agents run --json` prints, plus `message_ids`. `agent.error`: the turn failed (no credits, AI turned off, no active version, a model error) and the body is an API error, `{ "type", "error": { "type", "code", "message", "details" }, "request_id", "message_ids" }`. `message_ids` (in both) are the ids of the messages that turn answers, in order: match them with the `message_id` of each `queued_message` to know which messages an answer or a failure is about. There is no signature and no retry, and a webhook that does not answer within 30 seconds is skipped. The answer is saved in the conversation either way. Branch on the header, then on `error.code`.
|
|
232
|
+
- **`message_id` is not `message_ids`.** In `agent.response`, `message_id` is the id of the agent's **reply** (the stored message, `null` if nothing was stored); `message_ids` are the ids of the **customer's** messages that reply answers. Example: you send two messages and get `msg_1` and `msg_2`; the agent answers both together and the webhook has `"message_id": "msg_9"` and `"message_ids": ["msg_1", "msg_2"]`.
|
|
233
|
+
- **Webhook headers.** `X-Laburen-Event` (`agent.response` or `agent.error`); `request-id` (a `req_...` for that run; in `agent.error` it is also the body's `request_id`; give it to support when something fails); `user-agent: Laburen-Webhook/1`; and, only on `agent.error`, `x-should-retry` (`"true"` if sending the same messages again may succeed, `"false"` if not; same meaning as in the API error responses). Retrying means sending those messages again with `agents send-message`: the server does not retry by itself.
|
|
234
|
+
- **A failed turn keeps the messages.** The messages of a batch that failed stay in the conversation history, and a later turn may answer them. That later answer does not list them in its `message_ids`: it only has the messages the turn took from the queue.
|
|
235
|
+
- **Codes of `agent.error`.** `error.code` is one of the codes of the API (the `ErrorResponse` enum; `laburen agents send-message --schema` prints it under `webhooks`). The ones this event sends, and what to do (`x-should-retry` is the same as in the API):
|
|
236
|
+
- `ai_disabled_for_conversation` (`false`): a human turned the AI off while the messages waited. Not a failure: hand the conversation to a person.
|
|
237
|
+
- `agent_not_found` (`false`): the agent was deleted while the messages waited. It comes with one of two messages: "The agent of the conversation does not exist anymore." (the conversation no longer has an agent) or "Agent <id> does not exist or does not belong to this organization." with `details.agent_id` (the conversation still points to an agent that is gone).
|
|
238
|
+
- `conversation_not_found` (`false`): the conversation was deleted while the messages waited.
|
|
239
|
+
- `credits_exhausted`, `payment_overdue` (`false`): checked again before the model runs; fix the account and send the messages again.
|
|
240
|
+
- `invalid_agent_config` (`false`): the agent has no active version, or its config cannot run.
|
|
241
|
+
- `legacy_agent_not_supported` (`false`): the agent went to the legacy harness while the messages waited.
|
|
242
|
+
- `model_provider_rate_limited`, `model_provider_unavailable` (`true`): the model provider threw or did not answer; sending the messages again may work.
|
|
243
|
+
- `turn_deadline_exceeded`, `model_provider_auth_failed`, `model_context_exceeded`, `model_content_filtered`, `model_response_malformed`, `tool_execution_failed`, `mcp_server_unreachable` and the other errors of a normal turn (`false`; `tool_source_failed` takes the value of its cause): read `x-should-retry`.
|
|
244
|
+
- `internal_invariant_violation` (`false`): a bug on our side, with a generic message; quote the `request-id` to support.
|
|
245
|
+
- **`messages` with N items is stored as ONE message** (only possible with `--data`). A list of N messages in one `agents send-message` becomes a single stored message (one `message_id`) with the text of the parts joined. For N ids, make N calls.
|
|
246
|
+
- **The agent waits and groups.** If the active version has `inbound.debounce_ms`, the agent waits that long after the last message and answers all the messages that arrived with one turn (`inbound.queue_mode` `collect`). Without `inbound` there is no wait. If several messages of one conversation go together, the `webhook_url` of the newest one gets the answer. See `inbound` and `reply` in [Agents](#agents).
|
|
247
|
+
- **Only conversations created through the API.** Without `--thread` a new conversation is created. With `--thread` (`memory.thread`), the conversation has to be one that was created by the API (`agents run`, `agents send-message` or `threads create` without `--channel`, with an API token). An evals thread fails with 400 `invalid_request`, `details.reason` `environment_mismatch` and `details.field` `memory.thread` (not `environment`: this command has no `environment`): `agents send-message` always runs on production. A WhatsApp, Instagram, Chatwoot, CRM or widget conversation fails with 400 `invalid_request`, `details.reason` `thread_channel_mismatch` and `details.field` `memory.thread`: those channels deliver their own messages.
|
|
248
|
+
- **Same arguments as `agents run`, without the run overrides.** The message is an argument (`-` reads it from stdin, and with no message and a stdin that is not a terminal it reads what stdin sends in the first 500 ms), `--thread` and `--resource` are `memory.thread` and `memory.resource`, `--file <url>` (repeatable) attaches https files, `--contact <json|@file>` is the profile of the end user and `--webhook-url` is required; `--data` is the whole body and the flags override it. `instructions`, `model`, `versions`, `environment` and the other overrides are not accepted (there are no flags for them, and sending them in `--data` fails with `invalid_request`, "Unrecognized key"), because one turn can answer messages of several requests, and the overrides of one request would not apply to the others; to try other instructions or another model use `agents run`.
|
|
249
|
+
- **The webhook URL** has to be a public `https` URL (the server rejects anything else in production, so a local address like `localhost` does not work there; to test on your machine use a public tunnel URL). Otherwise (not a valid URL, `http`, or a private or local address) it fails with 400 `invalid_request`, `details.reason` `invalid_webhook_url`, `details.field` `webhook_url`, before anything is stored. A legacy agent fails with `legacy_agent_not_supported`.
|
|
250
|
+
- **Credits.** They are checked when the message arrives (402 `credits_exhausted` or `payment_overdue`, like `agents run`) and again before the model runs; if they ran out meanwhile, the webhook gets `agent.error`.
|
|
251
|
+
- **Two more errors on arrival, the same as `agents run`.** An agent without an active version fails with 400 `invalid_agent_config`: the message is not stored or queued (with `--resource`, the contact may already have been created). A conversation with the AI turned off fails with 409 `ai_disabled_for_conversation`: the message is stored in the history but not queued (`details.message_id` is its id). Both are checked again when the turn runs, because they can change during the wait, and then they come as `agent.error`.
|
|
252
|
+
- **Permissions and retries.** It needs `query`, the same as `agents run`. The call is idempotent: a retry with the same `Idempotency-Key` does not store the message twice.
|
|
253
|
+
- `agents run`, `agents run --json` and `threads create` do not wait: they run immediately even if the agent has `inbound`. In one conversation use only one way: `agents run` (immediate) or `agents send-message` (queued); mixing them gives two separate answers.
|
|
254
|
+
|
|
202
255
|
## Follow-ups
|
|
203
256
|
|
|
204
257
|
```sh
|
|
@@ -210,14 +263,14 @@ laburen agents follow-ups run <agent_id> --thread <thread_id> --environment eval
|
|
|
210
263
|
laburen agents follow-ups run --schema # JSON Schema of the request and the response; no login, no API call
|
|
211
264
|
```
|
|
212
265
|
|
|
213
|
-
Simulates the follow-up of an agent (the message it writes to a customer who stopped answering) on a disposable copy of a conversation, and sends nothing to anyone. It is a test: it runs even on a thread with the AI turned off (`ai_enabled: false`), where a normal turn fails with `ai_disabled_for_conversation`. Use it to try `follow_up` (see [Agents](#agents)) before you turn it on. stdout gets the result as a card (the `reason
|
|
266
|
+
Simulates the follow-up of an agent (the message it writes to a customer who stopped answering) on a disposable copy of a conversation, and sends nothing to anyone. It is a test: it runs even on a thread with the AI turned off (`ai_enabled: false`), where a normal turn fails with `ai_disabled_for_conversation`. Use it to try `follow_up` (see [Agents](#agents)) before you turn it on. stdout gets the result as a card (the `reason` and `messages` of the agent print with their real line breaks, indented under their field; control characters and terminal sequences are still escaped); with `--json`, the final `FollowUpRun`. It has `outcome` (`would_send`, `skipped` or `failed`), `stopped_by` (`decider`, `agent` or `null`), `decider` (`null` with `--mode agent`), `agent` (`null` with `--mode decider`, or when its turn failed), `cost`, `attempt_id`, `environment` and `error`. `decider` has `decision`, `category` (when it chose a reason, the category of that reason), `child_reason` (the reason of `follow_up.reasons` it chose, or `null` when it chose a category directly), `confidence` (0 to 1: the probabilities of every option that leads to the same decision, added up; `null` when the model returns none), `model` (the decision model that answered: `jev-1.14.0` or `gemini-decision-1`), `decision_id` (the decision the filter saved, with what it read and what it answered: `laburen decisions get <decision_id>`), `prompt_source` (`draft`, `version` or `default`: which criteria it read) and `cost`. The filter gives no explanation: it only picks an option. `agent` has `decision`, `declared` (`false` when the agent did not call `decide_follow_up`, the tool it uses to say whether to send; then the follow-up is sent), `category`, `child_reason` (a reason of another category is dropped and the category stays; `agent.tool_calls` still shows the arguments the agent sent as they were) and `reason` (what it declared), `messages` (what it would send), `files`, `tool_calls`, `model`, `cost` and `trace_id`. `agent.model` is the name the provider gives to the model (for example `openai/gpt-5-mini`), which can differ from the `id` in `models list`. With `--mode both` the agent writes even when the filter says no: read `outcome` and `stopped_by`, not `agent.messages`.
|
|
214
267
|
|
|
215
|
-
**When the turn of the agent fails.** In `--mode both`, if the filter already decided and then the turn of the agent fails (for example the model provider is down, or `model_context_exceeded`), the run does not fail as a whole: you get the filter's verdict in `decider`, `agent: null`, `outcome: "failed"` (or `"skipped"` if the filter said no) and the error in `error` (`type`, `code`, `message` and `details`, the same shape as an API error, with `details.stage: "agent"`). The command exits with `1`: the card goes to stdout and the error to stderr (with `--json`, stdout carries only the `FollowUpRun`, which already has `error`). `error` is `null` in every other case. That error has no `next` (it is part of the result, not an error of the command): read `error.code` and `error.details.stage`. Any other failure is a normal error (exit 1, no result), and the errors of the filter or of the agent carry `details.stage` (`decider` or `agent`) so you know which part failed
|
|
268
|
+
**When the turn of the agent fails.** In `--mode both`, if the filter already decided and then the turn of the agent fails (for example the model provider is down, or `model_context_exceeded`), the run does not fail as a whole: you get the filter's verdict in `decider`, `agent: null`, `outcome: "failed"` (or `"skipped"` if the filter said no) and the error in `error` (`type`, `code`, `message` and `details`, the same shape as an API error, with `details.stage: "agent"`). The command exits with `1`: the card goes to stdout and the error to stderr (with `--json`, stdout carries only the `FollowUpRun`, which already has `error`). `error` is `null` in every other case. That error has no `next` (it is part of the result, not an error of the command): read `error.code` and `error.details.stage`. Any other failure is a normal error (exit 1, no result), and the errors of the filter or of the agent carry `details.stage` (`decider` or `agent`) so you know which part failed. From the filter: when the decision model refuses to answer, a 500 `model_response_malformed` with `details.reason` `refusal` (that call is charged); when the conversation does not fit its token limit, the filter reads only the newest messages that fit, and when not even the last one fits, a 400 `invalid_request` with `details.reason` `conversation_over_limit` and `details.model`. The errors of the filter also carry `details.decision_id`: the failed decision was saved, and the `next` is `laburen decisions get <decision_id>`.
|
|
216
269
|
|
|
217
270
|
| Flag | Body field | Note |
|
|
218
271
|
|---|---|---|
|
|
219
272
|
| `--thread <id>` | `thread` | A conversation of this agent to copy, from any channel. The original does not change. Send this or `--messages`, only one |
|
|
220
|
-
| `--messages <json\|@file>` | `messages` | A conversation you write, oldest first: `[{"role":"user","parts":[{"type":"text","text":"..."}]},{"role":"assistant","parts":[{"type":"text","text":"..."}]}]`. Text only: a `{"type":"file"}` part is a 400 `invalid_request`, and so is a message whose parts have no text (`details.field` `messages[i]`). The parts of a message are joined with a blank line. `created_at` (RFC 3339) is all or none: every message has it or none does, and the dates cannot go backwards (otherwise a 400 with `details.field` `messages[i].created_at`). Without dates the messages go one after the other and the last one is dated now |
|
|
273
|
+
| `--messages <json\|@file>` | `messages` | A conversation you write, oldest first: `[{"role":"user","parts":[{"type":"text","text":"..."}]},{"role":"assistant","parts":[{"type":"text","text":"..."}]}]`. Text only: a `{"type":"file"}` part is a 400 `invalid_request`, and so is a message whose parts have no text (`details.field` `messages[i]`). The parts of a message are joined with a blank line. `created_at` (RFC 3339) is all or none: every message has it or none does, and the dates cannot go backwards (otherwise a 400 with `details.field` `messages[i].created_at`). Without dates the messages go one after the other and the last one is dated now; the filter, though, reads them all dated now and sees 0 hours since the last customer message: send `created_at` to test a real wait. The filter reads whole hours, rounded down (5 h 40 min is 5), and a date in the future counts as 0 |
|
|
221
274
|
| `--mode <mode>` | `mode` | `decider` (only the filter), `agent` (skips the filter) or `both` (default). In `both` the agent writes even if the filter says no, and then it does not get the filter's classification. See "The filter" below |
|
|
222
275
|
| `--step <n>` | `step` | Which step of `follow_up.steps` to simulate, 1 to 3 (default 1); its instructions are used |
|
|
223
276
|
| `--version-id <version_id>` | `versions.agents[<agent_id>].version_id` | Runs that version instead of the active one; only `query` permission |
|
|
@@ -230,7 +283,7 @@ Things to know:
|
|
|
230
283
|
- **The tools run for real.** If a tool creates a booking, the booking is created. Only missing credits stop it, and the run costs credits like a turn (`cost` in the result).
|
|
231
284
|
- **The copy is deleted and the original does not change.** With `agent` and `both` the agent works on a copy of the conversation (the one from `--thread` or the one you wrote) and it is deleted at the end; `decider` needs no copy. The result stays in the attempt (`attempt_id`).
|
|
232
285
|
- You can try a follow-up with `follow_up.enabled` set to `false`, to adjust the prompts before turning it on.
|
|
233
|
-
- **The filter** (`--mode decider` and `both`) runs even when `follow_up.decider.enabled` is off, because this is a test. It uses `follow_up.decider.model`
|
|
286
|
+
- **The filter** (`--mode decider` and `both`) runs even when `follow_up.decider.enabled` is off, because this is a test. It uses the decision model of `follow_up.decider.model` (`jev-1.14.0` by default, or `gemini-decision-1`), not the model of the agent (the question and the conversation must fit together in its token limit: 32,768 tokens for `jev-1.14.0`, 262,144 for `gemini-decision-1`), and asks it one `choice` question: the criteria are its instructions and the options are the `follow_up.reasons` (with their `description`) and the 10 categories (with a fixed description of the platform). `decider_prompt` in `--drafts` replaces the criteria saved in `follow_up.decider.prompt`: the draft changes the criteria, not the options. With `--mode agent` the filter does not run and `decider_prompt` is not used.
|
|
234
287
|
- `--environment evals` follows the rules of `agents run` (see [Run an agent](#run-an-agent)). To simulate on a thread without touching production, create the thread with `laburen threads create --environment evals` and pass the same `--environment` here. It never runs on production, and a model with no evals route fails with `evals_not_supported` before the copy is created or anything is charged. Which models are checked depends on `--mode`: `agent` and `both` check the one of the agent (`follow_up.model` or, without it, the `model` of the version); `decider` and `both` check `follow_up.decider.model`. A `--thread` created with the other environment fails with `invalid_request`, `details.reason` `environment_mismatch`.
|
|
235
288
|
- `--thread` and `--messages` together, or neither, fail with `invalid_request`. A `--thread` that does not exist, or belongs to another organization or agent, fails with `conversation_not_found`.
|
|
236
289
|
- The API allows up to 690 seconds for the run; the CLI waits for it and retries with the same `Idempotency-Key`.
|
|
@@ -381,7 +434,7 @@ laburen threads messages create <thread_id> --messages '[{"role":"assistant","pa
|
|
|
381
434
|
- `channel_conversation_not_found` (404): for `crm` and `chatwoot`, that `conversation_id` does not exist in the account (`details.field` is `channel.conversation_id` and `details.channel_conversation_id` is the id you sent). Check the id there; the `next` says creating another thread will not fix it.
|
|
382
435
|
- `channel_provider_unavailable` (529): the CRM did not answer; retry.
|
|
383
436
|
- `conversation_not_found` (404) is only for the thread itself (`threads get/update/messages create`, or `--thread`); the `next` of the `threads` commands is `laburen threads create --agent-id <agent_id>`.
|
|
384
|
-
- `threads create` accepts `--data` or the flags like any other command; `--agent-id`
|
|
437
|
+
- `threads create` accepts `--data` or the flags like any other command; `--agent-id` has to be an agent of the new harness (a legacy agent fails with `legacy_agent_not_supported`). An agent with `inbound` in its config is accepted too: `threads create` stores messages and does not run a turn, so there is no wait.
|
|
385
438
|
- **Resource and contact.** `--resource` on a thread without owner assigns it (in `threads create` with `--channel`, and in `agents run --resource`); a thread that belongs to another resource fails with `thread_resource_mismatch` (403). `contact` without `resource` is ignored, as in `agents run`; the model does not see `contact`.
|
|
386
439
|
- **Evals.** `--environment evals` creates an evals thread: runs on it need `agents run --environment evals`, and the thread shows `"environment": "evals"` (`null` on production). It cannot go with `--channel`, because a channel conversation is a real one: that fails with `invalid_request` and `details.reason` `channel_conversation_is_real`, and the `next` is the same command without `--environment` (or without `--channel`). `--environment` is `evals` or `null`; omit it, or send `null`, for production (the same as in `agents run`, and also `"environment": null` in `--data`). A thread created in evals on an agent whose model has no evals route is created anyway: the check is on each turn, and the turn runs with `--model` (a model with evals) on `agents run --thread <thread> --environment evals --model <id>`. The `--environment` and `--channel` flags are accepted together by the command, but the API rejects the pair.
|
|
387
440
|
- Deleting an agent deletes its threads: afterwards they give `conversation_not_found`.
|
|
@@ -414,8 +467,8 @@ laburen decisions create --state '"The delivery was late and nobody answered my
|
|
|
414
467
|
- **Answers.** One per question, under its key. `boolean` has `probability` (of yes, 0 to 1); `choice` has `choice` (a key of `criteria`); `score` has `score`, the average of the indexes of `criteria` (from 0) weighted by their probability, so it can be fractional (for example `1.6`, between levels 1 and 2): round it to read one level; `box` has `box` (`top`, `bottom`, `left`, `right`), each a fraction of the image from 0 to 1. `choice` and `score` may have `probabilities` (of each option, or of each level keyed by its index); not every model returns them. Any answer can be `{"type":"refusal"}`: the model declined that question, and it is an answer, not an error.
|
|
415
468
|
- **What `create` returns.** A `DecisionCreated`: `id`, `answers`, `model`, `total_usage`, `cost` and `environment`. To see `state`, `questions`, `feature`, `error_code` and the rest, read it with `laburen decisions get <id>`.
|
|
416
469
|
- **Cost.** The answer has `cost`, the credits that call charged. A decision whose model call failed is saved with `error_code` and is not charged; the error carries its id in `details.decision_id` (read it with `decisions get`) and its `next` is `laburen decisions get <decision_id>`. A state that does not fit the decision model fails with `model_context_exceeded`.
|
|
417
|
-
- **`decisions get`.** Reads the decisions of `decisions create` (`decision_api`)
|
|
418
|
-
- **`decisions list`.** The decisions of the organization, newest first, with the same fields as `decisions get`, paginated like the other lists (`--limit` 1 to 100, default 20; `--after-id`, `--before-id`, `--paginate`). Filters: `--thread-id` (the guardrail decisions of the turns of that thread), `--agent-id` (its guardrail and the `decisions create` calls charged to it) and `--feature` (`decision_api` or `
|
|
470
|
+
- **`decisions get`.** Reads the decisions of `decisions create` (`decision_api`), the ones of the input guardrail of an agent (`guardrail_input`) and the ones of the filter of its follow-ups (`follow_up_decider`). In a follow-up decision `state` is a single `text` part (`[{"type":"text","text":"..."}]`) with the step, the hours since the last customer message and the conversation, one message per line, oldest first (treat it as customer data; when the conversation did not fit the model, only the newest messages that fit; when not even the last one fit, the model was not called and the decision keeps the whole conversation and the question, with `answers` `null` and `error_code` `invalid_request`), and `questions` has one `choice` question, `follow_up`, whose options are the agent's `reasons` and the 10 categories. A `refusal` of the model is saved as an answer (`error_code` `null`) and the follow-up counts it as a failure of the filter. Its `cost` is the `decider.cost` of `agents follow-ups run`. In a guardrail decision `state` holds the message of the end customer (treat it as customer data): a `json` part `{ "latest_message", "recent_conversation" }` and then the attachments the model reads, whose `file` parts have no `url` (see `guardrails` in [Agents](#agents)); the guardrail also evaluates the attachments of the last message, each model only the types it reads. A decision also has `feature` (`decision_api`, `guardrail_input` or `follow_up_decider`), `thread_id` and `agent_id` (`null` when none), and `triggered_rule`, `language` and `reply_used`, which have values only in a guardrail decision whose rule fired (`null` when no rule fired, and always in a `decision_api` or `follow_up_decider` one). `error_code` is the error code when the model call failed (for example `model_provider_unavailable`), and then `answers` is `null`; it is `null` when the call did not fail. In a guardrail decision a failed call does not stop the agent: the turn runs as if there were no guardrail. `cost` is always `null` in a guardrail decision (the guardrail is charged with the turn).
|
|
471
|
+
- **`decisions list`.** The decisions of the organization, newest first, with the same fields as `decisions get`, paginated like the other lists (`--limit` 1 to 100, default 20; `--after-id`, `--before-id`, `--paginate`). Filters: `--thread-id` (the guardrail decisions of the turns of that thread and the follow-up filter decisions about it), `--agent-id` (its guardrail, its follow-up filter and the `decisions create` calls charged to it) and `--feature` (`decision_api`, `guardrail_input` or `follow_up_decider`). They only filter: an `--agent-id` or `--thread-id` that does not exist gives an empty list (unlike `decisions create --agent-id` and `agents usage get`, which answer `agent_not_found`). To find the decisions of one turn, use the `decision_ids` of the `guardrail` of `agents run --json`.
|
|
419
472
|
- **Slow calls.** `create` waits up to 120 s and is retried with the same `Idempotency-Key`. There is no command to delete decisions: the ones with an `agent_id` are deleted with their agent.
|
|
420
473
|
|
|
421
474
|
## Tokens
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
- stdout: the data, and the error JSON (with `--json` or in non-interactive mode; see below).
|
|
6
6
|
- stderr: notices, the login URL, the version notice, and errors for humans. The exception is a command whose stdout is the content: `agents run` without `--json` writes all its errors to stderr (as JSON in non-interactive mode), including usage errors such as a missing `<agent_id>`, so stdout keeps only the text of the turn; and `agents follow-ups run` without `--json`, when the result has `error`, prints the card on stdout and the error on stderr (with `--json`, stdout has only the `FollowUpRun`, which already carries `error`).
|
|
7
|
-
- `Warning: <message>` on stderr for each item of `warnings` in an API response, read from the top-level `warnings` and from a nested `version.warnings` (as in `agents create` and `agents update`) (also with `--json`, where stdout stays the untouched JSON). Without `--json`, the card on stdout does not repeat those `warnings`: each one is shown once, on stderr; use `--json` to read their other fields (such as `code`).
|
|
7
|
+
- `Warning: <message>` on stderr for each item of `warnings` in an API response, read from the top-level `warnings` and from a nested `version.warnings` (as in `agents create` and `agents update`) (also with `--json`, where stdout stays the untouched JSON). Without `--json`, the card on stdout does not repeat those `warnings`: each one is shown once, on stderr; use `--json` to read their other fields (such as `code`). A warning `includes_unpublished_changes` (in `agents update`, `agents versions create` and `agents tools add|remove`) is followed by a line on stderr with the command that compares the active version against the new one: `Compare every change against the active version with: laburen agents versions compare <agent_id> --from <active_version_id> --to <version_id>`; its `active_version_id` and `changed_fields_from_active` fields are in the `--json` output.
|
|
8
8
|
|
|
9
|
-
Without `--json`, lists print as a table and single items as `key: value` lines (an empty `changed_fields` shows as `changed_fields: []`; an empty `warnings` list and empty objects are hidden). Lists of agents, versions, skills and the like show a few columns and cut long text to the width of a terminal (the ID column is never cut, and piped output is not cut); `get` or `--json` shows every field. In a `get` card, nested objects are indented under their key; in a table cell they are one-line JSON. Lists of strings appear as `a,b` in a table cell; in a card they go one `- item` per line under their key, also with a single item, so a list never looks like a single value. `agents follow-ups run` prints the `reason
|
|
9
|
+
Without `--json`, lists print as a table and single items as `key: value` lines (an empty `changed_fields` shows as `changed_fields: []`; an empty `warnings` list and empty objects are hidden). Lists of agents, versions, skills and the like show a few columns and cut long text to the width of a terminal (the ID column is never cut, and piped output is not cut); `get` or `--json` shows every field. In a `get` card, nested objects are indented under their key; in a table cell they are one-line JSON. Lists of strings appear as `a,b` in a table cell; in a card they go one `- item` per line under their key, also with a single item, so a list never looks like a single value. `agents follow-ups run` prints the `reason` and `messages` of `agent` with their real line breaks, indented under their field (a one-line text stays on the line of its field); control characters and terminal sequences are escaped as everywhere else. `versions compare` prints one difference per line with one rule for every resource: a string longer than 120 characters, or a list of only text blocks (the prompt), shows its first 60 characters: `"<first 60 chars>…" (N chars)`; any other list or object is summarized as `<list, N items>` or `<object, N keys>` only when its JSON is longer than 120 characters, and a shorter one is printed whole (`[{"skill_id":"…","strategy":"pin"}] → […"latest"]`). When both values are objects and one of them is that long, the line names the top-level keys that changed instead (`tree: changed SKILL.md; added references/b.md; removed references/a.md`), up to 5 keys per group and then `(+N more)`. When both values are non-empty lists and one of them is that long, the line names the items that changed, were added or were removed (`tools: changed tool_b, tool_d; added tool_x`), with the same limit: each item is named by its `id` (or `skill_id`, `connection_id`, `name`, `type`) when every item has one and none repeats, and by its position otherwise (`changed [1]; added [2]`); same items in another order show as `same items, reordered`. Use `--json` for the full values. `--json` is never changed by any of this. Table columns follow the order in which keys appear, including columns that are `null` in every row. Control characters in values from the server (`\n`, `\t`, `ESC`...) are printed escaped (`\n`, `\x1b`), never raw: in tables, cards, errors, `next` lines and the labels of the questions. An empty list prints `No results.`
|
|
10
10
|
|
|
11
11
|
If stdout is closed early (for example `laburen agents list | head -2`), the CLI exits quietly. The exception is `agents run`: it keeps going and still writes the footer and the `continue:` line on stderr (a closed stderr also stops it quietly).
|
|
12
12
|
|
|
@@ -80,11 +80,14 @@ Other reasons you may meet (API codes):
|
|
|
80
80
|
- `invalid_request` with `details.reason` `unsupported_question_type` (the model does not support that question type, for example `box` with `gemini-decision-1`), `unsupported_state_media_type` (the model does not read that `media_type`) `question_out_of_limits` (a question is outside the limits of the model; `details.field` and `details.model` say which) or `box_needs_image` (a `box` question with no image in `state`; nothing is charged), `image_out_of_limits` (with `jev-1.14.0`, an image with a side outside 280 to 1568 px; `details.field`, `details.width` and `details.height` say which) (`decisions create`): change the model, the question or the image; the CLI does not check these.
|
|
81
81
|
- `evals_not_supported` (400): `decisions create --environment evals` with a model that has no evals account.
|
|
82
82
|
- `model_content_filtered` (400): `decisions create`: the model provider blocked the content; change the state or the question. `invalid_request` with `details.model` and `details.status`: the provider rejected the request (for example, it is over the provider limit); reduce the state. A turn (`agents run`, `agents follow-ups run`) whose request the provider rejects with a 400 gets the same `invalid_request` with `details.status`.
|
|
83
|
-
- `model_context_exceeded` (400, `invalid_request_error`, not retryable; `details.status` is the provider's status and, in follow-ups, `details.stage` the part that failed; `agents run`, `agents follow-ups run` and `decisions create`): the model provider rejected the request because the conversation (history, attachments and instructions) does not fit the context window of the model. In
|
|
83
|
+
- `model_context_exceeded` (400, `invalid_request_error`, not retryable; `details.status` is the provider's status and, in follow-ups, `details.stage` the part that failed; `agents run`, `agents follow-ups run` and `decisions create`): the model provider rejected the request because the conversation (history, attachments and instructions) does not fit the context window of the model. In `--mode both` of `agents follow-ups run` a failure of the agent turn comes inside `error`, with `details.stage: "agent"`, like the other failures of the agent. In `agents run` and `agents follow-ups run` the `next` is `laburen models list`: pick one with a larger `context_window` for the model of the agent, or send a shorter conversation (with `--thread`, start a new one). The filter of a follow-up (`details.stage: "decider"`) uses a decision model, which is not in `models list`, so that error has no such `next`; a conversation that does not fit the filter usually comes as `invalid_request` with `details.reason` `conversation_over_limit` (see [Follow-ups](commands.md#follow-ups)). In `decisions create` the state does not fit the decision model: send a smaller state (decision models are not in `models list`); the failed decision was saved, so the `next` is `laburen decisions get <decision_id>`. It never suggests running the same command again, because it fails the same way.
|
|
84
84
|
- `invalid_request` with `details.reason` `channel_not_connected` or `agent_not_linked_to_channel` (`threads create --channel`): the agent has no such number, CRM or Chatwoot connected, or the number or conversation belongs to another agent (`details.agent_id`). `next` points to the dashboard or to the same command with the owner's `--agent-id`.
|
|
85
|
-
- `
|
|
85
|
+
- `legacy_agent_not_supported` (400): `threads`, `agents run`, `agents send-message` and `agents follow-ups run` work only with agents of the new harness. `conversational_mode_not_supported` is still in the contract but the API no longer returns it: an agent with `inbound` is accepted by every command.
|
|
86
|
+
- `invalid_request` with `details.reason` `thread_channel_mismatch` (`details.field` `memory.thread`; `agents send-message`): the conversation was not created through the API (it is a WhatsApp, Instagram, Chatwoot, CRM or widget one). Send without `--thread` to start a new conversation, or use a thread created by `agents run`, `agents send-message` or `threads create` without `--channel`.
|
|
87
|
+
- `invalid_request` with `details.reason` `invalid_webhook_url` (`agents send-message`; `details.field` `webhook_url`): `--webhook-url` is not a public `https` URL (it is not a valid URL, it is `http`, or it points to a private or local address). Use a public `https` URL.
|
|
88
|
+
- The `agent.error` that `agents send-message` delivers to the webhook carries in `error.code` one of the codes of the API (the `ErrorResponse` enum). The ones it sends and whether to retry are in [Send a message](commands.md#send-a-message). Its body is `{ "type", "error": { "type", "code", "message", "details" }, "request_id", "message_ids" }`. It is not an exit code of the CLI: the command already finished with `queued_message`.
|
|
86
89
|
- `thread_resource_mismatch`: `memory.resource` is not the one that owns the `memory.thread`; send the same resource the thread started with.
|
|
87
|
-
- `ai_disabled_for_conversation`: a human took over the conversation, so the turn does not run. The first `next` is the same command without `--thread`: start a new conversation. The second is `laburen threads update <thread_id> --ai-enabled`, which turns the AI back on in that thread (not on `chatwoot` or `crm` threads, where the AI state is managed in Chatwoot).
|
|
90
|
+
- `ai_disabled_for_conversation`: a human took over the conversation, so the turn does not run. The message is stored anyway: `details.message_id` is its id. The first `next` is the same command without `--thread`: start a new conversation. The second is `laburen threads update <thread_id> --ai-enabled`, which turns the AI back on in that thread (not on `chatwoot` or `crm` threads, where the AI state is managed in Chatwoot).
|
|
88
91
|
- `invalid_request`/`invalid_agent_config` on `config.knowledge.project_ids`: a project id does not exist in this organization; `next` is `laburen knowledge projects list`.
|
|
89
92
|
- An attachment that could not be downloaded says the HTTP status or network error and the host; the url must be public and downloadable without logging in.
|
|
90
93
|
- `mcp_server_unreachable` (400): the API could not connect to the MCP server when listing its tools; `details.connection_id` says which connection. Saving an agent `tools` filter with a MCP that is down does not fail with it: it saves and returns a `mcp_tools_unverified` warning. It is not retried automatically; check the URL and headers and run it again. It is raised only by the management API: a turn with a MCP that is down does not fail with it. `next` is `mcp connections versions list <connection_id>` (its HOST column shows where each version points).
|
|
@@ -92,6 +95,7 @@ Other reasons you may meet (API codes):
|
|
|
92
95
|
- `idempotency_key_in_progress`: the CLI only gets it on its own retry: the first attempt failed or took too long (a timeout), the CLI retried it with the same key, and the server is still processing that first request, which may finish and apply. The message says so. Do not rerun the command as it is: a rerun sends a new request (a new key) and can duplicate what the first one does. Wait, then check with `list`/`get` that it did not apply, and only then run it again. The `next` is that `list` (for a create or update); `agents run` has none, because the CLI cannot show a turn in progress. `threads create` has no `list` either: with `--channel` (or `channel` in `--data`) its `next` is the same command, to run again after waiting, because it finds the same thread of that conversation; without a channel there is no `next`, like `agents run` (a rerun is a new request and can create a second thread or repeat `--messages`).
|
|
93
96
|
- `model_provider_auth_failed`: the model provider rejected the platform's credentials, even after the platform tried its fallback models; not retryable and not caused by your request. If it persists, contact support.
|
|
94
97
|
- `evals_not_supported` (400, its own code; `agents run --environment evals` and `agents follow-ups run --environment evals`): the model has no evals route (`details.model` says which, `details.field` is `environment`). Not retryable. The `next` is the same command without `--environment` (it runs on production; it needs only `query` unless the command has `--model`, `--instructions`, `--reasoning` or `--max-steps`, which need `write`) and `laburen models list` (to pick a `--model` with EVALS `yes`). If the command has `--thread` (as a flag, or `memory.thread` in a `--data` written on the command line), the thread is an evals one, so taking out only `--environment` would fail with `environment_mismatch`: the `next` are then the same command with `--model <model_id>` (the same thread, still in evals; if the version has the `thinking` tool, the model also needs THINKING TOOL `yes`), the command without `--thread` and `--environment` (a new conversation on production) and `laburen models list`. With a `--data` from a file or stdin the CLI cannot see the thread, so it uses these same `next`, and the `when` of the second one asks you to take `memory.thread` and `environment` out of that file. Permissions: `models list` needs `read` and `--model` needs `write`. A token with only `query` can use, without a thread, the command without `--environment`, and, with a thread, the command without `--thread` and `--environment` (only if the command has no `--model`, `--instructions`, `--reasoning` or `--max-steps`, which need `write`). In `agents follow-ups run` there is no `--model`: the model of the agent is `follow_up.model` or, without it, the `model` of the version, and which models are checked depends on `--mode` (`agent` and `both` check the one of the agent; `decider` and `both` check `follow_up.decider.model`), so the `next` are different: the same command without `--environment` (production), or, with `--thread` (an evals thread), the same command with `--messages @messages.json` instead of `--thread` and without `--environment`; then `laburen models list` (to pick a model with evals for `follow_up.model` and `follow_up.decider.model`, with `agents update`, or run a version that has them with `--version-id`).
|
|
98
|
+
- `invalid_request` with `details.reason` `conversation_over_limit` (`agents follow-ups run`, `details.stage` `decider`): the conversation does not fit the decision model of the filter even with only its last message (`details.model` says which). Send a shorter message, or pick another model in `follow_up.decider.model`. The failed decision was saved: the `next` is `laburen decisions get <decision_id>`.
|
|
95
99
|
- `invalid_request` with `details.reason` `environment_mismatch` (`agents run` and `agents follow-ups run`): the `--thread` was created with the other environment (`details.thread_environment` is `evals` or `null`, `details.conversation_id` the thread). The first `next` is the same command with the environment of the thread (`--environment evals`, or without `--environment` for a production thread). The second is the same command without `--thread`, which starts a new conversation (its `when` says in which environment). There is no `threads get` in the `next`: the error already says the environment. In `agents follow-ups run` there is only the first `next` (the same command with the environment of the thread): the second one would leave the command with neither `--thread` nor `--messages`.
|
|
96
100
|
- `invalid_request` with `details.reason` `channel_conversation_is_real` (`threads create --environment evals --channel`): a channel conversation is a real one. The `next` creates it without `--environment`, or without `--channel`.
|
|
97
101
|
- `invalid_request` with `details.reason` of an attachment (`--file`, or a file part in `--data`; `details.field` is the path of the part): `invalid_url` (not a valid URL), `not_https` (the URL must use https), `private_host` (a private or internal address), `too_large` (more than 20 MB), `unreachable` (the API could not download it; `details.status` is the HTTP status when there was a response; the URL must be public and downloadable without logging in) and `media_type_mismatch` (`details.declared` and `details.detected`: the content is of another type than the declared one; the CLI sets the type from the extension, so fix the file or use `--data` with the right `media_type`). A file declared with a type that has a known signature (image, PDF, Office) whose content is an HTML page also gives `media_type_mismatch`, with `details.detected` `text/html`: the URL usually points to a web page, not to the file. The same check applies to the file parts of the `--state` of `decisions create` (`details.field` is `state[i].media_type`). The images of `agents widgets images upload` use `details.field` `file` and `too_large` (more than 1 MB), `unsupported_media_type` (not PNG or JPG) or `media_type_mismatch` (see [Commands](commands.md#widgets)). The `next` is `--help` or the command to correct; none is retryable.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@laburen/delta-cli",
|
|
3
|
-
"version": "0.2.0-canary.
|
|
3
|
+
"version": "0.2.0-canary.23",
|
|
4
4
|
"description": "Laburen CLI to manage agents from the terminal",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@clack/prompts": "1.8.1",
|
|
30
|
-
"@laburen/delta-sdk": "1.5.0-canary.
|
|
30
|
+
"@laburen/delta-sdk": "1.5.0-canary.23",
|
|
31
31
|
"@vercel/detect-agent": "1.2.7",
|
|
32
32
|
"commander": "14.0.3",
|
|
33
33
|
"picocolors": "1.1.1"
|