The application constructs one client. The client reads every setting below from the configuration, so the code states no setting.
import { Provely } from '@provely/sdk';
new Provely();
from provely import Provely
Provely()
The client needs an API key. Set PROVELY_API_KEY before the client starts. Get your API key: sign in at app.provely.sh/account/api-keys, open API keys, and create a key. The dashboard shows the key once. Keep it in an environment variable, never in code. Or run provely login once on your machine: the SDKs then read the key that it stores.
Which settings does the TypeScript SDK read?
| Member | Type | Default | Environment | What it does |
|---|---|---|---|---|
api_key | string | none | PROVELY_API_KEY | The API key. Empty means not set. The client needs one credential. |
rules | string[] | ['.provely', 'provely'] | PROVELY_RULES | The sources of the rules, in order: a later source wins on each setting. The default is [".provely", "provely"]: the local directory, then the rules of the account of the key at {base_url}/v1/rules. .provely names the parent of plans_dir. A path, a URL, git+<repo>#<ref> and learned are other sources. A trailing "!" marks a source as required, and strict refuses to start without it. |
guard_mode | observe | enforce | observe | PROVELY_GUARD_MODE | The posture of the guard and of the authority checks: observe records each finding and changes nothing, enforce applies the action that the check engine answers. The application states no posture in code, so new Provely() reads this key. |
defense | correct | record | correct | PROVELY_DEFENSE | The posture of the local defenses: correct acts, and record records. |
read_tools | string[] | none | PROVELY_READ_TOOLS | The tools that a person marks as a read, by name. A marked tool never refuses an identical repeat in one agent call: a status poll is valid. Only a person marks a read. A tool annotation or an effect that the model states never does. |
tool_timeout_ms | integer | 600000 | PROVELY_TOOL_TIMEOUT_MS | How long the guard waits for one guarded tool. Zero turns the limit off. This is the fallback: a timeout that the code states for the tool wins. The default is 600 s, the request default of the two largest model SDKs. A zero default let a tool that hangs hold the agent forever. |
decision_log | string | false | .provely/decisions.jsonl | PROVELY_DECISION_LOG | The local decision log: a file path, and one JSON line for each engine action. The default is .provely/decisions.jsonl under the working directory. off or false turns it off. |
strict | boolean | false | PROVELY_STRICT | Set true to refuse to start on a problem that the default only warns about. The problems are an unsupported framework version, a rules file that does not load, and a rule that does not apply. A required rules source with no answer, and a setting that changes a fixed check, are problems too. The default is false: each problem writes a warning, and the defaults hold. |
Which settings does the Python SDK read?
| Member | Type | Default | Environment | What it does |
|---|---|---|---|---|
api_key | str | None | none | PROVELY_API_KEY | The API key, or None. The client needs one credential: this key or bearer_token. The key decides the account. The control plane answers with the rules of the organisation of the key, or of its user when the user has no organisation. The key never appears in a log, a line or repr. The environment key is PROVELY_API_KEY. |
rules | tuple[str, ...] | (".provely", "provely") | PROVELY_RULES | The sources of the rules, in order: a later source wins on each setting. The default reads the local directory, then the rules of the account of the key at {base_url}/v1/rules. .provely names the parent of plans_dir. A path, a URL, git+<repo>#<ref> and learned are other sources. A trailing "!" marks a source as required, and strict refuses to start without it. The environment states the sources separated by commas, or a JSON array. |
guard_mode | str | observe | PROVELY_GUARD_MODE | The posture of the guard and of the local checks: observe or enforce. observe records each finding and changes nothing. enforce applies the action that the check engine answers. The application states no posture in code, so Provely() reads this member. It is the key PROVELY_GUARD_MODE of the TypeScript SDK. |
defense | str | correct | PROVELY_DEFENSE | The posture of the local defenses: correct acts, and record records. |
read_tools | tuple[str, ...] | none | PROVELY_READ_TOOLS | The tools that a person marks as a read, by name. A marked tool never refuses an identical repeat in one agent call: a status poll is valid. Only a person marks a read. A tool annotation or an effect that the model states never does. The environment states the names separated by commas, or a JSON array. |
tool_timeout_s | float | 600.0 | PROVELY_TOOL_TIMEOUT_S | How long the guard waits for one asynchronous guarded tool. Zero turns the limit off. This is the fallback: a timeout that the code states for the tool wins. The default is 600 s, the request default of the two largest model SDKs. A zero default let a tool that hangs hold the agent forever. |
sync_tool_timeout_s | float | 0.0 | PROVELY_SYNC_TOOL_TIMEOUT_S | How long the guard waits for one synchronous guarded tool. Zero turns the limit off. The default is off. A bound runs the tool on a worker thread. By default, Provely never changes how a tool runs. A sqlite object or a per-thread database connection, such as that of Django, belongs to the thread of the caller. A synchronous tool that hangs is therefore not bounded by default. An operator who states a bound accepts the worker thread. |
decision_log | str | None | .provely/decisions.jsonl | PROVELY_DECISION_LOG | The local decision log: a file path, and one JSON line for each engine action. The default is .provely/decisions.jsonl under the working directory. off or False turns it off. |
strict | bool | False | PROVELY_STRICT | Set True to refuse to start on a problem that the default only warns about. Under strict, six problems stop the start. Three are a rules file that does not load, a rule that does not apply, and the dev posture. Rules with no signers of the organisation are a problem. A configuration or a rule that tries to change a fixed check is a problem. A framework plugin that cannot guard its framework is a problem too. The default is False: each problem writes a warning, and the defaults hold. A fixed check then stays on, with a refused_fixed line. It is the key strict of the TypeScript SDK. |
Which code markers does the SDK have?
A marker is optional. It states a rule on the object in the code, and it gives back the same object.
| Language | Marker | What it does | Example or arguments |
|---|---|---|---|
| TypeScript | provely.read | Mark a tool as a read: it changes nothing. Answer the same object. | const getCharge = provely.read(tool({ ... }), { why: 'lookup only' }) |
| TypeScript | provely.skip | Turn one check of a tool off. Answer the same object. | provely.skip(issueRefund, 'fm.tool_timeout', { why: 'batch job', until: '2026-12-31' }) |
| TypeScript | provely.off | Turn the guard of an agent off: it runs unguarded. Answer the same object. | provely.off(evalAgent, { why: 'offline eval; tools are fakes' }) |
| TypeScript | provely.name | Give an agent its stable name. Every rule keys on it. A name changes no setting, so it needs no why. Answer the same object. | const agent = provely.name(createAgent({ ... }), 'refund-bot') |
| Python | provely.read | Mark a tool as a read: it changes nothing. Answer the same object. | @provely.read |
| Python | provely.skip | Turn one check of a tool off. Answer the same object. | @provely.skip("fm.tool_timeout", why="batch refunds take minutes") |
| Python | provely.off | Turn the guard of an agent off: it runs unguarded. Answer the same object. | evals = provely.off(eval_graph, why="offline eval") |
| Python | provely.name | Give an agent its stable name. Every rule keys on it. Answer the same object. | graph = provely.name(builder.compile(), "refund-bot") |
Rules and markers reach a check run in these SDKs:
- TypeScript frameworks:
sdks/typescript/src/defenses/runtime.tsat5a8f6a6c. - Python frameworks:
sdks/python/src/provely/frameworks.pyatd4fe6faf. - TypeScript plain model SDKs:
sdks/typescript-instrumentations/src/plain-sdk.tsate9aa6a40. - Python plain model SDKs:
sdks/python-instrumentations/src/provely_instrumentations/plain_sdk.pyate9aa6a40.
These callers are not on the head 52d68c2b. The settings and markers come from that head.
Where this page comes from
A generator writes this page from the files below. A test fails when the page differs from them.
| File | Commit | Committed |
|---|---|---|
sdks/typescript/src/config.ts | 52d68c2b | 2026-10-18 |
sdks/python/src/provely/config.py | 52d68c2b | 2026-10-18 |
sdks/typescript/src/plan/markers.ts | afa42297 | 2026-10-17 |
sdks/python/src/provely/plan/markers.py | afa42297 | 2026-10-17 |
sdks/typescript/src/defenses/runtime.ts | 5a8f6a6c | 2026-10-17 |
sdks/python/src/provely/frameworks.py | d4fe6faf | 2026-10-17 |
sdks/typescript-instrumentations/src/plain-sdk.ts | e9aa6a40 | 2026-10-17 |
sdks/python-instrumentations/src/provely_instrumentations/plain_sdk.py | e9aa6a40 | 2026-10-17 |