跳到正文
Hacker News-首页· ayanb9440·· 2 小时前AI 评分63

开源风控平台 Kairos 发布,支持智能体调优决策模型

Show HN: Kairos – Open-source risk and fraud decisioning platform

AI 导读

开源风险与欺诈决策平台 Kairos 推出,提供实时风控决策、工作流编排以及基于 MCP 协议的智能体集成能力。它允许 Claude Code、Cursor 或 Codex 等编码智能体直接构建工作流、设计模型实验并自动部署调优结果,结合了 Grayson 决策模型与传统机器学习方法。

正文 · 原文

Kairos decides every sign-up, login, order, payment and payout as it happens, and keeps each decision with the signals behind it. It is an open-source alternative to Sardine, Sift, Riskified and SEON, with two things they don't have: your coding agent tunes it, and decision models catch fraud before you have the labels to train on.

Decisioning

  • Real-time decisions: one call returns approve, step up, review or block, with a risk score and the reasons, from the subject's history, the devices, cards and addresses it shares with others, and the session.
  • Workflows: ask a decision model, score with a model, branch, call webhooks, open cases, and decide again later.
  • Queues and cases: review work for people, whose resolutions become labels.

Agent-first

  • MCP server: Claude Code, Cursor or Codex read your decisions and build workflows, with every action recorded under its key.
  • Experiments: your agent proposes model variants, Kairos trains and tests them on your data, and the agent ships the winner.

Decision models and traditional ML

  • Grayson: Finic's decision model answers questions about each request in plain language. It works with few labels and reads unstructured data.
  • Models: logistic regression and gradient-boosted trees (XGBoost-compatible) on your numbers and Grayson's answers, trained in Kairos or uploaded.

For developers

An AI fraud ML engineer, always tuning on your data

You send Kairos what happens in your product: sign-ups, logins, orders, payouts, chargebacks. It decides each request (approve, step up, review or block) and keeps every decision with the signals behind it.

What makes Kairos different is who tunes it. Connect Claude Code, Cursor, Codex or any agent over MCP, and the agent can do the work of a fraud ML engineer:

  1. Build the workflow. It defines what to decide, which questions to ask a decision model, and which fields to score.
  2. Design experiments. It proposes variants: a decision model alone, logistic regression on your numbers, gradient-boosted trees, a stack of them, or the decision model's answers combined with your numbers in one model.
  3. Let Kairos run them. The server trains each variant on your oldest labeled data, chooses on the next, and tests on the newest, then reports ROC-AUC, PR-AUC, the gain over a baseline with its 95% interval, and precision and recall at your thresholds.
  4. Pick the winner and ship it. The agent explains its choice, applies the variant as the workflow's next version, and comes back when new labels arrive.
You:     "Our chargebacks went up. Find a better model for shopify_order and publish it if it wins."
Agent:   designs six variants → create_workflow_experiment → reads the results →
         "Logistic regression on the order's numbers plus Grayson's answers wins: ROC-AUC 0.949 on validation,
          0.930 on test. Publishing it as v6."

Decision models and traditional ML, together

Kairos is built around Grayson, Finic's decision model. You ask it questions in plain language ("Does the shipping address look like a reshipper?", "Is this email throwaway?") and it answers with calibrated probabilities. Decision models are strong where traditional ML is weak:

  • Few labels. Grayson works on day one, before you have the thousands of chargebacks a model needs to learn from.
  • Unstructured data. It reads descriptions, emails, names, addresses, notes and item titles, which a gradient-boosted tree can't.
  • Explanations. Every answer is a question you wrote, so every decision says why.

Traditional models are strong where decision models are weak: they learn your own outcomes precisely, from your own numbers, and they cost nothing per decision. Kairos lets you combine both: Grayson's answers become features next to your fields in a logistic regression or gradient-boosted trees (XGBoost-compatible, trained in Kairos itself), and experiments tell you which combination wins on your data.

A decision in Kairos: the risk score, the outcome, and the signals Grayson found, each with its probability

