Skip to content

Intent tools ​

6 operations. Paths are relative to https://api.frege.io.

The environment's intent tools ​

GET/v1/projects/{id}/composites

Every chain defined on this environment, enabled or not, each with the compiler's current verdict and the contract it publishes: the input schema a model is handed, and the output schema it is promised back when the chain declares one. A chain can stop compiling without anybody touching it — the spec it was written against gets replaced — so problem and both schemas are re-derived on every read rather than remembered from write time.

Authentication: bearer token.

Parameters

NameInTypeDescription
id (required)pathstringProject ID

Responses

StatusDescriptionBody
200OKdata
403Forbiddenerror envelope

Define an intent tool ​

POST/v1/projects/{id}/composites

Creates a chain: several of the environment's operations, run in a fixed order, published as ONE tool. Values threaded between steps never enter a model's context. Compiled against the active spec before it is stored, so a chain that does not work is refused here rather than discovered by a model calling it. Manager-only: a chain is a capability, the same class of decision as an agent's allow-list.

Authentication: bearer token.

Parameters

NameInTypeDescription
id (required)pathstringProject ID

Request body (application/json)

Schema: api.compositeRequest.

FieldTypeDescription
definitioninteger[]
enabledboolean
namestring

Responses

StatusDescriptionBody
201Createddata
403Forbiddenerror envelope
409Conflicterror envelope
422Unprocessable Entityerror envelope

Change an intent tool ​

PUT/v1/projects/{id}/composites/{name}

Replaces the chain addressed by {name}, and may rename it. Compiled before it is stored, exactly as on create. Send enabled:false to take it off the environment's tool surface without deleting it — which is where a chain that has stopped compiling can sit while somebody fixes it.

Authentication: bearer token.

Parameters

NameInTypeDescription
id (required)pathstringProject ID
name (required)pathstringCurrent tool name

Request body (application/json)

Schema: api.compositeRequest.

FieldTypeDescription
definitioninteger[]
enabledboolean
namestring

Responses

StatusDescriptionBody
200OKdata
403Forbiddenerror envelope
404Not Founderror envelope
422Unprocessable Entityerror envelope

Remove an intent tool ​

DELETE/v1/projects/{id}/composites/{name}

Deletes the chain. Every generated tool it called stays exactly as callable as before — a chain is one more tool beside them, never a replacement.

Authentication: bearer token.

Parameters

NameInTypeDescription
id (required)pathstringProject ID
name (required)pathstringTool name

Responses

StatusDescriptionBody
204No Content
403Forbiddenerror envelope
404Not Founderror envelope

Run an intent tool without saving it ​

POST/v1/projects/{id}/composites/run

Compiles the submitted chain against the environment's active spec and runs it as one of this environment's connected customers, returning the answer the tool would give a model. Nothing is stored and nothing is published, so a draft or a switched-off tool can be tried before anybody enables it. Every step goes through the same executor a published tool uses, so the write policy, the customer's grants, redaction and the audit trail all apply. Running it is the manager's approval: in an environment that asks before writes, the writes go through (the audit trail names the manager); a read-only environment still refuses them. Manager-only. A 403 has two causes and the error code tells them apart: "forbidden" means the caller is not a manager, and "call_denied" means a STEP was refused by the environment's write policy or by a guardrail. A call_denied names the step and lists the steps that already ran, which is what a caller needs before retrying.

Authentication: bearer token.

Parameters

NameInTypeDescription
id (required)pathstringProject ID

Request body (application/json)

Schema: api.runCompositeRequest.

FieldTypeDescription
argumentsobject (map)
client_idinteger
definitioninteger[]
namestring

Responses

StatusDescriptionBody
200OKdata
403Forbiddenerror envelope
422Unprocessable Entityerror envelope
502Bad Gatewayerror envelope

Compile an intent tool without saving it ​

POST/v1/projects/{id}/composites/validate

Runs the same compiler a write runs, against the environment's active spec, and returns either the reason it will not compile or what it resolved to: the operation behind every step, whether any of them changes something upstream, the input and output schemas a model would be handed, and what the spec already says about each declared input — the values the parameter it feeds accepts, and any value the author declared that it does not. This is what an editor's check button calls, and it stores nothing.

Authentication: bearer token.

Parameters

NameInTypeDescription
id (required)pathstringProject ID

Request body (application/json)

Schema: api.compositeRequest.

FieldTypeDescription
definitioninteger[]
enabledboolean
namestring

Responses

StatusDescriptionBody
200OKdata
403Forbiddenerror envelope