Skip to content

Register and run a skill

Step 4 of every run, affordability, applies Borealis’s affordability policy: an annuity installment, debt-to-income ratios, disposable income, and one of comfortable, tight or unaffordable. It is arithmetic, not judgement, so it must not be a model call. It is also a company policy with an owner and a version, so it should not be a function buried in the agent either. It is an Agent Skill: a versioned package (SKILL.md, a script and a reference document) published to the gateway and run in its sandbox.

brutor-demo-affordability-skill/
├── SKILL.md name, description, inputs, outputs, workflow
├── scripts/affordability.py the policy, stdlib only
└── references/policy.md the thresholds, for an underwriter

The skill itself is given. This page publishes it and calls it. For everything about writing skills, see Agent Skills.

setup.py step 7. Create the skill from its SKILL.md, attach the script and the reference, validate, publish:

  1. Create.

    Terminal window
    curl -X POST http://localhost:5050/v1/admin/agent-skills \
    -H "Authorization: Bearer $ADMIN_TOKEN" -H "Content-Type: application/json" \
    -d "$(jq -n --rawfile md SKILL.md '{
    name: "affordability-check",
    description: "Deterministic affordability assessment for a consumer loan application (annuity installment, DTI, disposable income; comfortable / tight / unaffordable).",
    skill_md_content: $md,
    version: "1.0.0"}')"
    {"skill": {"id": "skill-01M61N3A7RB6CWZ8CM8PCEP4SN", "name": "affordability-check",
    "version": "1.0.0", "status": "draft", "disclosure_mode": "progressive"}}
  2. Attach the script. execution_mode: "sandbox" runs it in the skill runner, isolated from the gateway and the agent.

    Terminal window
    SK=skill-01M61N3A7RB6CWZ8CM8PCEP4SN
    curl -X POST http://localhost:5050/v1/admin/agent-skills/$SK/scripts \
    -H "Authorization: Bearer $ADMIN_TOKEN" -H "Content-Type: application/json" \
    -d "$(jq -n --rawfile src scripts/affordability.py '{
    filename: "affordability.py", language: "python", execution_mode: "sandbox",
    description: "Borealis affordability policy (stdlib only).", script_content: $src}')"
  3. Attach the reference.

    Terminal window
    curl -X POST http://localhost:5050/v1/admin/agent-skills/$SK/resources \
    -H "Authorization: Bearer $ADMIN_TOKEN" -H "Content-Type: application/json" \
    -d "$(jq -n --rawfile md references/policy.md '{
    filename: "policy.md", resource_type: "reference",
    content: $md, mime_type: "text/markdown"}')"
  4. Validate, then publish. Validation returns errors when the package is not publishable; only a published skill can run.

    Terminal window
    curl -X POST http://localhost:5050/v1/admin/agent-skills/$SK/validate \
    -H "Authorization: Bearer $ADMIN_TOKEN" -H "Content-Type: application/json" -d '{}'
    curl -X POST http://localhost:5050/v1/admin/agent-skills/$SK/publish \
    -H "Authorization: Bearer $ADMIN_TOKEN" -H "Content-Type: application/json" -d '{}'
    {"skill": {"id": "skill-01M61N3A7RB6CWZ8CM8PCEP4SN", "status": "published",
    "published_at": "2026-10-28T16:22:09.671487+00:00",
    "skill_md_hash": "d5f232e70787452441247d374c5f551bfcaff57c425e90b06b900de7ae0d974c"}}

Admin UI: AI Estate → Resources → Skills → Configuration.

AI Estate → Resources → Skills → Configuration: affordability-check published at v1.0.0 with its SKILL.md hash, access granted to the Brutor Demo System (AI System) and its last run.

Skills have no access list of their own. Access is a resource-group binding, like every other resource, so the AI System’s inheritance, limits and audit apply to it:

Terminal window
curl -X POST http://localhost:5050/v1/admin/agent-skills/$SK/groups \
-H "Authorization: Bearer $ADMIN_TOKEN" -H "Content-Type: application/json" \
-d '{"group_ids": ["group-01M61N376V2RR6J2TV7Q7EVRET"]}'

Skills are reached through the tenant’s skills MCP server, system-agent-skill-server-default (the tenant id is the suffix). Bind its server config to the AI System, exactly like the MCP servers on the previous page:

Terminal window
curl -X POST http://localhost:5050/v1/admin/resource-groups/$G/server-configs \
-H "Authorization: Bearer $ADMIN_TOKEN" -H "Content-Type: application/json" \
-d '{"server_config_id": "system-agent-skill-server-config-default"}'

The demo grants the skill at two layers: the skills server’s tools, and the skill itself.

