Skip to content
Esc
↑↓navigate↵open⌘Jpreview
Start
On this page

Weka 1.0

Weka turns JSON state into typed decisions with probabilities. Use it when the next part of your application needs a value it can validate and act on.

Availability

Weka is in Public Preview on Lite, Pro, Pro+, Max, Team, and Enterprise. It is available only through the Autohand API, Autohand SDK, and Console Playground. Use the model ID weka with POST /v1/decisions.

Weka is Autohand’s first System One model. We fine-tuned Laya, an open-source decision model, on the Autohand Coding-Agent Dataset, then trained it with Reinforcement Learning for Calibrated Decisions (RLCD) so its probabilities stay calibrated. Weka runs through Autohand inference. It is not a hosted copy of TypeSafe AI’s Jev: JevBench is the public benchmark for Jev-style typed decision models, which is why Jev appears in the comparison below.

Weka uses a structured decision contract. It does not accept chat messages and cannot be called through /v1/chat/completions.

API and SDK calls use the same structured state, questions, answers, and quota checks.

The request contract

A Weka request has three top-level fields:

Field Meaning
model The literal value weka.
state The JSON facts Weka should evaluate. It can be a string, number, boolean, object, array, or null.
questions A non-empty object of named noul, choice, or score questions.

Autohand validates the questions before metering. A request needs at least one named question, and each question object accepts only type, instructions and criteria; any other key is rejected. A choice question takes 1 to 255 named options in criteria. A score question takes 2 to 10 ordered levels in criteria. A noul question needs only instructions; it may add criteria with a true and a false description of each outcome, and either key may be left out.

Question types

Type Use it for Limits Answer
noul A yes or no question where uncertainty matters. criteria is optional: { "true": "…", "false": "…" } describing each outcome. A noul probability from 0 to 1.
choice Selecting one named option. 1 to 255 named options in criteria. The selected key, confidence, and probability per option.
score An ordered scale. 2 to 10 ordered levels in criteria. A numeric score, confidence, legend, and distribution.
curl https://api.autohand.ai/v1/decisions \
  -H "Authorization: Bearer $AUTOHAND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "weka",
    "state": {
      "tests": "passed",
      "changed_files": 14,
      "touches_payments": true
    },
    "questions": {
      "needs_review": {
        "type": "noul",
        "instructions": "Does this release need human review?",
        "criteria": {
          "true": "A person should look before this ships",
          "false": "Safe to ship on the normal lane"
        }
      },
      "release_lane": {
        "type": "choice",
        "instructions": "Choose the safest release lane.",
        "criteria": {
          "canary": "Deploy to a small cohort first",
          "stable": "Proceed to the normal rollout",
          "blocked": "Do not deploy"
        }
      },
      "risk": {
        "type": "score",
        "instructions": "Score operational risk.",
        "criteria": ["Low", "Medium", "High"]
      }
    }
  }'
type WekaDecision = {
  model: "weka";
  answers: Record<string, unknown>;
  usage: { input_tokens: number; output_tokens: number };
};

const response = await fetch("https://api.autohand.ai/v1/decisions", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.AUTOHAND_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "weka",
    state: releaseState,
    questions: releaseQuestions,
  }),
});

if (!response.ok) throw new Error(await response.text());
const decision = (await response.json()) as WekaDecision;
import os
import requests

response = requests.post(
    "https://api.autohand.ai/v1/decisions",
    headers={"Authorization": f"Bearer {os.environ['AUTOHAND_API_KEY']}"},
    json={
        "model": "weka",
        "state": release_state,
        "questions": release_questions,
    },
    timeout=30,
)
response.raise_for_status()
decision = response.json()

Build a release gate

Keep facts and policy separate. Send the current build facts to Weka, then let deterministic application code decide which probabilities are acceptable.

Release signals and questions flow through Weka into a deterministic deployment policy
Weka evaluates the state. Your deployment code owns the final threshold and action.

1. Describe observable state

const releaseState = {
  commit: process.env.GIT_SHA,
  tests: { unit: "passed", integration: "passed" },
  changedFiles: 14,
  touchesPayments: true,
  previousIncidents: 1,
};

2. Ask for values your pipeline can use