Get started

Kairos Cloud

Sign up at kairos.finic.ai. Create a sandbox environment, a secret key, and you're ready to send events.

Connect your agent

In the console, open Settings › MCP, turn on the tool groups your agent needs, and create a key. Then, in Claude Code:

claude mcp add --transport http kairos https://kairos.finic.ai/mcp --header "Authorization: Bearer ksk_…"

Cursor, Codex and VS Code work the same way: see MCP for agents. Then ask your agent to look at your decisions, build a workflow, or run an experiment.

Send events and decide

npm install @finic-ai/kairos      # or: pip install finic-kairos
import { Kairos } from "@finic-ai/kairos";

const kairos = new Kairos({ apiKey: process.env.KAIROS_API_KEY!, baseUrl: "https://kairos.finic.ai" });

await kairos.defineAction("withdrawal", {
  subject: "user",
  hold: "Should this withdrawal be held because the account shows signs of fraud or takeover?",
});

kairos.track("login", { userId: "user_42", deviceId: "dev_9", ipCountry: "GB" });

const decision = await kairos.decide({ type: "withdrawal", userId: "user_42", usd: 900 });
// { decision: "approve" | "step_up" | "review" | "block", riskScore, reasons, … }

Self-host

You need Node.js 22, pnpm 10 and a Grayson API key from portal.finic.ai. No database to set up: the server starts its own Postgres.

pnpm install
cp .env.example .env     # set GRAYSON_API_KEY
pnpm kairos dev          # the API on http://localhost:8787 and the console on http://localhost:5273

For your team, docker compose up --build. See Self-hosting and Local setup.

The CLI

pnpm kairos signup                                                     # the local server, a new account
pnpm kairos login --profile prod --url https://kairos.finic.ai --email you@example.com
pnpm kairos keys create "My server"                                    # a secret key for your code
pnpm kairos actions define withdrawal --data @withdrawal.json
pnpm kairos import events transactions.csv --type transaction --ts created_at --entity user=customer
pnpm kairos decide withdrawal -e user=user_42 -p usd=900
pnpm kairos workflows run review_payout -i user=user_42 --wait
pnpm kairos --help                                                     # every command

To have kairos on your path, run pnpm link --global in apps/cli.

Integrations

  • Shopify: decide every order, hold risky ones for review, and learn from chargebacks. To get the Kairos app for your store, reach the Finic team on Discord or at support@finic.ai.
  • Inbound webhooks: take events from providers such as Stripe. See Inbound webhooks.

Documentation

The docs are at kairos.finic.ai/docs, and in docs/.

Overview What Kairos does, how a decision is made, and what it does not do
Quickstart A first decision in a few minutes
MCP for agents Connect Claude Code, Cursor, Codex or VS Code
Models and experiments Scoring models, and experiments that compare them
Workflows Triggers, steps, expressions and runs
Concepts Entities, events, labels, links, actions, policies, decisions
Import your history Load existing events, customers and outcomes from files
TypeScript SDK · Python SDK The two clients
API reference Every HTTP endpoint
Queues and cases Review work for people
Self-hosting Docker, Postgres, migrations, configuration, security
Working on Kairos The repository, the server, the tests and the evaluation suite

The repository

Path What it is
apps/server The HTTP API and MCP server. Hono on Node.js, Postgres through Drizzle.
apps/console The web console. React and Vite.
apps/cli kairos, the CLI: starts Kairos, connects to a server, and calls its API.
packages/core The decision path, the model scorers and the tree trainer.
packages/sdk @finic-ai/kairos, the TypeScript client.
packages/sdk-python finic-kairos, the Python client.
packages/eval The evaluation suite and the experiments.
templates/ Action definitions and event shapes to copy.
examples/ Runnable scenarios, end to end.
docs/ The documentation.
pnpm test         # all tests; no network
pnpm test:python  # the tests of the Python SDK
pnpm typecheck

Community

License

Kairos is licensed under the Apache License 2.0.

来源:Hacker News-首页 · github.com