bkper 5.8.0 → 5.8.2
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/lib/agent/bundle/agent-entry.js +3 -3
- package/lib/agent/extensions/bkper-ai-provider.d.ts.map +1 -1
- package/lib/agent/extensions/bkper-ai-provider.js +14 -4
- package/lib/agent/extensions/bkper-ai-provider.js.map +1 -1
- package/lib/agent/interactive/interactive-mode.d.ts +2 -1
- package/lib/agent/interactive/interactive-mode.d.ts.map +1 -1
- package/lib/agent/interactive/interactive-mode.js +5 -0
- package/lib/agent/interactive/interactive-mode.js.map +1 -1
- package/lib/agent/interactive/terminal.d.ts +8 -0
- package/lib/agent/interactive/terminal.d.ts.map +1 -0
- package/lib/agent/interactive/terminal.js +11 -0
- package/lib/agent/interactive/terminal.js.map +1 -0
- package/lib/agent/pi-shared-modules.d.ts +1 -1
- package/lib/agent/pi-shared-modules.d.ts.map +1 -1
- package/lib/agent/pi-shared-modules.js +1 -1
- package/lib/agent/pi-shared-modules.js.map +1 -1
- package/lib/agent/system-prompt.js +1 -1
- package/lib/agent/system-prompt.js.map +1 -1
- package/lib/commands/context/book-context.d.ts +1 -1
- package/lib/commands/context/book-context.js +1 -1
- package/lib/commands/context/domain-context.d.ts +1 -1
- package/lib/commands/context/domain-context.js +1 -1
- package/lib/commands/context/user-context.d.ts +1 -1
- package/lib/commands/context/user-context.js +1 -1
- package/lib/docs/ai/system-one-models.md +329 -0
- package/lib/docs/api/ai-gateway.md +122 -46
- package/lib/docs/api/managed-agent.md +95 -1
- package/lib/docs/apps/ai.md +71 -15
- package/lib/docs/apps/configuration.md +2 -1
- package/lib/docs/apps/context-menu.md +141 -1
- package/lib/docs/apps/development.md +27 -0
- package/lib/docs/apps/overview.md +1 -1
- package/lib/docs/apps/quality.md +1 -1
- package/lib/docs/core/core-concepts.md +1 -1
- package/lib/docs/index.md +4 -4
- package/package.json +1 -1
- package/lib/docs/ai/decision-models.md +0 -158
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> Call Bkper AI models from your own client or code — the guide, with a page for each operation: models, responses, streaming, and decisions.
|
|
4
4
|
|
|
5
|
-
The Bkper AI Gateway serves the models behind Bkper's agents and apps to your own clients and code: typed answers from
|
|
5
|
+
The Bkper AI Gateway serves the models behind Bkper's agents and apps to your own clients and code: typed answers from System One models and the stateless Bkper [Open Responses 2026-04-24](https://www.openresponses.org/specification/2026-04-24) profile for language models.
|
|
6
6
|
|
|
7
7
|
[Models and Usage](https://bkper.com/docs/ai/models) covers the models, usage rates, the monthly allowance, and privacy. To run an agent that works on Books instead of calling a model, use the [Managed Agent API](https://bkper.com/docs/api/managed-agent). Building a Bkper app? Start with [Add Bkper AI to an App](https://bkper.com/docs/platform/apps/ai). The canonical machine-readable contract is [https://ai.bkper.app/openapi.json](https://ai.bkper.app/openapi.json).
|
|
8
8
|
|
|
@@ -10,9 +10,9 @@ The Bkper AI Gateway serves the models behind Bkper's agents and apps to your ow
|
|
|
10
10
|
|
|
11
11
|
1. Call `GET /v1/models` to discover the current public model IDs, types, capabilities, limits, and usage rates.
|
|
12
12
|
2. Select a returned model ID.
|
|
13
|
-
3. Call `POST /v1/responses` for language models or `POST /v1/
|
|
13
|
+
3. Call `POST /v1/responses` for language models or `POST /v1/systemone` for System One models.
|
|
14
14
|
|
|
15
|
-
Responses support complete JSON with `stream: false` or semantic server-sent events with `stream: true`.
|
|
15
|
+
Responses support complete JSON with `stream: false` or semantic server-sent events with `stream: true`. System One models return complete JSON and do not stream.
|
|
16
16
|
|
|
17
17
|
## Requirements
|
|
18
18
|
|
|
@@ -20,7 +20,7 @@ You need:
|
|
|
20
20
|
|
|
21
21
|
- a Bkper account with an eligible subscription or trial allowance;
|
|
22
22
|
- a valid Bkper OAuth access token;
|
|
23
|
-
- an Open Responses client with a custom base URL for language generation, or an HTTP client or TypeSafe SDK for
|
|
23
|
+
- an Open Responses client with a custom base URL for language generation, or an HTTP client or TypeSafe SDK for System One models.
|
|
24
24
|
|
|
25
25
|
Requests are attributed to the authenticated Bkper user. Business subscriptions use a shared domain allowance. See [Models and Usage](https://bkper.com/docs/ai/models#monthly-allowance) for allowance scope, current rates, and model capabilities.
|
|
26
26
|
|
|
@@ -32,7 +32,7 @@ Requests are attributed to the authenticated Bkper user. Business subscriptions
|
|
|
32
32
|
| Authentication | `Authorization: Bearer <Bkper access token>` |
|
|
33
33
|
| Model discovery | `GET /v1/models` |
|
|
34
34
|
| Language generation | `POST /v1/responses` |
|
|
35
|
-
|
|
|
35
|
+
| System One models | `POST /v1/systemone` |
|
|
36
36
|
| Open Responses profile | `2026-04-24` for language generation only |
|
|
37
37
|
|
|
38
38
|
The live `GET /v1/models` response is authoritative for available IDs, model types, capabilities, limits, and effective usage rates. The catalog publishes `default_model` as the default language model. Inspect each entry's `type` before choosing its endpoint.
|
|
@@ -45,7 +45,7 @@ Bkper AI implements a documented subset of Open Responses. It does not claim ful
|
|
|
45
45
|
|
|
46
46
|
Use the model IDs returned by `GET /v1/models`, such as `gpt-luna`, `grok`, `gemini-flash`, and `jev`.
|
|
47
47
|
|
|
48
|
-
Language model entries have `type: "language"` and use `POST /v1/responses`.
|
|
48
|
+
Language model entries have `type: "language"` and use `POST /v1/responses`. System One model entries have `type: "system-one"`, list the question types they answer in `question_types`, and use `POST /v1/systemone`. Entries with `preview: true` are provider previews whose answers, limits, and availability may change without notice. Sending a model to the wrong endpoint fails explicitly.
|
|
49
49
|
|
|
50
50
|
Model IDs remain stable as Bkper updates the model behind them. Older versioned and publisher-prefixed IDs still work, but they select the current model, not the older version. Catalogs, responses, and usage reports use the current ID.
|
|
51
51
|
|
|
@@ -62,7 +62,7 @@ Treat the token as a secret. Do not commit it, print it in shared logs, or put i
|
|
|
62
62
|
|
|
63
63
|
## Call from a browser
|
|
64
64
|
|
|
65
|
-
Web pages on any origin can call `POST /v1/responses`, `POST /v1/
|
|
65
|
+
Web pages on any origin can call `POST /v1/responses`, `POST /v1/systemone`, and `GET /v1/models` directly. Bkper AI authenticates only the bearer token and uses no cookies, so browser requests carry no credentials.
|
|
66
66
|
|
|
67
67
|
- **Use the signed-in user's token at runtime.** On `*.bkper.app` pages, `@bkper/web-auth` supplies it. On other domains, use your own Bkper OAuth flow. Never ship a fixed token in a page.
|
|
68
68
|
- **Usage counts against the signed-in user's allowance.** Label it with a `bkper-ai-source` header, such as `my-page`.
|
|
@@ -75,7 +75,7 @@ import { BkperAuth } from '@bkper/web-auth';
|
|
|
75
75
|
const auth = new BkperAuth();
|
|
76
76
|
await auth.init();
|
|
77
77
|
|
|
78
|
-
const response = await auth.authenticatedFetch('https://ai.bkper.app/v1/
|
|
78
|
+
const response = await auth.authenticatedFetch('https://ai.bkper.app/v1/systemone', {
|
|
79
79
|
method: 'POST',
|
|
80
80
|
headers: { 'Content-Type': 'application/json', 'bkper-ai-source': 'my-page' },
|
|
81
81
|
body: JSON.stringify({
|
|
@@ -108,14 +108,14 @@ The response is an Open Responses resource. Its `model` contains the canonical p
|
|
|
108
108
|
|
|
109
109
|
The `bkper-ai-source` header is optional. Set it to a stable lowercase identifier such as `my-harness` to see which client or application made a request in the usage dashboard. Without a valid identifier, the source appears as unknown.
|
|
110
110
|
|
|
111
|
-
## Decision
|
|
111
|
+
## Decision questions
|
|
112
112
|
|
|
113
|
-
`POST /v1/
|
|
113
|
+
`POST /v1/systemone` answers typed questions about a shared state instead of generating text. Each question returns a noul probability, one choice from options you define, or a level on an ordered score, and your code decides what to do with it. Designing the questions, thresholds, and human review is covered in the [System One Models guide](https://bkper.com/docs/ai/system-one-models). `POST /v1/decisions` is a deprecated alias with identical behavior.
|
|
114
114
|
|
|
115
|
-
For an incoming bank line, this request asks three
|
|
115
|
+
For an incoming bank line, this request asks for three judgments at once: which Account it belongs to, whether it is already recorded, and how unusual it is as a business expense. Code combines the answers with facts, such as the amount, into what to do with the line.
|
|
116
116
|
|
|
117
117
|
```bash
|
|
118
|
-
curl --fail-with-body https://ai.bkper.app/v1/
|
|
118
|
+
curl --fail-with-body https://ai.bkper.app/v1/systemone \
|
|
119
119
|
-H "Authorization: Bearer ${BKPER_TOKEN}" \
|
|
120
120
|
-H "Content-Type: application/json" \
|
|
121
121
|
-H "bkper-ai-source: my-app" \
|
|
@@ -152,13 +152,13 @@ curl --fail-with-body https://ai.bkper.app/v1/decisions \
|
|
|
152
152
|
"type": "noul",
|
|
153
153
|
"instructions": "Does `existing_transaction` already record the movement in `bank_line`?"
|
|
154
154
|
},
|
|
155
|
-
"
|
|
155
|
+
"unusual": {
|
|
156
156
|
"type": "score",
|
|
157
|
-
"instructions": "How
|
|
157
|
+
"instructions": "How unusual is `bank_line` as a business expense?",
|
|
158
158
|
"criteria": [
|
|
159
|
-
"Routine:
|
|
160
|
-
"
|
|
161
|
-
"
|
|
159
|
+
"Routine: a common business expense",
|
|
160
|
+
"Unusual: plausible, but uncommon for a business",
|
|
161
|
+
"Suspicious: looks like fraud, an error, or a personal expense"
|
|
162
162
|
]
|
|
163
163
|
}
|
|
164
164
|
}
|
|
@@ -167,14 +167,15 @@ curl --fail-with-body https://ai.bkper.app/v1/decisions \
|
|
|
167
167
|
|
|
168
168
|
### Decision request
|
|
169
169
|
|
|
170
|
-
- **`model`** is any model with `type: "
|
|
171
|
-
- **`state`** is what every question judges: a string, JSON object, or array. Prefer an object with descriptive field names.
|
|
170
|
+
- **`model`** is any model with `type: "system-one"` in `GET /v1/models`, such as `jev` or `clef`. Each entry lists its `question_types`, `context_window`, and `max_state_question_tokens`; a question whose type is not in the model's `question_types` returns `unsupported_question_type`.
|
|
171
|
+
- **`state`** is what every question judges: a string, JSON object, or array. Prefer an object with descriptive field names. Convert PDFs and other files to text first, or to image `assets` for models with image input.
|
|
172
172
|
- **`questions`** is a nonempty map. Question IDs such as `account` are yours, and answers come back under the same IDs, but **IDs are not sent to the model**, so each `instructions` must stand on its own. Refer to state fields by name in backticks, as in `` `bank_line` ``.
|
|
173
173
|
- Each question accepts only `type`, `instructions`, and `criteria`. Instructions, descriptions, and levels can be strings or [structured JSON](https://docs.typesafe.ai/primitives/advanced):
|
|
174
174
|
- **`noul`**: optional `criteria` describe what yes and no mean.
|
|
175
175
|
- **`choice`**: `criteria` maps 1–255 options to descriptions, which may be `null`.
|
|
176
176
|
- **`score`**: `criteria` lists 2–10 levels, lowest first.
|
|
177
|
-
- The body accepts only `model`, `state`, and `questions`. Responses fields such as `input`, `stream`, `store`, `temperature`, and `metadata` are rejected.
|
|
177
|
+
- The body accepts only `model`, `state`, and `questions`, plus image `assets` on models with image input. `reference_date` applies only to extraction questions; `jev` and `clef` reject it with `unsupported_parameter`. Responses fields such as `input`, `stream`, `store`, `temperature`, and `metadata` are rejected.
|
|
178
|
+
- **`clef`** answers at most 64 questions, named with up to 100 letters, digits, `_`, `.`, or `-`, and needs at least 2 choice options. It reads up to 4 image `assets` (4 MiB each, 8 MiB in total) before the state, in `assets` order. Requests beyond these limits return `unsupported_parameter`; input over its 65,536-token context returns `provider_rejected`.
|
|
178
179
|
|
|
179
180
|
The model evaluates each question independently and in parallel against the same state.
|
|
180
181
|
|
|
@@ -191,33 +192,33 @@ A real response to the request above:
|
|
|
191
192
|
"choice": "Office Supplies",
|
|
192
193
|
"confidence": 1,
|
|
193
194
|
"probabilities": {
|
|
194
|
-
"Office Supplies": 1,
|
|
195
195
|
"Cloud Hosting": 0,
|
|
196
|
-
"
|
|
197
|
-
"
|
|
196
|
+
"Software Subscriptions": 0,
|
|
197
|
+
"Office Supplies": 1,
|
|
198
|
+
"Travel": 0
|
|
198
199
|
}
|
|
199
200
|
},
|
|
200
201
|
"already_recorded": {
|
|
201
202
|
"type": "noul",
|
|
202
|
-
"noul": 0.
|
|
203
|
+
"noul": 0.91
|
|
203
204
|
},
|
|
204
|
-
"
|
|
205
|
+
"unusual": {
|
|
205
206
|
"type": "score",
|
|
206
|
-
"score": 0.
|
|
207
|
-
"confidence": 0.
|
|
207
|
+
"score": 0.17,
|
|
208
|
+
"confidence": 0.74,
|
|
208
209
|
"legend": {
|
|
209
|
-
"0": "Routine:
|
|
210
|
-
"1": "
|
|
211
|
-
"2": "
|
|
210
|
+
"0": "Routine: a common business expense",
|
|
211
|
+
"1": "Unusual: plausible, but uncommon for a business",
|
|
212
|
+
"2": "Suspicious: looks like fraud, an error, or a personal expense"
|
|
212
213
|
},
|
|
213
214
|
"probabilities": {
|
|
214
|
-
"0": 0.
|
|
215
|
-
"1": 0.
|
|
216
|
-
"2": 0
|
|
215
|
+
"0": 0.9,
|
|
216
|
+
"1": 0.03,
|
|
217
|
+
"2": 0.07
|
|
217
218
|
}
|
|
218
219
|
}
|
|
219
220
|
},
|
|
220
|
-
"usage": { "input_tokens":
|
|
221
|
+
"usage": { "input_tokens": 614, "output_tokens": 87 }
|
|
221
222
|
}
|
|
222
223
|
```
|
|
223
224
|
|
|
@@ -248,23 +249,96 @@ Decision errors use the shared [error envelope](#errors). Validation failures na
|
|
|
248
249
|
}
|
|
249
250
|
```
|
|
250
251
|
|
|
251
|
-
Besides `invalid_request`, decision validation returns `400` with `missing_model`, `unsupported_model`, `invalid_state`, `invalid_questions`, `invalid_question`, or `unsupported_question_type`. Fix the field named in `error.param`; do not retry unchanged. A `400` with `provider_rejected` means the model rejected the request: check its size against the model's limits.
|
|
252
|
-
|
|
253
|
-
### Decision caching
|
|
254
|
-
|
|
255
|
-
Bkper caches decision results for 15 minutes per user. An identical request in that window returns the same answers without calling the model or consuming allowance, and repeats the original `usage`. Aliases of the same model share one cache entry. To get fresh answers, change the request or wait. See [Privacy, retention, and caching](https://bkper.com/docs/ai/models#privacy-retention-and-caching).
|
|
252
|
+
Besides `invalid_request`, decision validation returns `400` with `missing_model`, `unsupported_model`, `invalid_state`, `invalid_questions`, `invalid_question`, `unsupported_question_type`, or `unsupported_parameter`. The last two follow [Open System One](https://github.com/bkper/open-systemone/blob/9c454705012d1b659320340e4846a5824bd8e4fc/SPEC.md#errors): `unsupported_question_type` for a question type the selected model does not answer, and `unsupported_parameter` for a field the specification defines that the model cannot honor, such as `reference_date`. Fix the field named in `error.param`; do not retry unchanged. A `400` with `provider_rejected` means the model rejected the request: check its size against the model's limits. A `502` with `provider_invalid_answer` means the model's answers broke an [Open System One answer guarantee](https://github.com/bkper/open-systemone/blob/9c454705012d1b659320340e4846a5824bd8e4fc/SPEC.md#answer-guarantees); `error.message` names the question and the rule, and no answers are returned.
|
|
256
253
|
|
|
257
254
|
### TypeSafe compatibility
|
|
258
255
|
|
|
259
|
-
Decision
|
|
256
|
+
Decision questions come from TypeSafe's [System One](https://docs.typesafe.ai/concepts/system-one), and request and answer shapes match TypeSafe's [`POST /v1/systemone`](https://docs.typesafe.ai/api). TypeSafe's guidance on questions, state, confidence, and patterns applies unchanged. Only the surroundings differ:
|
|
260
257
|
|
|
261
|
-
- **Endpoint and authentication.** Call `https://ai.bkper.app/v1/
|
|
262
|
-
- **SDKs.** TypeSafe SDKs work with base URL `https://ai.bkper.app`, without `/v1`, and a Bkper access token. See [Add Bkper AI to an App](https://bkper.com/docs/platform/apps/ai#ask-a-
|
|
258
|
+
- **Endpoint and authentication.** Call `https://ai.bkper.app/v1/systemone` with a Bkper access token. TypeSafe API keys do not work here.
|
|
259
|
+
- **SDKs.** TypeSafe SDKs work with base URL `https://ai.bkper.app`, without `/v1`, and a Bkper access token. See [Add Bkper AI to an App](https://bkper.com/docs/platform/apps/ai#ask-a-system-one-model).
|
|
263
260
|
- **Errors.** Bkper returns `400` where TypeSafe returns `422`, and `503` with `provider_overloaded` where TypeSafe returns `529`. A `429` can also mean the Bkper AI allowance is exhausted.
|
|
264
261
|
- **Usage.** Requests count against the Bkper AI allowance, not a TypeSafe account.
|
|
265
|
-
- **Images.** Send images as base64 `assets` in a JSON request, as in TypeSafe's [Images](https://docs.typesafe.ai/images) guide. TypeSafe SDKs upload images as multipart, which Bkper does not accept, so send image requests over HTTP. Bkper turns on TypeSafe's experimental image input for you. Box questions are not supported. Image tokens count as input tokens.
|
|
262
|
+
- **Images.** Send images as base64 `assets` in a JSON request, as in TypeSafe's [Images](https://docs.typesafe.ai/images) guide. TypeSafe SDKs upload images as multipart, which Bkper does not accept, so send image requests over HTTP. Bkper turns on TypeSafe's experimental image input for you. Jev reads `png`, `jpg`, and `jpeg` images; `webp`, which `clef` and `clairic` read, returns `unsupported_parameter`. Box questions are not supported. Image tokens count as input tokens.
|
|
266
263
|
- **Coding agents.** TypeSafe's [agent skill](https://docs.typesafe.ai/agent-skill) teaches questions and patterns. For a Bkper integration, also point the agent to this guide, `https://bkper.com/docs/api/ai-gateway.md`, for the endpoint, authentication, model IDs, and errors.
|
|
267
264
|
|
|
265
|
+
## Extraction questions
|
|
266
|
+
|
|
267
|
+
Extraction questions to `POST /v1/systemone` ask for values read, computed, estimated, or forecast from the state instead of judgments: `text`, `number`, `date`, `time`, `datetime`, `duration`, `list`, `estimate`, and `forecast`. `clairic` is a Cloudflare preview (`preview: true` in `GET /v1/models`). Question and answer shapes follow [Open System One](https://github.com/bkper/open-systemone/blob/9c454705012d1b659320340e4846a5824bd8e4fc/SPEC.md#question-types).
|
|
268
|
+
|
|
269
|
+
This request reads a supplier email: it copies the invoice number, reads the issue date and payment terms, and estimates when the invoice will be paid. An extraction question can also ask for a computed value, such as a due date, but when a value feeds a Book, ask for its inputs and compute it in code.
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
curl --fail-with-body https://ai.bkper.app/v1/systemone \
|
|
273
|
+
-H "Authorization: Bearer ${BKPER_TOKEN}" \
|
|
274
|
+
-H "Content-Type: application/json" \
|
|
275
|
+
-H "bkper-ai-source: my-app" \
|
|
276
|
+
--data '{
|
|
277
|
+
"model": "clairic",
|
|
278
|
+
"state": "Hi, this is Marta Silva from Acme Paper. Invoice AP-5531 for 3 boxes of A4 paper is attached: total $184.50, issued 2026-03-02 with net 30 terms. Delivery is booked for March 9 at 10:15 am, and unloading takes about 40 minutes. Our last four monthly invoices were $172.00, $178.25, $181.10 and $184.50.",
|
|
279
|
+
"reference_date": "2026-03-05",
|
|
280
|
+
"questions": {
|
|
281
|
+
"invoice_number": {"type": "text", "instructions": "Invoice number"},
|
|
282
|
+
"contacts": {"type": "list", "items": "text", "instructions": "Each person named"},
|
|
283
|
+
"total": {"type": "number", "decimals": 2, "unit": "USD", "instructions": "Invoice total"},
|
|
284
|
+
"issue_date": {"type": "date", "instructions": "Invoice issue date"},
|
|
285
|
+
"net_days": {"type": "number", "integer": true, "unit": "days", "instructions": "Net payment terms"},
|
|
286
|
+
"delivery_time": {"type": "time", "instructions": "Time the delivery is booked for"},
|
|
287
|
+
"delivery_at": {"type": "datetime", "instructions": "Date and time of the delivery"},
|
|
288
|
+
"unloading": {"type": "duration", "unit": "minutes", "integer": true, "instructions": "How long unloading takes"},
|
|
289
|
+
"monthly_amounts": {"type": "list", "items": "number", "decimals": 2, "instructions": "Each monthly invoice amount"},
|
|
290
|
+
"days_to_pay": {"type": "estimate", "min": 0, "max": 90, "step": 1, "instructions": "Days after issue until this invoice is paid"},
|
|
291
|
+
"next_invoices": {"type": "forecast", "min": 0, "max": 1000, "horizon": 2, "interval": "month", "unit": "USD", "instructions": "Amount of the next monthly invoices", "step": 0.01},
|
|
292
|
+
"po_number": {"type": "text", "instructions": "Purchase order number"}
|
|
293
|
+
}
|
|
294
|
+
}'
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
### Extraction request
|
|
298
|
+
|
|
299
|
+
- **Settings** are optional except `items` on lists and `min` and `max` (and `horizon` on forecasts) on estimates and forecasts: `null_threshold` on value types; `unit`, `integer`, and `decimals` on numbers and durations; `step` and `scale` on estimates and forecasts; `quantiles: true` on estimates for the 1st to 99th percentiles; `interval` on forecasts. An invalid setting returns `400` with `invalid_question` and the setting in `error.param`.
|
|
300
|
+
- **`instructions`** is optional. Structured state and instructions are read as compact JSON text.
|
|
301
|
+
- **`reference_date`** (`YYYY-MM-DD`) resolves relative and year-less dates, such as "March 9" above.
|
|
302
|
+
- **`clairic`** accepts question names of up to 64 letters, digits, `_`, `.`, or `-`, starting with a letter or `_`, forecasts of up to 64 steps, and up to 4 image `assets` (4 MiB each, 8 MiB in total). Requests beyond these limits return `unsupported_parameter`.
|
|
303
|
+
|
|
304
|
+
### Extraction answers
|
|
305
|
+
|
|
306
|
+
A real response to the request above, with probabilities and means rounded:
|
|
307
|
+
|
|
308
|
+
```json
|
|
309
|
+
{
|
|
310
|
+
"model": "clairic",
|
|
311
|
+
"answers": {
|
|
312
|
+
"invoice_number": {"type": "text", "value": "AP-5531", "guess": "AP-5531", "span": [49, 56], "p_null": 0, "confidence": 1},
|
|
313
|
+
"contacts": {"type": "list", "value": ["Marta Silva"], "spans": [[12, 23]], "confidence": 0.28},
|
|
314
|
+
"total": {"type": "number", "value": 184.5, "guess": 184.5, "p_null": 0, "confidence": 1},
|
|
315
|
+
"issue_date": {"type": "date", "value": "2026-03-02", "guess": "2026-03-02", "p_null": 0, "confidence": 1},
|
|
316
|
+
"net_days": {"type": "number", "value": 30, "guess": 30, "p_null": 0, "confidence": 1},
|
|
317
|
+
"delivery_time": {"type": "time", "value": "10:15:00", "guess": "10:15:00", "p_null": 0, "confidence": 1},
|
|
318
|
+
"delivery_at": {"type": "datetime", "value": "2026-03-09T10:15:00", "guess": "2026-03-09T10:15:00", "p_null": 0, "confidence": 1},
|
|
319
|
+
"unloading": {"type": "duration", "value": 40, "guess": 40, "p_null": 0, "confidence": 1, "unit": "minutes"},
|
|
320
|
+
"monthly_amounts": {"type": "list", "value": [172, 178.25, 181.1, 184.5], "confidence": 0.74},
|
|
321
|
+
"days_to_pay": {"type": "estimate", "value": 30, "median": 30, "p10": 24, "p90": 35, "mean": 29.78, "p_below": 0, "p_above": 0},
|
|
322
|
+
"next_invoices": {"type": "forecast", "steps": [{"value": 182.95, "median": 183.47, "p10": 171.24, "p90": 195.86, "mean": 182.95, "p_below": 0, "p_above": 0}, {"value": 183.74, "median": 184.1, "p10": 171.64, "p90": 196.86, "mean": 183.74, "p_below": 0, "p_above": 0}]},
|
|
323
|
+
"po_number": {"type": "text", "value": null, "guess": "AP-5531", "span": [49, 56], "p_null": 1, "confidence": 0.99}
|
|
324
|
+
},
|
|
325
|
+
"truncated": false,
|
|
326
|
+
"usage": { "input_tokens": 1337, "output_tokens": 0 }
|
|
327
|
+
}
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
Bkper checks every answer against the [Open System One answer guarantees](https://github.com/bkper/open-systemone/blob/9c454705012d1b659320340e4846a5824bd8e4fc/SPEC.md#answer-guarantees) before returning it:
|
|
331
|
+
|
|
332
|
+
- Value types have `value`, `p_null`, and `confidence`. `value` is `null` exactly when `p_null` is above the question's `null_threshold` (default 0.5), as for `po_number`; `guess` is still the most likely value.
|
|
333
|
+
- `span` is where `guess` was read: a half-open `[start, end)` range of Unicode code point offsets into `state_text` when present, else into `state`. For `text`, it covers exactly the guess. Computed values, and values read from images, have a `null` or absent span.
|
|
334
|
+
- Lists are never `null` and keep input order. Text lists have `spans`, one entry per item: its span, or `null` for an item read from an image.
|
|
335
|
+
- Estimates and every forecast step are within `[min, max]`, on the `step` grid, with `p10` ≤ `median` ≤ `p90`. A forecast has exactly `horizon` `steps`, nearest first. Estimates have `quantiles` only when their question sets `quantiles: true`; forecast steps never do.
|
|
336
|
+
- `state_text`, the text the model read, is returned when it differs from `state`, for example for structured state. `truncated: true` means the model read only the start of the state.
|
|
337
|
+
|
|
338
|
+
## System One caching
|
|
339
|
+
|
|
340
|
+
Bkper caches System One results, for decision and extraction questions alike, for 15 minutes per user. An identical request in that window returns the same answers without calling the model or consuming allowance, and repeats the original `usage`. Aliases of the same model share one cache entry. To get fresh answers, change the request or wait. See [Privacy, retention, and caching](https://bkper.com/docs/ai/models#privacy-retention-and-caching).
|
|
341
|
+
|
|
268
342
|
## Stream a response
|
|
269
343
|
|
|
270
344
|
Set `stream` to `true` to receive semantic server-sent events:
|
|
@@ -362,18 +436,19 @@ Unsupported fields fail explicitly rather than being ignored or passed to only o
|
|
|
362
436
|
|
|
363
437
|
## Errors
|
|
364
438
|
|
|
365
|
-
Errors use an Open Responses-shaped envelope with stable Bkper error codes. `POST /v1/responses` and `POST /v1/
|
|
439
|
+
Errors use an Open Responses-shaped envelope with stable Bkper error codes. `POST /v1/responses` and `POST /v1/systemone` normalize provider failures the same way. Branch on `error.code`, not only on the HTTP status, because `429` has two meanings.
|
|
366
440
|
|
|
367
441
|
| Status | Meaning | `error.code` examples | Retry |
|
|
368
442
|
| ------ | ------------------------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------- |
|
|
369
443
|
| `400` | Invalid request, unavailable model, unsupported capability, or context overflow | `invalid_request`, `context_length_exceeded`, `provider_rejected` | No. Fix the field in `error.param`. |
|
|
444
|
+
| `400` | The selected model's provider does not serve the caller's region | `provider_region_unsupported` | No. Choose a model from another provider. |
|
|
370
445
|
| `401` | Missing or invalid Bkper bearer token | `unauthorized` | No. Get a new Bkper token. |
|
|
371
446
|
| `402` | The authenticated subscription payment is overdue | `billing_overdue` | No |
|
|
372
447
|
| `403` | The account is not entitled to use Bkper AI | `entitlement_unavailable` | No |
|
|
373
448
|
| `429` | The monthly Bkper AI allowance is exhausted | `usage_limit_exceeded` | No |
|
|
374
449
|
| `429` | The upstream provider is throttled | `provider_rate_limited` | Yes, with backoff |
|
|
375
450
|
| `499` | The client aborted the request | `request_aborted` | — |
|
|
376
|
-
| `502` | The selected upstream model provider or transport failed | `provider_error`, `provider_rejected`
|
|
451
|
+
| `502` | The selected upstream model provider or transport failed | `provider_error`, `provider_rejected`, `provider_invalid_answer` | A limited number of times |
|
|
377
452
|
| `503` | The provider is overloaded or quota usage is temporarily unavailable | `provider_overloaded`, `usage_unavailable` | Yes, with backoff |
|
|
378
453
|
|
|
379
454
|
When a provider sends `retry-after` with a `429` or `503`, Bkper AI forwards it; wait at least that long before retrying. `401` and `403` always refer to your Bkper token or account. Upstream provider credential problems surface as `502`.
|
|
@@ -392,7 +467,8 @@ Each operation has its own page. The machine-readable contract is [openapi.json]
|
|
|
392
467
|
|
|
393
468
|
- [`POST /v1/responses` — Generate a response](https://bkper.com/docs/api/ai-gateway/operations/createresponse.md)
|
|
394
469
|
|
|
395
|
-
###
|
|
470
|
+
### System One
|
|
396
471
|
|
|
472
|
+
- [`POST /v1/systemone` — Evaluate typed questions](https://bkper.com/docs/api/ai-gateway/operations/createsystemone.md)
|
|
397
473
|
- [`POST /v1/decisions` — Evaluate typed questions](https://bkper.com/docs/api/ai-gateway/operations/createdecision.md)
|
|
398
474
|
|
|
@@ -107,6 +107,29 @@ the totals you checked.
|
|
|
107
107
|
- A fork keeps its parent's instructions unless the create request sets new ones. Continuing someone else's session never takes theirs.
|
|
108
108
|
- Sessions keep the text they were given. Updating your client changes only the sessions it creates or patches.
|
|
109
109
|
|
|
110
|
+
### Agent context
|
|
111
|
+
|
|
112
|
+
After your `instructions`, the agent reads its context: an `AGENTS.md` and skills (`.agents/skills/<name>/SKILL.md`) that people, the agent, or any other agent following the [AGENTS.md](https://agents.md/) and [Agent Skills](https://agentskills.io/specification) standards keep in a context repository per scope. A session loads the user's company's (their verified domain's, when they have one: shared by everyone in the domain, changed only by its admin), then the user's own, then its Book's (from its first input's `bookContext`, shared by everyone who can view the Book). Each is more specific than the one before and wins: a Book's skills replace the user's of the same name, and the user's the company's. It loads when the session starts and again at the start of each turn (an input that is not a steer or follow-up: a run never changes its context midway), each scope from the sandbox's working copy when the sandbox is running and the user or agent changed it there (local changes win, as on a local machine), else as published: the session's `contextScopes` show what loaded. When it changed, the agent is told so with that input. A fork starts with what its parent loaded.
|
|
113
|
+
It loads as the person in every workspace, an App's included (such as a Slack bot's): permissions are the person's. Context of other Books never loads; the agent clones one only when asked.
|
|
114
|
+
`GET /v1/skills?bookId=` lists the skills a session starting now could call by name, as published, before there is one.
|
|
115
|
+
|
|
116
|
+
- Loading never delays a session by more than about two seconds: at the start, a scope that is slow or fails is skipped and shown as `unavailable`, never as an error in the conversation; at a turn, the session keeps all of what it had.
|
|
117
|
+
- Context guides; it never grants anything. The user's messages override it, and it cannot relax Bkper's base.
|
|
118
|
+
|
|
119
|
+
### Workspace
|
|
120
|
+
|
|
121
|
+
The Workspace is the agent's computer as people see it: the working copies in the sandbox of the workspace you call through (the user's own, or your app's own for that user), the same files the agent sees, which both the user and the agent change. Nothing in them reaches anyone else, or any agent's context, until the user saves: Save publishes. Readers of shared sessions never reach someone else's.
|
|
122
|
+
|
|
123
|
+
Repositories are named as one tree: `user` (the user's own context), `domain` (their company's, when they have a verified domain) and `books/{bookId}` (a Book's), the folders the sandbox and a local machine keep in `~/.bkper`, and `apps/{appId}` (the source of an App the user develops, in `/workspace/apps`). `GET /v1/workspace?bookId=` lists the root, as published: the user's domain, when they have one, the Book, named by Bkper, when the user can view it, and every App the user develops, those hosted elsewhere with their `repoUrl` instead of a repository. `GET /v1/workspace/status` reads every working copy in one call: its `fingerprint` (Git's tree id of its files, which changes whenever they do), its `base` (the published commit it builds on) and its marks (the files `added`, `modified` and `deleted` since the base, committed or not), plus the App folders in the sandbox, also those Bkper does not know yet. Opening a repository the sandbox does not have clones it there.
|
|
124
|
+
|
|
125
|
+
- **Read**: a repository's files and marks (`canEdit` says whether the user may change and save it), one file's text and blob id (`version=base` for the base's), one PNG or JPEG picture's bytes (`/image`, at most 5 MiB, typed by its bytes).
|
|
126
|
+
- **Change the working copy**: write a file over the version read (`previous`, the `sha` read: what changed since, such as by the agent, is 409 `file_changed`), move (rename) or delete a file or folder, add files from the user's computer (`/add`: 1 to 100 files at their full paths, each base64 of its exact bytes, a PNG or JPEG up to 5 MiB or text up to 256 KiB, at most 10 MiB together), undo a published commit (`/revert`), and discard changes (`/discard`: back to the base; a file never published goes). `POST /v1/workspace/copy` copies or moves a file or folder between two context repositories' working copies, such as into a Book from `GET /v1/workspace/books` (the Books whose context the user may change). A destination that exists is 409 `file_exists` (never overwritten; an add's lists every such file in `paths` at once, replaced only when it says `replace`), what cannot be written (a path, not text, too large) is 422 `file_invalid` with a `reason`; context may hold drafts agents would not load yet (the listing's `warnings` say so, and Save refuses them), and while Git works in the repository (the agent's, or a sync) 409 `workspace_busy`: nothing changed, try again.
|
|
127
|
+
- **Review and save**: `/changes` shows everything Save would publish, each file before and after, with the working copy's `fingerprint`; `POST …/save` with that `fingerprint` publishes exactly what was reviewed: the agent's commits as they are (their messages and trailers in History), plus one commit of the rest, authored and committed by the user with an automatic message, never forced and never deployed. Changed since the review is 409 `review_stale`; someone published changes to the same lines meanwhile is 409 `publish_conflict`, naming the files (`paths`) and who published them (`publishers`), with nothing published and the working copy as before; an App Bkper does not know yet is 409 `app_unregistered` until the agent registers it.
|
|
128
|
+
- **App secrets**: the secrets of an App's deployments on Bkper, production and preview, as `bkper app secrets` sets them, without the value ever reaching the agent or a conversation. `GET /v1/workspace/apps/{appId}/secrets` lists each deployment's names, or that the App is not deployed there yet; `PUT …/secrets/{name}?env=` with `{ "value" }` sets one (a name set again is replaced) and `DELETE` removes one, for the App's owner and developers (403 `workspace_forbidden`), only where it is deployed (409 `not_deployed`). Values are write-only. Only with the user's own token: through an app or channel bot these routes are 404.
|
|
129
|
+
- **History**, as published: the latest 20 commits with the files each changed and whether each was made with the agent's help (`agent`: its message ends with the trailer `Assisted-by: Bkper Agent`; the user stays its author and committer), and what one of them changed (`/commit`, each file before and after).
|
|
130
|
+
|
|
131
|
+
When the user changes the working copy, the agent is told which files with its next message. Context changed there applies to the user's sessions from their next turn while the sandbox runs; Save publishes it to everyone in its scope.
|
|
132
|
+
|
|
110
133
|
## Who the agent acts as
|
|
111
134
|
|
|
112
135
|
Every request acts as the user whose token you send. That user's Book permissions and Bkper AI allowance apply.
|
|
@@ -323,6 +346,8 @@ Before the agent reads the input, each file is copied into its workspace, at `/w
|
|
|
323
346
|
|
|
324
347
|
When the agent publishes a file, a `tool_result` entry carries a `file` part with `fileId`, `name`, `mediaType`, and `size`. List a session's published files with `GET /v1/sessions/{sessionId}/files`.
|
|
325
348
|
|
|
349
|
+
In the user's own workspace, when the agent shows an App it is building running live (`show_app`), the `tool_result` entry carries a `live_app` part with the App's `appId`, `name`, and `menuUrl`, when it has one.
|
|
350
|
+
|
|
326
351
|
### Download, retention, and quotas
|
|
327
352
|
|
|
328
353
|
- `GET /v1/files/{fileId}` returns the `File`; `GET /v1/files/{fileId}/content` its bytes, always as an attachment. The `Content-Type` is the allowlisted type for the name, never an upload's declared type; anything else is `application/octet-stream`.
|
|
@@ -455,6 +480,7 @@ A domain's admin can connect a service for everyone in the domain, with the same
|
|
|
455
480
|
| `attributes` | 16 names, 16000 characters in total |
|
|
456
481
|
| List page | 50 sessions, entries, or files |
|
|
457
482
|
| Connected services | 20 per user and 20 per domain, 10 hosts each, tokens and keys up to 8192 characters, 20 Google scopes |
|
|
483
|
+
| App secret value | 5 KiB |
|
|
458
484
|
|
|
459
485
|
## Errors
|
|
460
486
|
|
|
@@ -465,10 +491,10 @@ Errors are `{ "error": { "code", "type", "message" } }`. Branch on `code`.
|
|
|
465
491
|
| 400 | `invalid_request`, `unknown_model`, `unknown_thinking_level` | A field is invalid or unknown |
|
|
466
492
|
| 400 | `host_not_allowed` | A connected service names a host that has its own route, such as Bkper's or Google's token endpoint |
|
|
467
493
|
| 401 | `unauthorized`, `authentication_failed` | The token is missing, invalid, or expired |
|
|
468
|
-
| 403 | `agent_beta_required` | The account cannot use the agent, such as one without an email address |
|
|
469
494
|
| 403 | `origin_forbidden` | A browser on another website sent a write |
|
|
470
495
|
| 403 | `book_access_required` | The user cannot view the Book whose shared sessions they asked for |
|
|
471
496
|
| 403 | `domain_admin_required` | Only the domain's admin changes its services |
|
|
497
|
+
| 403 | `workspace_forbidden` | The user may not change or save this Workspace repository, or change this App's secrets |
|
|
472
498
|
| 404 | `not_found`, `parent_not_found`, `file_not_found` | No such resource for this user |
|
|
473
499
|
| 405 | `method_not_allowed` | The path does not support the method |
|
|
474
500
|
| 409 | `idempotency_conflict` | The key was used with different content |
|
|
@@ -478,9 +504,14 @@ Errors are `{ "error": { "code", "type", "message" } }`. Branch on `code`.
|
|
|
478
504
|
| 409 | `share_unavailable` | The session cannot be shared: an app's workspace, or outside a Book without a hosted domain |
|
|
479
505
|
| 409 | `book_access_required` | The user cannot view the Book the session was started in |
|
|
480
506
|
| 409 | `host_in_use`, `service_limit` | Another service holds the host, or the user (or domain) has 20 services |
|
|
507
|
+
| 409 | `file_changed`, `file_exists` | A Workspace file changed since it was read, or a destination exists |
|
|
508
|
+
| 409 | `workspace_busy` | Git is working in the Workspace repository; nothing changed, try again |
|
|
509
|
+
| 409 | `not_deployed` | The App is not deployed to that environment: nothing to set there yet |
|
|
510
|
+
| 409 | `review_stale`, `publish_conflict`, `app_unregistered` | Save: the files changed since the review, someone published changes to the same lines, or the App is not known to Bkper yet |
|
|
481
511
|
| 410 | `file_gone` | The file's stored copy was deleted |
|
|
482
512
|
| 411 | `length_required` | An upload has no `Content-Length` |
|
|
483
513
|
| 413 | `request_too_large`, `file_too_large` | The JSON body exceeds 64 KiB, or the upload 25 MiB |
|
|
514
|
+
| 422 | `file_invalid` | A Workspace change cannot be written or saved; `reason` says why |
|
|
484
515
|
| 503 | `service_unavailable`, `authentication_failed` | A dependency is unavailable; retry with backoff |
|
|
485
516
|
|
|
486
517
|
Model failures appear on the failed input and reply as `error.code`, such as `usage_limit_exceeded` when the monthly Bkper AI allowance is used up.
|
|
@@ -507,6 +538,7 @@ Each operation has its own page. The machine-readable contract is [openapi.json]
|
|
|
507
538
|
- [`GET /v1/sessions/{sessionId}/entries/{entryId}` — Get a full entry](https://bkper.com/docs/api/managed-agent/operations/getentry.md)
|
|
508
539
|
- [`POST /v1/sessions/{sessionId}/compact` — Compact earlier context](https://bkper.com/docs/api/managed-agent/operations/compactsession.md)
|
|
509
540
|
- [`GET /v1/sessions/{sessionId}/export` — Export a session](https://bkper.com/docs/api/managed-agent/operations/exportsession.md)
|
|
541
|
+
- [`GET /v1/skills` — List skills to call](https://bkper.com/docs/api/managed-agent/operations/listskills.md)
|
|
510
542
|
|
|
511
543
|
### Inputs
|
|
512
544
|
|
|
@@ -543,6 +575,68 @@ Each operation has its own page. The machine-readable contract is [openapi.json]
|
|
|
543
575
|
- [`PUT /v1/domain/services/{serviceId}` — Connect or replace a domain service](https://bkper.com/docs/api/managed-agent/operations/putdomainservice.md)
|
|
544
576
|
- [`DELETE /v1/domain/services/{serviceId}` — Disconnect a domain service](https://bkper.com/docs/api/managed-agent/operations/deletedomainservice.md)
|
|
545
577
|
|
|
578
|
+
### Workspace
|
|
579
|
+
|
|
580
|
+
- [`GET /v1/workspace` — Get the Workspace](https://bkper.com/docs/api/managed-agent/operations/getworkspace.md)
|
|
581
|
+
- [`GET /v1/workspace/status` — Get the working copies' status](https://bkper.com/docs/api/managed-agent/operations/getworkspacestatus.md)
|
|
582
|
+
- [`GET /v1/workspace/books` — List Books to copy to](https://bkper.com/docs/api/managed-agent/operations/listworkspacebooks.md)
|
|
583
|
+
- [`POST /v1/workspace/copy` — Copy or move to another repository](https://bkper.com/docs/api/managed-agent/operations/copyworkspaceentry.md)
|
|
584
|
+
- [`GET /v1/workspace/user` — Get a repository](https://bkper.com/docs/api/managed-agent/operations/getusercontext.md)
|
|
585
|
+
- [`GET /v1/workspace/user/file` — Read a file](https://bkper.com/docs/api/managed-agent/operations/getusercontextfile.md)
|
|
586
|
+
- [`PUT /v1/workspace/user/file` — Write a file](https://bkper.com/docs/api/managed-agent/operations/putusercontextfile.md)
|
|
587
|
+
- [`GET /v1/workspace/user/image` — Read a picture](https://bkper.com/docs/api/managed-agent/operations/getusercontextimage.md)
|
|
588
|
+
- [`GET /v1/workspace/user/history` — List history](https://bkper.com/docs/api/managed-agent/operations/listusercontexthistory.md)
|
|
589
|
+
- [`GET /v1/workspace/user/commit` — Get a commit's changes](https://bkper.com/docs/api/managed-agent/operations/getusercontextcommit.md)
|
|
590
|
+
- [`POST /v1/workspace/user/revert` — Undo a commit](https://bkper.com/docs/api/managed-agent/operations/revertusercontext.md)
|
|
591
|
+
- [`POST /v1/workspace/user/move` — Move or rename a file or folder](https://bkper.com/docs/api/managed-agent/operations/moveusercontextentry.md)
|
|
592
|
+
- [`POST /v1/workspace/user/delete` — Delete a file or folder](https://bkper.com/docs/api/managed-agent/operations/deleteusercontextentry.md)
|
|
593
|
+
- [`POST /v1/workspace/user/add` — Add files](https://bkper.com/docs/api/managed-agent/operations/addusercontextfiles.md)
|
|
594
|
+
- [`POST /v1/workspace/user/discard` — Discard changes](https://bkper.com/docs/api/managed-agent/operations/discardusercontext.md)
|
|
595
|
+
- [`GET /v1/workspace/user/changes` — Review the changes](https://bkper.com/docs/api/managed-agent/operations/getusercontextchanges.md)
|
|
596
|
+
- [`POST /v1/workspace/user/save` — Save](https://bkper.com/docs/api/managed-agent/operations/saveusercontext.md)
|
|
597
|
+
- [`GET /v1/workspace/domain` — Get a repository](https://bkper.com/docs/api/managed-agent/operations/getdomaincontext.md)
|
|
598
|
+
- [`GET /v1/workspace/domain/file` — Read a file](https://bkper.com/docs/api/managed-agent/operations/getdomaincontextfile.md)
|
|
599
|
+
- [`PUT /v1/workspace/domain/file` — Write a file](https://bkper.com/docs/api/managed-agent/operations/putdomaincontextfile.md)
|
|
600
|
+
- [`GET /v1/workspace/domain/image` — Read a picture](https://bkper.com/docs/api/managed-agent/operations/getdomaincontextimage.md)
|
|
601
|
+
- [`GET /v1/workspace/domain/history` — List history](https://bkper.com/docs/api/managed-agent/operations/listdomaincontexthistory.md)
|
|
602
|
+
- [`GET /v1/workspace/domain/commit` — Get a commit's changes](https://bkper.com/docs/api/managed-agent/operations/getdomaincontextcommit.md)
|
|
603
|
+
- [`POST /v1/workspace/domain/revert` — Undo a commit](https://bkper.com/docs/api/managed-agent/operations/revertdomaincontext.md)
|
|
604
|
+
- [`POST /v1/workspace/domain/move` — Move or rename a file or folder](https://bkper.com/docs/api/managed-agent/operations/movedomaincontextentry.md)
|
|
605
|
+
- [`POST /v1/workspace/domain/delete` — Delete a file or folder](https://bkper.com/docs/api/managed-agent/operations/deletedomaincontextentry.md)
|
|
606
|
+
- [`POST /v1/workspace/domain/add` — Add files](https://bkper.com/docs/api/managed-agent/operations/adddomaincontextfiles.md)
|
|
607
|
+
- [`POST /v1/workspace/domain/discard` — Discard changes](https://bkper.com/docs/api/managed-agent/operations/discarddomaincontext.md)
|
|
608
|
+
- [`GET /v1/workspace/domain/changes` — Review the changes](https://bkper.com/docs/api/managed-agent/operations/getdomaincontextchanges.md)
|
|
609
|
+
- [`POST /v1/workspace/domain/save` — Save](https://bkper.com/docs/api/managed-agent/operations/savedomaincontext.md)
|
|
610
|
+
- [`GET /v1/workspace/books/{bookId}` — Get a repository](https://bkper.com/docs/api/managed-agent/operations/getbookcontext.md)
|
|
611
|
+
- [`GET /v1/workspace/books/{bookId}/file` — Read a file](https://bkper.com/docs/api/managed-agent/operations/getbookcontextfile.md)
|
|
612
|
+
- [`PUT /v1/workspace/books/{bookId}/file` — Write a file](https://bkper.com/docs/api/managed-agent/operations/putbookcontextfile.md)
|
|
613
|
+
- [`GET /v1/workspace/books/{bookId}/image` — Read a picture](https://bkper.com/docs/api/managed-agent/operations/getbookcontextimage.md)
|
|
614
|
+
- [`GET /v1/workspace/books/{bookId}/history` — List history](https://bkper.com/docs/api/managed-agent/operations/listbookcontexthistory.md)
|
|
615
|
+
- [`GET /v1/workspace/books/{bookId}/commit` — Get a commit's changes](https://bkper.com/docs/api/managed-agent/operations/getbookcontextcommit.md)
|
|
616
|
+
- [`POST /v1/workspace/books/{bookId}/revert` — Undo a commit](https://bkper.com/docs/api/managed-agent/operations/revertbookcontext.md)
|
|
617
|
+
- [`POST /v1/workspace/books/{bookId}/move` — Move or rename a file or folder](https://bkper.com/docs/api/managed-agent/operations/movebookcontextentry.md)
|
|
618
|
+
- [`POST /v1/workspace/books/{bookId}/delete` — Delete a file or folder](https://bkper.com/docs/api/managed-agent/operations/deletebookcontextentry.md)
|
|
619
|
+
- [`POST /v1/workspace/books/{bookId}/add` — Add files](https://bkper.com/docs/api/managed-agent/operations/addbookcontextfiles.md)
|
|
620
|
+
- [`POST /v1/workspace/books/{bookId}/discard` — Discard changes](https://bkper.com/docs/api/managed-agent/operations/discardbookcontext.md)
|
|
621
|
+
- [`GET /v1/workspace/books/{bookId}/changes` — Review the changes](https://bkper.com/docs/api/managed-agent/operations/getbookcontextchanges.md)
|
|
622
|
+
- [`POST /v1/workspace/books/{bookId}/save` — Save](https://bkper.com/docs/api/managed-agent/operations/savebookcontext.md)
|
|
623
|
+
- [`GET /v1/workspace/apps/{appId}` — Get a repository](https://bkper.com/docs/api/managed-agent/operations/getappsource.md)
|
|
624
|
+
- [`GET /v1/workspace/apps/{appId}/file` — Read a file](https://bkper.com/docs/api/managed-agent/operations/getappsourcefile.md)
|
|
625
|
+
- [`PUT /v1/workspace/apps/{appId}/file` — Write a file](https://bkper.com/docs/api/managed-agent/operations/putappsourcefile.md)
|
|
626
|
+
- [`GET /v1/workspace/apps/{appId}/image` — Read a picture](https://bkper.com/docs/api/managed-agent/operations/getappsourceimage.md)
|
|
627
|
+
- [`GET /v1/workspace/apps/{appId}/history` — List history](https://bkper.com/docs/api/managed-agent/operations/listappsourcehistory.md)
|
|
628
|
+
- [`GET /v1/workspace/apps/{appId}/commit` — Get a commit's changes](https://bkper.com/docs/api/managed-agent/operations/getappsourcecommit.md)
|
|
629
|
+
- [`POST /v1/workspace/apps/{appId}/revert` — Undo a commit](https://bkper.com/docs/api/managed-agent/operations/revertappsource.md)
|
|
630
|
+
- [`POST /v1/workspace/apps/{appId}/move` — Move or rename a file or folder](https://bkper.com/docs/api/managed-agent/operations/moveappsourceentry.md)
|
|
631
|
+
- [`POST /v1/workspace/apps/{appId}/delete` — Delete a file or folder](https://bkper.com/docs/api/managed-agent/operations/deleteappsourceentry.md)
|
|
632
|
+
- [`POST /v1/workspace/apps/{appId}/add` — Add files](https://bkper.com/docs/api/managed-agent/operations/addappsourcefiles.md)
|
|
633
|
+
- [`POST /v1/workspace/apps/{appId}/discard` — Discard changes](https://bkper.com/docs/api/managed-agent/operations/discardappsource.md)
|
|
634
|
+
- [`GET /v1/workspace/apps/{appId}/changes` — Review the changes](https://bkper.com/docs/api/managed-agent/operations/getappsourcechanges.md)
|
|
635
|
+
- [`POST /v1/workspace/apps/{appId}/save` — Save](https://bkper.com/docs/api/managed-agent/operations/saveappsource.md)
|
|
636
|
+
- [`GET /v1/workspace/apps/{appId}/secrets` — List an App's secrets](https://bkper.com/docs/api/managed-agent/operations/listappsecrets.md)
|
|
637
|
+
- [`PUT /v1/workspace/apps/{appId}/secrets/{name}` — Set an App's secret](https://bkper.com/docs/api/managed-agent/operations/putappsecret.md)
|
|
638
|
+
- [`DELETE /v1/workspace/apps/{appId}/secrets/{name}` — Delete an App's secret](https://bkper.com/docs/api/managed-agent/operations/deleteappsecret.md)
|
|
639
|
+
|
|
546
640
|
### Models
|
|
547
641
|
|
|
548
642
|
- [`GET /v1/models` — List models](https://bkper.com/docs/api/managed-agent/operations/listmodels.md)
|