const releaseQuestions = {
  needs_review: {
    type: "noul",
    instructions: "Does this change require human review before deployment?",
  },
  release_lane: {
    type: "choice",
    instructions: "Choose the safest release lane from the supplied state.",
    criteria: {
      canary: "Release to 5% of traffic first",
      stable: "Use the normal rollout",
      blocked: "Do not deploy",
    },
  },
  risk: {
    type: "score",
    instructions: "Score the operational risk.",
    criteria: ["Low", "Medium", "High", "Critical"],
  },
};

3. Apply a deterministic threshold

const lane = decision.answers.release_lane;
const review = decision.answers.needs_review;

if (lane.type !== "choice" || review.type !== "noul") {
  throw new Error("Unexpected Weka answer shape");
}

if (lane.choice === "blocked" || review.noul >= 0.8) {
  await requestHumanReview(decision);
} else if (lane.choice === "canary" && lane.confidence >= 0.7) {
  await deploy({ trafficPercent: 5 });
} else {
  await holdRelease(decision);
}

Do not treat confidence as permission by itself. Validate the answer type and selected key, then enforce thresholds in code that can be reviewed and tested.

Triage an incident

Build one state object from observability data and recent delivery events. Ask Weka for severity and the next runbook branch.

Observability signals go to Weka and a typed answer chooses a runbook branch
The runbook consumes a typed answer instead of extracting intent from prose.
questions = {
    "severity": {
        "type": "score",
        "instructions": "Score customer impact.",
        "criteria": ["No impact", "Degraded", "Major", "Critical"],
    },
    "response": {
        "type": "choice",
        "instructions": "Choose the next runbook branch.",
        "criteria": {
            "rollback": "The latest deployment is the likely cause",
            "investigate": "Evidence is incomplete or points elsewhere",
            "monitor": "The service is recovering without intervention",
        },
    },
}

decision = decide(state=incident_snapshot, questions=questions)
branch = decision["answers"]["response"]

if branch["confidence"] < 0.65:
    page_on_call(decision)
elif branch["choice"] == "rollback":
    run_rollback()

Put Weka inside an agent workflow

An agent can use Weka after it has gathered evidence. A low confidence result can send the agent back for more information, while a blocked decision can hand control to a person.

An agent checks a proposed change with Weka and either continues, gathers evidence, or escalates
Use Weka as a decision step inside the loop, with explicit exits for uncertainty and review.
for (let attempt = 0; attempt < 3; attempt += 1) {
  const decision = await decideWithWeka({
    patch: await agent.currentDiff(),
    checks: await collectCheckResults(),
    openQuestions: await agent.openQuestions(),
  });

  const next = decision.answers.next_step;
  if (next.type !== "choice") throw new Error("Invalid next_step answer");
  if (next.choice === "continue" && next.confidence >= 0.75) break;
  if (next.choice === "escalate") return handOffToReviewer(decision);
  await agent.gatherMoreEvidence(next.probabilities);
}

Validate the response

The response repeats your question names under answers. Each answer is a discriminated object whose type matches the requested question.

{
  "model": "weka",
  "answers": {
    "needs_review": {
      "type": "noul",
      "noul": 0.93
    },
    "release_lane": {
      "type": "choice",
      "choice": "canary",
      "confidence": 0.8,
      "probabilities": {
        "canary": 0.8,
        "stable": 0.16,
        "blocked": 0.04
      }
    },
    "risk": {
      "type": "score",
      "score": 1.54,
      "confidence": 0.72,
      "legend": {
        "0": "Low",
        "1": "Medium",
        "2": "High",
        "3": "Critical"
      },
      "probabilities": {
        "0": 0.08,
        "1": 0.42,
        "2": 0.38,
        "3": 0.12
      }
    }
  },
  "usage": {
    "input_tokens": 426,
    "output_tokens": 73
  }
}

Reject an unknown answer type, an option that was not offered, or missing question names. Log the input state version, answer, probabilities, and policy result when a decision changes production behavior.

Use Weka through the API, SDK, or Console

  1. Open the Console Playground.
  2. Select Weka decisions.
  3. Start from the release gate or incident triage example.
  4. Edit the JSON state and questions, then run the decision.
  5. Inspect the typed answer, confidence, probability distribution, and token usage.