Terminal window
A=agent-01M61N3B1GHVSCARE5CJZ5KEZ3
# 1. the skills server's tools (declared; see the note below)
for tool in skills__list skills__load skills__run_script; do
curl -s -X POST http://localhost:5050/v1/admin/agent-identities/$A/grants \
-H "Authorization: Bearer $ADMIN_TOKEN" -H "Content-Type: application/json" \
-d '{"action_type": "mcp_tool", "target": "'$tool'", "effect": "allow"}'
done
# 2. the skill orchestrator: this skill, by id
curl -X POST http://localhost:5050/v1/admin/agent-identities/$A/grants \
-H "Authorization: Bearer $ADMIN_TOKEN" -H "Content-Type: application/json" \
-d '{"action_type": "skill_exec", "target": "skill-01M61N3A7RB6CWZ8CM8PCEP4SN", "effect": "allow"}'

A skill_exec grant can also be approval_required, which parks the run for a human the same way a tool call is parked: Human oversight.

Skills use progressive disclosure: a model-driven agent calls skills__list to see what is available, skills__load to read a skill’s instructions, then skills__run_script. The screening agent’s graph already knows which skill it needs and what the inputs are (they are in SKILL.md), so it goes straight to the run:

screening_agent/gateway.py
def skill_run(self, skill_name: str, script: str, args: dict, **hdr) -> Any:
"""Run one skill script on the skills MCP server (tool skills__run_script)."""
return self.mcp_call(
self.settings.skills_mcp_server_id, # system-agent-skill-server-default
"skills__run_script",
{"skill_name": skill_name, "script": script, "args": args},
**hdr,
)
screening_agent/graph.py — the affordability node
def affordability(state: ScreeningState) -> ScreeningState:
app = state["application"]
args = {
"monthly_income_eur": _number(app.get("monthly_income_eur"), "monthly_income_eur"),
"monthly_expenses_eur": _number(app.get("monthly_expenses_eur"), "monthly_expenses_eur"),
"existing_debt_monthly_eur": _number(app.get("existing_debt_monthly_eur", 0), "existing_debt_monthly_eur"),
"requested_amount_eur": _number(app.get("requested_amount_eur"), "requested_amount_eur"),
"term_months": int(_number(app.get("term_months"), "term_months")),
}
result = _require_dict(
gw.skill_run("affordability-check", "affordability.py", args, **hdr("affordability")),
"affordability skill")
cls = str(result.get("affordability_class", "")).lower()
if cls not in AFFORDABILITY_CLASSES: # comfortable | tight | unaffordable
raise ToolError(f"affordability skill returned unknown class {cls!r}")
result["affordability_class"] = cls
return {"affordability": result}

The request is an ordinary MCP tools/call, with the same run, step and turn headers as the tool calls around it:

{"jsonrpc": "2.0", "id": 4, "method": "tools/call",
"params": {"name": "skills__run_script",
"arguments": {"skill_name": "affordability-check", "script": "affordability.py",
"args": {"monthly_income_eur": 4200, "monthly_expenses_eur": 1650,
"existing_debt_monthly_eur": 310,
"requested_amount_eur": 12000, "term_months": 48}},
"_meta": {"io.modelcontextprotocol/clientInfo":
{"name": "brutor-demo-screening-agent", "version": "0.2.0"}}}}

The runner hands args to the script as {"input_params": {...}} on stdin; the script’s stdout comes back as the tool result’s text:

{"jsonrpc": "2.0", "id": 4,
"result": {"content": [{"type": "text",
"text": "{\"affordability_class\": \"comfortable\", \"disposable_after_eur\": 1938.52, \"dti_after\": 0.1456, \"dti_before\": 0.0738, \"flags\": [], \"inputs\": {\"annual_rate_pct\": 9.5, ...}, \"monthly_installment_eur\": 301.48, \"policy_version\": \"2026.09\"}"}],
"isError": false}}

The script never fails open: on invalid inputs it still exits 0 and returns {"error": "<reason>"}, which has no affordability_class, so the node raises and the run errors. “Could not assess” is never read as “affordable”. An unaffordable result is then a hard decline in rules.py, whatever either model says afterwards.

Refusals arrive as tool errors whose text names the cause, for example skill_error_403: agent_not_authorized (missing skill_exec grant), skill_error_403 (also when the AI System’s skill-execution quota is spent, with the refusal recorded as skill_quota_exceeded), or skill_error_202: approval_required (the run was parked; if autonomy has been demoted, a skill run can be held too). Failures shows how the agent tells these apart.

skills__run_script is fully governed, in this order: the input guardrail and argument policies on args (the skill_input surface); the identity’s skill_exec grant, the AI System’s skill quota and any approval requirement; the sandbox run; the output guardrail (skill_output); and an audit row that attributes the execution to the skill and the AI System. The skill grant is part of the AI System’s contract, so giving the system another skill is a widening someone has to approve.

Next: delegate to the fraud screener over A2A.