API reference
Brews
Packaged agent recipes: browse, install, run, benchmark and evaluate them.
- Operations
- 22
- Base path
https://os.one.ml/api/v1/brews- Scopes
brews:readbrews:write- API keys
- 2 untested · 20 tested with an API key
- SDK
genesis.call('brews_runBrewBench', …)· helpers undergenesis.brews- MCP
- 22 tools
Operations
Bench
Run a Brew's benchmark (answers 503 BREWS_E_METERING_UNAVAILABLE through Genesis)
POST/v1/brews/bench/run
Answers 503 BREWS_E_METERING_UNAVAILABLE through Genesis. Needs brews:write.
Request body application/json
scopeobjectOptional. Filled from the selection; when sent it must name the same context.
scope.platformId"brews"scope.organizationIdstringrequiredscope.workspaceIdstringscope.projectIdstringrequiredscope.environmentIdstringrequiredsandbox or live
brewUristringrequired
Responses
- 401Credential missing or invalid
- 403SCOPE_MISSING or BREWS_E_ACCESS_DENIED
- 503BREWS_E_METERING_UNAVAILABLE: run, eval and bench are not available through Genesis
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/brews/bench/run" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"brewUri": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('brews_runBrewBench', {
body: {
brewUri: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "brews_runBrewBench",
"arguments": {
"body": {
"brewUri": "string"
}
}
}
}Card
Get a Brew's card
POST/v1/brews/card
Needs brews:read.
Request body application/json
scopeobjectOptional. Filled from the selection; when sent it must name the same context.
scope.platformId"brews"scope.organizationIdstringrequiredscope.workspaceIdstringscope.projectIdstringrequiredscope.environmentIdstringrequiredsandbox or live
brewUristringrequired
Responses
- 200Brews result envelope
Response fields
successbooleanrequireddataanyerrorobject | nullerror.codestringerror.messagestring
- 400BREWS_E_BAD_REQUEST or a scope error
- 401Credential missing or invalid
- 403SCOPE_MISSING, BREWS_E_ACCESS_DENIED or BREWS_E_SCOPE_MISMATCH
- 404Not found
- 503Brews unavailable
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/brews/card" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"brewUri": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('brews_getBrewCard', {
body: {
brewUri: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "brews_getBrewCard",
"arguments": {
"body": {
"brewUri": "string"
}
}
}
}Compile
Compile a Brew for a target runtime
POST/v1/brews/compile
Needs brews:read.
Request body application/json
scopeobjectOptional. Filled from the selection; when sent it must name the same context.
scope.platformId"brews"scope.organizationIdstringrequiredscope.workspaceIdstringscope.projectIdstringrequiredscope.environmentIdstringrequiredsandbox or live
brewUristringrequiredtargetstringrequired
Responses
- 200Brews result envelope
Response fields
successbooleanrequireddataanyerrorobject | nullerror.codestringerror.messagestring
- 400BREWS_E_BAD_REQUEST or a scope error
- 401Credential missing or invalid
- 403SCOPE_MISSING, BREWS_E_ACCESS_DENIED or BREWS_E_SCOPE_MISMATCH
- 404Not found
- 503Brews unavailable
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/brews/compile" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"brewUri": "string",
"target": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('brews_compileBrew', {
body: {
brewUri: 'string',
target: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "brews_compileBrew",
"arguments": {
"body": {
"brewUri": "string",
"target": "string"
}
}
}
}Create
Create a Brew from a signed manifest
POST/v1/brews/create
Needs brews:write.
Request body application/json
scopeobjectOptional. Filled from the selection; when sent it must name the same context.
scope.platformId"brews"scope.organizationIdstringrequiredscope.workspaceIdstringscope.projectIdstringrequiredscope.environmentIdstringrequiredsandbox or live
manifestobjectrequiredauthorDidstringrequiredsignatureKeyIdstringrequiredsignaturestringrequired
Responses
- 200Brews result envelope
Response fields
successbooleanrequireddataanyerrorobject | nullerror.codestringerror.messagestring
- 400BREWS_E_BAD_REQUEST or a scope error
- 401Credential missing or invalid
- 403SCOPE_MISSING, BREWS_E_ACCESS_DENIED or BREWS_E_SCOPE_MISMATCH
- 404Not found
- 503Brews unavailable
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/brews/create" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"manifest": {},
"authorDid": "string",
"signatureKeyId": "string",
"signature": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('brews_createBrew', {
body: {
manifest: {},
authorDid: 'string',
signatureKeyId: 'string',
signature: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "brews_createBrew",
"arguments": {
"body": {
"manifest": {},
"authorDid": "string",
"signatureKeyId": "string",
"signature": "string"
}
}
}
}Decisions
Create a typed brews.decision.v1 decision
POST/v1/brews/decisions
Needs brews:write and an Idempotency-Key. Decisions are admitted only when Brews reports acceptingDecisions.
Parameters
Idempotency-Keyheader · stringrequiredStable key; a retry with it returns the original decision instead of creating another
Request body application/json
A JSON object; see the description above.
Responses
- 200Typed result
Response fields
A JSON object.
- 400Invalid request
- 401Credential missing or invalid
- 403SCOPE_MISSING or PERMISSION_DENIED
- 404Not found in the selected organization and project
- 409Idempotency conflict
- 503Decisions not accepted yet (see GET /v1/brews/decisions/status)
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/brews/decisions" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const idempotencyKey = '<a stable key per change>'
const result = await genesis.call('brews_createDecision', {
body: {},
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "brews_createDecision",
"arguments": {
"body": {},
"idempotency_key": "<a stable key per change>"
}
}
}Get a decision
GET/v1/brews/decisions/{decisionId}
Needs brews:read. Only decisions of the selected organization and project are visible.
Parameters
decisionIdpath · stringrequired
Responses
- 200Typed result
Response fields
A JSON object.
- 400Invalid request
- 401Credential missing or invalid
- 403SCOPE_MISSING or PERMISSION_DENIED
- 404Not found in the selected organization and project
- 409Idempotency conflict
- 503Decisions not accepted yet (see GET /v1/brews/decisions/status)
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/brews/decisions/$DECISION_ID" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('brews_getDecision', {
decisionId: '<decisionId>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "brews_getDecision",
"arguments": {
"decisionId": "<decisionId>"
}
}
}Brews decision readiness and contract
GET/v1/brews/decisions/status
Needs brews:read. Public readiness report with no tenant data.
Responses
- 200Readiness report
Response fields
A JSON object.
- 503Brews unavailable
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/brews/decisions/status" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('brews_getDecisionStatus'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "brews_getDecisionStatus",
"arguments": {}
}
}Reconcile
Reconcile a decision held in custody
POST/v1/brews/decisions/{decisionId}/reconcile
Needs brews:write and the Idempotency-Key the decision was created with.
Parameters
decisionIdpath · stringrequiredIdempotency-Keyheader · stringrequiredStable key; a retry with it returns the original decision instead of creating another
Request body application/json
A JSON object; see the description above.
Responses
- 200Typed result
Response fields
A JSON object.
- 400Invalid request
- 401Credential missing or invalid
- 403SCOPE_MISSING or PERMISSION_DENIED
- 404Not found in the selected organization and project
- 409Idempotency conflict
- 503Decisions not accepted yet (see GET /v1/brews/decisions/status)
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/brews/decisions/$DECISION_ID/reconcile" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const idempotencyKey = '<a stable key per change>'
const result = await genesis.call('brews_reconcileDecision', {
decisionId: '<decisionId>',
body: {},
}, {
headers: { 'Idempotency-Key': idempotencyKey }, // one key per change, reused on every retry
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "brews_reconcileDecision",
"arguments": {
"decisionId": "<decisionId>",
"body": {},
"idempotency_key": "<a stable key per change>"
}
}
}Delete
Delete a Brew from the selected project
POST/v1/brews/delete
Needs brews:write. Deletes one Brew version from the caller's organization, project and environment and returns its digest; the version can be created again afterwards. A Brew in another scope is 404 BREWS_E_NOT_FOUND; an exchange install is 409 BREWS_E_EXCHANGE_INSTALL (use uninstallBrew).
Request body application/json
scopeobjectOptional. Filled from the selection; when sent it must name the same context.
scope.platformId"brews"scope.organizationIdstringrequiredscope.workspaceIdstringscope.projectIdstringrequiredscope.environmentIdstringrequiredsandbox or live
brewUristringrequiredreasonstring
Responses
- 200Brews result envelope
Response fields
successbooleanrequireddataanyerrorobject | nullerror.codestringerror.messagestring
- 400BREWS_E_BAD_REQUEST, BREWS_E_INVALID_URI or a scope error
- 401Credential missing or invalid
- 403SCOPE_MISSING, BREWS_E_ACCESS_DENIED or BREWS_E_SCOPE_MISMATCH
- 404BREWS_E_NOT_FOUND: no such Brew in the selected organization, project and environment
- 409BREWS_E_EXCHANGE_INSTALL or BREWS_E_NOT_AN_INSTALL: the other removal applies
- 503Brews unavailable
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/brews/delete" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"brewUri": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('brews_deleteBrew', {
body: {
brewUri: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "brews_deleteBrew",
"arguments": {
"body": {
"brewUri": "string"
}
}
}
}Eval
Evaluate a Brew against a dataset (answers 503 BREWS_E_METERING_UNAVAILABLE through Genesis)
POST/v1/brews/eval
Answers 503 BREWS_E_METERING_UNAVAILABLE through Genesis. Needs brews:write.
Request body application/json
scopeobjectOptional. Filled from the selection; when sent it must name the same context.
scope.platformId"brews"scope.organizationIdstringrequiredscope.workspaceIdstringscope.projectIdstringrequiredscope.environmentIdstringrequiredsandbox or live
brewUristringrequireddatasetanyoracleRatenumber
Responses
- 401Credential missing or invalid
- 403SCOPE_MISSING or BREWS_E_ACCESS_DENIED
- 503BREWS_E_METERING_UNAVAILABLE: run, eval and bench are not available through Genesis
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/brews/eval" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"brewUri": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('brews_evalBrew', {
body: {
brewUri: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "brews_evalBrew",
"arguments": {
"body": {
"brewUri": "string"
}
}
}
}Exchange
Get an exchange listing
POST/v1/brews/exchange/get
Needs brews:read.
Request body application/json
scopeobjectOptional. Filled from the selection; when sent it must name the same context.
scope.platformId"brews"scope.organizationIdstringrequiredscope.workspaceIdstringscope.projectIdstringrequiredscope.environmentIdstringrequiredsandbox or live
brewUristringrequired
Responses
- 200Brews result envelope
Response fields
successbooleanrequireddataanyerrorobject | nullerror.codestringerror.messagestring
- 400BREWS_E_BAD_REQUEST or a scope error
- 401Credential missing or invalid
- 403SCOPE_MISSING, BREWS_E_ACCESS_DENIED or BREWS_E_SCOPE_MISMATCH
- 404Not found
- 503Brews unavailable
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/brews/exchange/get" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"brewUri": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('brews_getExchangeListing', {
body: {
brewUri: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "brews_getExchangeListing",
"arguments": {
"body": {
"brewUri": "string"
}
}
}
}Install an exchange Brew into the selected project
POST/v1/brews/exchange/install
Needs brews:write.
Request body application/json
scopeobjectOptional. Filled from the selection; when sent it must name the same context.
scope.platformId"brews"scope.organizationIdstringrequiredscope.workspaceIdstringscope.projectIdstringrequiredscope.environmentIdstringrequiredsandbox or live
sourceUristringrequiredtargetNamestring
Responses
- 200Brews result envelope
Response fields
successbooleanrequireddataanyerrorobject | nullerror.codestringerror.messagestring
- 400BREWS_E_BAD_REQUEST or a scope error
- 401Credential missing or invalid
- 403SCOPE_MISSING, BREWS_E_ACCESS_DENIED or BREWS_E_SCOPE_MISMATCH
- 404Not found
- 503Brews unavailable
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/brews/exchange/install" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sourceUri": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('brews_installBrew', {
body: {
sourceUri: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "brews_installBrew",
"arguments": {
"body": {
"sourceUri": "string"
}
}
}
}List exchange Brews visible to the selected project
POST/v1/brews/exchange/list
Needs brews:read.
Request body application/json
scopeobjectOptional. Filled from the selection; when sent it must name the same context.
scope.platformId"brews"scope.organizationIdstringrequiredscope.workspaceIdstringscope.projectIdstringrequiredscope.environmentIdstringrequiredsandbox or live
Responses
- 200Brews result envelope
Response fields
successbooleanrequireddataanyerrorobject | nullerror.codestringerror.messagestring
- 400BREWS_E_BAD_REQUEST or a scope error
- 401Credential missing or invalid
- 403SCOPE_MISSING, BREWS_E_ACCESS_DENIED or BREWS_E_SCOPE_MISMATCH
- 404Not found
- 503Brews unavailable
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/brews/exchange/list" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('brews_listExchange', {
body: {},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "brews_listExchange",
"arguments": {
"body": {}
}
}
}List public Brews on the exchange
GET/v1/brews/exchange/public
Needs brews:read. The listing itself is public and carries no tenant data.
Responses
- 200Brews result envelope
Response fields
successbooleanrequireddataanyerrorobject | nullerror.codestringerror.messagestring
- 400BREWS_E_BAD_REQUEST or a scope error
- 401Credential missing or invalid
- 403SCOPE_MISSING, BREWS_E_ACCESS_DENIED or BREWS_E_SCOPE_MISMATCH
- 404Not found
- 503Brews unavailable
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/brews/exchange/public" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('brews_listPublicExchange'){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "brews_listPublicExchange",
"arguments": {}
}
}Uninstall an exchange Brew from the selected project
POST/v1/brews/exchange/uninstall
Needs brews:write. Removes a Brew that installBrew put in the caller's organization, project and environment, and drops the source listing's install count. A Brew in another scope is 404 BREWS_E_NOT_FOUND; a Brew that was not installed from the exchange is 409 BREWS_E_NOT_AN_INSTALL.
Request body application/json
scopeobjectOptional. Filled from the selection; when sent it must name the same context.
scope.platformId"brews"scope.organizationIdstringrequiredscope.workspaceIdstringscope.projectIdstringrequiredscope.environmentIdstringrequiredsandbox or live
installedUristringrequired
Responses
- 200Brews result envelope
Response fields
successbooleanrequireddataanyerrorobject | nullerror.codestringerror.messagestring
- 400BREWS_E_BAD_REQUEST, BREWS_E_INVALID_URI or a scope error
- 401Credential missing or invalid
- 403SCOPE_MISSING, BREWS_E_ACCESS_DENIED or BREWS_E_SCOPE_MISMATCH
- 404BREWS_E_NOT_FOUND: no such Brew in the selected organization, project and environment
- 409BREWS_E_EXCHANGE_INSTALL or BREWS_E_NOT_AN_INSTALL: the other removal applies
- 503Brews unavailable
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/brews/exchange/uninstall" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"installedUri": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('brews_uninstallBrew', {
body: {
installedUri: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "brews_uninstallBrew",
"arguments": {
"body": {
"installedUri": "string"
}
}
}
}Get
Get a Brew by URI
POST/v1/brews/get
Needs brews:read.
Request body application/json
scopeobjectOptional. Filled from the selection; when sent it must name the same context.
scope.platformId"brews"scope.organizationIdstringrequiredscope.workspaceIdstringscope.projectIdstringrequiredscope.environmentIdstringrequiredsandbox or live
brewUristringrequired
Responses
- 200Brews result envelope
Response fields
successbooleanrequireddataanyerrorobject | nullerror.codestringerror.messagestring
- 400BREWS_E_BAD_REQUEST or a scope error
- 401Credential missing or invalid
- 403SCOPE_MISSING, BREWS_E_ACCESS_DENIED or BREWS_E_SCOPE_MISMATCH
- 404Not found
- 503Brews unavailable
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/brews/get" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"brewUri": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('brews_getBrew', {
body: {
brewUri: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "brews_getBrew",
"arguments": {
"body": {
"brewUri": "string"
}
}
}
}List
List Brews in the selected project
POST/v1/brews/list
Needs brews:read. Optional filter by state, tag or author.
Request body application/json
scopeobjectOptional. Filled from the selection; when sent it must name the same context.
scope.platformId"brews"scope.organizationIdstringrequiredscope.workspaceIdstringscope.projectIdstringrequiredscope.environmentIdstringrequiredsandbox or live
filterobjectfilter.statestringfilter.tagstringfilter.authorDidstring
Responses
- 200Brews result envelope
Response fields
successbooleanrequireddataanyerrorobject | nullerror.codestringerror.messagestring
- 400BREWS_E_BAD_REQUEST or a scope error
- 401Credential missing or invalid
- 403SCOPE_MISSING, BREWS_E_ACCESS_DENIED or BREWS_E_SCOPE_MISMATCH
- 404Not found
- 503Brews unavailable
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/brews/list" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('brews_listBrews', {
body: {},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "brews_listBrews",
"arguments": {
"body": {}
}
}
}Mcp
Call a Brews MCP tool
POST/v1/brews/mcp
One Brews tool call: brews.create, brews.run, brews.eval, brews.list, brews.get, brews.card, brews.compile, brews.bench.run, brews.exchange.list, brews.exchange.get, brews.exchange.install, brews.exchange.uninstall, brews.delete, or a typed brews.decision.v1 / brews.selection.v1 tool. Needs brews:read; tools that write need brews:write, checked by Brews per tool. arguments.scope is filled from the selection.
Request body application/json
toolstringrequiredargumentsobjectrequired
Responses
- 200Brews result envelope
Response fields
successbooleanrequireddataanyerrorobject | nullerror.codestringerror.messagestring
- 400BREWS_E_BAD_REQUEST or a scope error
- 401Credential missing or invalid
- 403SCOPE_MISSING, BREWS_E_ACCESS_DENIED or BREWS_E_SCOPE_MISMATCH
- 404Not found
- 503Brews unavailable
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/brews/mcp" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"tool": "string",
"arguments": {}
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('brews_callTool', {
body: {
tool: 'string',
arguments: {},
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "brews_callTool",
"arguments": {
"body": {
"tool": "string",
"arguments": {}
}
}
}
}Run
Run a Brew (answers 503 BREWS_E_METERING_UNAVAILABLE through Genesis)
POST/v1/brews/run
Answers 503 BREWS_E_METERING_UNAVAILABLE through Genesis. Needs brews:write.
Request body application/json
scopeobjectOptional. Filled from the selection; when sent it must name the same context.
scope.platformId"brews"scope.organizationIdstringrequiredscope.workspaceIdstringscope.projectIdstringrequiredscope.environmentIdstringrequiredsandbox or live
brewUristringrequiredinputsanyrequiredidempotencyKeystring
Responses
- 401Credential missing or invalid
- 403SCOPE_MISSING or BREWS_E_ACCESS_DENIED
- 503BREWS_E_METERING_UNAVAILABLE: run, eval and bench are not available through Genesis
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/brews/run" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"brewUri": "string",
"inputs": "string"
}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('brews_runBrew', {
body: {
brewUri: 'string',
inputs: 'string',
},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "brews_runBrew",
"arguments": {
"body": {
"brewUri": "string",
"inputs": "string"
}
}
}
}Selections
Create a typed brews.selection.v1 selection
POST/v1/brews/selections
Needs brews:write.
Request body application/json
A JSON object; see the description above.
Responses
- 200Typed result
Response fields
A JSON object.
- 400Invalid request
- 401Credential missing or invalid
- 403SCOPE_MISSING or PERMISSION_DENIED
- 404Not found in the selected organization and project
- 409Idempotency conflict
- 503Decisions not accepted yet (see GET /v1/brews/decisions/status)
- 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/brews/selections" \
-H "Authorization: Bearer $GENESIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('brews_createSelection', {
body: {},
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "brews_createSelection",
"arguments": {
"body": {}
}
}
}Get a selection receipt
GET/v1/brews/selections/{selectionRecordId}
Needs brews:read.
Parameters
selectionRecordIdpath · stringrequired
Responses
- 200Typed result
Response fields
A JSON object.
- 400Invalid request
- 401Credential missing or invalid
- 403SCOPE_MISSING or PERMISSION_DENIED
- 404Not found in the selected organization and project
- 409Idempotency conflict
- 503Decisions not accepted yet (see GET /v1/brews/decisions/status)
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/brews/selections/$SELECTION_RECORD_ID" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('brews_getSelection', {
selectionRecordId: '<selectionRecordId>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "brews_getSelection",
"arguments": {
"selectionRecordId": "<selectionRecordId>"
}
}
}Recover a selection by the caller's selection id
GET/v1/brews/selections/by-selection-id/{selectionId}
Needs brews:read.
Parameters
selectionIdpath · stringrequired
Responses
- 200Typed result
Response fields
A JSON object.
- 400Invalid request
- 401Credential missing or invalid
- 403SCOPE_MISSING or PERMISSION_DENIED
- 404Not found in the selected organization and project
- 409Idempotency conflict
- 503Decisions not accepted yet (see GET /v1/brews/decisions/status)
- 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/brews/selections/by-selection-id/$SELECTION_ID" \
-H "Authorization: Bearer $GENESIS_API_KEY"import { Genesis } from '@onesi/genesis'
const genesis = new Genesis({ apiKey: process.env.GENESIS_API_KEY })
const result = await genesis.call('brews_recoverSelection', {
selectionId: '<selectionId>',
}){
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "brews_recoverSelection",
"arguments": {
"selectionId": "<selectionId>"
}
}
}L1fe AI Inc. · Built from Genesis 0.3.1 and the live gateway on 2026-10-25. Support