The Autohand SDK and Console Playground use the same /v1/decisions contract as a direct API request. Every surface uses the selected account and consumes the same plan allowance.

How Weka compares on JevBench

JevBench scores typed decision systems on intelligence, calibration, speed, and cost. Weka ranks second of 13 in this comparison of leading typed decision systems.

System Score Intelligence Calibration Speed Cost
Jev 1.13.0 (TypeSafe AI) 74.4 85.7 82.7 83.3 52.0
Weka (Autohand AI) 73.1 89.5 80.2 81.3 49.0
SemIf (Qwen3.5-4B) 73.1 79.0 72.6 83.7 59.5
djev (Maisa · diffusion-gemma) 73.0 82.7 65.4 91.4 57.6
Winnow-12B Q8 71.2 82.0 72.0 82.3 52.9
reflex 4B 70.3 80.1 75.2 68.0 59.7
jqv (Qwen3-32B zero-shot) 68.6 79.3 79.0 74.6 47.5
decision-machine-1 68.3 62.1 70.4 92.9 53.7
decider-35b-a3b 67.6 79.6 71.5 80.8 45.3
open-alternative-jev (Qwen3.5-4B) 67.0 64.0 63.2 83.5 59.6
system-one-open (Gemma 4 E2B) 66.6 69.5 56.7 77.0 64.8
OpenJev (DiffusionGemma 26B-A4B) 66.4 79.2 64.8 83.2 45.5
SimpleJev (Qwen3.8-27B) 66.3 84.7 81.1 71.2 39.5

JevBench v1.3.0 evaluates 534 decisions per system. Weka’s row is Autohand’s own JevBench v1.3.0 run and is pending a public listing on Benchmark Heaven. The other rows are taken from the public leaderboard, task results, and methodology.

How the score is calculated

Each axis is scored from 0 to 100. The JevBench score is the geometric mean of the four axes, with equal weight:

score = (intelligence × calibration × speed × cost) ^ (1/4)

For Weka:

score = (89.5 × 80.2 × 81.3 × 49.0) ^ (1/4)
      = 28,594,600 ^ (1/4)
      = 73.1

A geometric mean rewards balance. A weak axis pulls the score down further than it would in a plain average, so a system can’t make up for a poor cost or calibration result by being very fast. That’s why Weka’s score (73.1) sits below the plain average of its axes (75.0): its cost axis (49.0) is its weakest. Every score in the table above is calculated the same way, rounded to one decimal.

Use cases

Twelve step-by-step workflows show how to shape state and questions for common decisions. Browse all Weka use cases.

Plans, quotas, and errors

Weka is included on Lite, Pro, Pro+, Max, Team, and Enterprise. It is not included on Free. Weka and the hosted chat models share your plan’s credit allowance and rate limits. Team and Enterprise credit limits are independent per member; calling the public API does not bypass metering.

Plan Weka
Free Not included
Lite Included
Pro Included
Pro+ Included
Max Included
Team Included
Enterprise Included

Free includes Fantail only. See the Free plan for its limits and Available models for all model entitlements.

Autohand checks the account before calling Weka. A denied request returns HTTP 429 with the exhausted quota window, reset time, and retry metadata.

Invalid state or questions return HTTP 400 before the request is metered, with the code invalid_decision_request. You get this for an unnamed question, a choice with 0 or more than 255 options, a score with fewer than 2 or more than 10 levels, or a key other than type, instructions and criteria on a question. The body looks like this:

{"error":{"type":"invalid_decision_request","message":"Use model `weka` with a state and named noul, choice, or score questions. Choice requires 1-255 options; Score requires 2-10 levels."}}

Fix the request and resend; nothing was charged.

Operational guidance

  • Keep AUTOHAND_API_KEY on a server or in a secret store.
  • Send the smallest state needed for the decision and omit secrets and personal data.
  • Use reviewed thresholds for production actions and keep a human path for low confidence results.
  • Version question instructions and criteria when decisions must be reproducible.
  • Use idempotency in the action layer so retries do not deploy or roll back twice.

Last updated on

Was this helpful?

Send Feedback

Help us improve this documentation page. Your feedback is valuable.

We'll only contact you if we need clarification