Langsung ke konten
Skillpedia
Agen7.6k Β· #13153

decisions

Fungsinya

Skill ini menjelaskan cara memakai helper keputusan di aplikasi Agent-Native untuk memberi label atau skor pada pesan atau input. Helper mengembalikan jawaban dan tidak pernah menjalankan tindakan yang mengikutinya. Skill ini untuk pengembang yang menambahkan perutean atau triase cerdas ke aplikasi.

Kapan dipakai

  • βœ“Saat Anda perlu memutuskan apakah sebuah pesan merupakan permintaan dari jenis tertentu.
  • βœ“Ketika Anda ingin memberi skor pada input terhadap tingkatan yang berurutan.
  • βœ“Saat Anda perlu memilih satu nilai dari sekumpulan pilihan yang sudah dinamai.

Link skill

https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/decisions/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/decisions/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œBisakah Anda memeriksa pesan pelanggan yang masuk dan memberi tahu saya mana yang merupakan permintaan pembatalan?”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Pengembang memberikan input dan pertanyaan yang sudah dinamai kepada helper. Helper mengembalikan hasil berlabel, dan aplikasi memutuskan apa yang harus dilakukan dengannya.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

Decisions

Rule

Use decide() to classify or score supplied inputs. It returns a result and never performs, authorizes, or replaces the action selected from that result.

How

Pass an explicit ownerEmail, an input string or array of parts, and named questions to decide() from @agent-native/core/decisions:

import { decide } from "@agent-native/core/decisions";

const result = await decide({
  ownerEmail: "owner@example.com",
  input: [{ type: "text", text: "Please cancel Friday's lunch reservation." }],
  questions: [
    {
      type: "predicate",
      name: "isCancellationRequest",
      instructions: "Does the message ask to cancel a reservation?",
    },
  ],
});

input can be a plain string or contain text, structured JSON, or an image URL. Questions are named and use one of these shapes:

Type Fields Use
predicate name, instructions Evaluate one stated predicate
choice name, instructions, choices: { value: string, description: string }[] Choose among the supplied string values
score name, instructions, levels: { label: string, description: string }[] Score against 2–10 ordered levels

Provider and model capabilities can differ. Treat question support as capability-aware. Only claim a provider/model supports a question type after that combination has been verified. An ok result includes provider, model, and answers keyed by question name; cached and usage are optional. A not_configured result includes the missing_credentials reason and configured provider list. A failed result has a typed reason and may include provider and questionNames. Handle these statuses as distinct outcomes; never turn a failure into an answer.

Provider routing and caches

Provider order is configurable per workspace. New customer workspaces try Builder Jev first, then a personal Jev key, then OpenAI. Within Jev, the Builder gateway is tried before falling back to a direct key. If no provider is configured, decide() returns not_configured.

getDecisionsStatus() reports credential readiness separately from provider capabilities. The Builder Jev proxy is verified for predicate and choice. Jev score remains unverified and disabled by its capability flag, so decide() skips Jev for score questions and continues to the next configured provider. A Jev-only score request returns failed with unverified_capability. The OpenAI Decisions API supports scores with 2–10 ordered levels; its request and response mapping is covered by documented fixtures.

Key any per-provider threshold or cache by both provider and model. cacheKey enables caching only when supplied. Cache identity includes the owner, organization, provider, model, cache key, input, and questions. The in-memory cache has a 60-second TTL and a 256-entry cap.

Related skills

  • actions β€” keep action behavior focused and deterministic.
Pertanyaan umum

Apakah helper membatalkan atau mengubah sesuatu?

Tidak. Helper hanya mengembalikan hasil dan tidak menjalankan atau mengesahkan tindakan apa pun.

Pertanyaan jenis apa saja yang bisa diajukan?

Helper mendukung predikat ya atau tidak, pilihan di antara nilai yang sudah dinamai, dan skor pada dua hingga sepuluh tingkat.

Apakah semua model mendukung setiap jenis pertanyaan?

Skill ini menyatakan dukungan berbeda antar penyedia dan model, sehingga setiap kombinasi harus diverifikasi sebelum dipakai.

Detail

Deskripsi asli dari pembuat

How to use `@agent-native/core/decisions` for capability-aware classification and scoring. Use when implementing or reviewing decision evaluation, provider ordering, per-provider thresholds, or decision-result caches.

repo: BuilderIO/agent-native

Popularitas

Bintang GitHub
7.6k
Peringkat
#13153
Lisensi
MIT
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa