Naftiko · Capability

Ml Output Shaping Capability

A capability that shapes ML model output (raw logits/probabilities) into typed business objects suitable for agent consumption.

Run with Naftiko NaftikoMLOutput Shaping

What You Can Do

POST
Predict shaped
/predict-shaped/{{model}}

MCP Tools

predict-shaped

Capability Spec

ml-output-shaping-capability.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  title: Ml Output Shaping Capability
  description: A capability that shapes ML model output (raw logits/probabilities) into typed business objects suitable for agent consumption.
  tags: [Naftiko, ML, Output Shaping]
  created: '2026-05-01'
  modified: '2026-05-04'
binds:
- namespace: ml-env
  keys: {ML_HOST: ML_HOST, ML_TOKEN: ML_TOKEN}
capability:
  consumes:
  - namespace: ml-serving
    type: http
    baseUri: https://{{ML_HOST}}
    authentication: {type: bearer, token: '{{ML_TOKEN}}'}
    resources:
    - {name: predict, path: '/v1/models/{{model}}:predict', operations: [{name: predict, method: POST, inputParameters: [{name: model, in: path}]}]}
  exposes:
  - type: rest
    address: 0.0.0.0
    port: 8080
    namespace: ml-output-shaping-capability-rest
    description: REST surface for shaped ML output.
    resources:
    - {name: predict-shaped, path: '/predict-shaped/{{model}}', operations: [{method: POST, name: predict-shaped, inputParameters: [{name: model, in: path, type: string}], call: ml-serving.predict}]}
  - type: mcp
    address: 0.0.0.0
    port: 3010
    namespace: ml-output-shaping-capability-mcp
    description: MCP for shaped ML output.
    tools:
    - name: predict-shaped
      inputParameters: [{name: model, type: string, required: true}]
      call: ml-serving.predict
  - type: skill
    address: 0.0.0.0
    port: 3011
    namespace: ml-output-shaping-capability-skills
    description: Skill for shaped ML output.
    skills:
    - name: ml-output-shaping-capability
      description: ML output shaping.
      location: file:///opt/naftiko/skills/ml-output-shaping-capability
      allowed-tools: predict-shaped
      tools:
      - {name: predict-shaped, from: {sourceNamespace: ml-output-shaping-capability-mcp, action: predict-shaped}}