コンテンツにスキップ
Developer Preview — APIs and language features may change before 1.0

Kits

このコンテンツはまだ日本語訳がありません。

Kits are pre-built collections of mashin machines for common workflows. Each kit is a krate you can use directly or compose into your own machines.

A kit gives you tested, governed machines with proper permissions, inputs, outputs, and tests already defined. You call kit machines with ask ... from the same way you call any other machine.

ask answer, from: "@mashin/kits/rag/ask"
question: input.question
collection: "docs"
Kit Namespace Purpose
RAG @mashin/kits/rag Knowledge bases with document ingestion, semantic search, and question answering
Legal @mashin/kits/legal Contract analysis, compliance review, NDA triage, litigation support
Evaluation @mashin/kits/evaluation LLM output judging and quality scoring
Reasoning @mashin/kits/reasoning Chain-of-thought, self-reflection, tree-of-thought, ReAct loops
Governance @mashin/kits/governance Plan-approve-execute, quorum decisions
A2A @mashin/kits/a2a Agent-to-agent delegation, supervision, negotiation
Content @mashin/kits/content Deep research, content pipelines
Data @mashin/kits/data CSV/JSON transforms, text-to-SQL, time series analysis

Install a kit from the registry:

Terminal window
mashin install @mashin/kits/rag

Then call its machines in your own:

machine my_qa_bot
accepts
question as text, is required
responds with
answer as text
sources as list
behaves
ask answer, from: "@mashin/kits/rag/ask"
question: input.question
collection: "my_docs"
verifies
test "answers from the collection"
assuming answer {answer: "Use mashin run.", sources: ["docs/cli.md"]}
given {question: "How do I run a machine?"}
expect {answer: "Use mashin run.", sources: ["docs/cli.md"]}

A kit is just a krate with multiple machines. Create a mashin.toml at the root, list your machines, and publish:

[project]
name = "my-kit"
namespace = "@myorg"
version = "1.0.0"
[machines]
ingest = "ingest.mashin"
search = "search.mashin"

Each machine in the kit has its own accepts, responds with, ensures, and verifies sections. Kits compose naturally: one kit machine can call another with ask ... from.