ワンクリックで
kaizen
Kailash Kaizen (Ruby) — MANDATORY for AI agents/RAG/signatures. Raw LLM clients BLOCKED.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Kailash Kaizen (Ruby) — MANDATORY for AI agents/RAG/signatures. Raw LLM clients BLOCKED.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Claude Code architecture — artifact design, context, agentic patterns. For CC audit/build.
Kailash Ruby SDK — gem setup, workflows, nodes, runtime, Magnus FFI bindings.
Kailash DataFlow (Ruby/Magnus) — MANDATORY for DB/CRUD/bulk/migrations. Raw SQL/ORMs BLOCKED.
Kailash Nexus (Ruby) — MANDATORY for API+CLI+MCP. Direct Rack/Sinatra BLOCKED.
Kailash MCP (Ruby) — server, client, tools, resources, auth, transports. For AI agent integration.
Kailash deployment + Git — PyPI publish, CI/CD, wheels, version bumps, multi-package.
| name | kaizen |
| description | Kailash Kaizen (Ruby) — MANDATORY for AI agents/RAG/signatures. Raw LLM clients BLOCKED. |
Kaizen is a production-ready AI agent framework built on Kailash Core SDK that provides signature-based programming and multi-agent coordination. The Ruby gem wraps the Rust Kaizen engine via native extensions.
gem install kailash-kaizen
Or in Gemfile:
gem "kailash-kaizen"
require "kailash/kaizen"
delegate = Kailash::Kaizen::Delegate.new(model: ENV["LLM_MODEL"])
# Streaming execution with block
delegate.run("Analyze this data") do |event|
case event
when Kailash::Kaizen::TextDelta
print event.text
when Kailash::Kaizen::ToolCallStart
puts "\nCalling tool: #{event.tool_name}"
end
end
# Synchronous execution (for scripts/CLI)
result = delegate.run_sync("Summarize this document")
puts result
require "kailash/kaizen"
class SummaryAgent < Kailash::Kaizen::BaseAgent
signature do
input :text, type: :string, description: "Text to summarize"
output :summary, type: :string, description: "Generated summary"
end
configure do |config|
config.model = "gpt-4"
config.temperature = 0.7
end
def execute(inputs)
# Agent logic here
{ summary: "Summary of: #{inputs[:text]}" }
end
end
agent = SummaryAgent.new
result = agent.run(text: "Long text here...")
puts result[:summary]
require "kailash/kaizen"
# Ensemble: Multi-perspective collaboration
pipeline = Kailash::Kaizen::Pipeline.ensemble(
agents: [code_expert, data_expert, writing_expert],
synthesizer: synthesis_agent,
top_k: 3
)
result = pipeline.run(task: "Analyze codebase", input: "repo_path")
# Router: Intelligent task delegation
router = Kailash::Kaizen::Pipeline.router(
agents: [code_agent, data_agent, writing_agent],
routing_strategy: :semantic
)
# Supervisor-Worker: Hierarchical coordination
supervisor = Kailash::Kaizen::Pipeline.supervisor(
supervisor: manager_agent,
workers: [agent_a, agent_b, agent_c],
strategy: :round_robin
)
Signatures define type-safe interfaces for agents using Ruby blocks:
class MyAgent < Kailash::Kaizen::BaseAgent
signature do
input :query, type: :string, description: "User query"
input :context, type: :hash, description: "Additional context", default: {}
output :answer, type: :string, description: "Agent response"
output :confidence, type: :float, description: "Confidence score"
end
end
delegate = Kailash::Kaizen::Delegate.new(model: ENV["LLM_MODEL"])
delegate.tool("search_web", description: "Search the web") do |params|
# params[:query] available
perform_search(params[:query])
end
delegate.tool("read_file", description: "Read a file") do |params|
File.read(params[:path])
end
require "kailash/kaizen"
# Layer 1: Simple (2 params)
supervisor = Kailash::Kaizen::GovernedSupervisor.new(
agents: [agent_a, agent_b],
task: "Analyze the dataset"
)
# Layer 2: Configured (8 params)
supervisor = Kailash::Kaizen::GovernedSupervisor.new(
agents: [agent_a, agent_b],
task: "Analyze the dataset",
budget: { max_tokens: 100_000, max_cost: 5.0 },
strategy: :supervised,
cascade: :monotonic
)
# Layer 3: Full governance (9 subsystems)
supervisor = Kailash::Kaizen::GovernedSupervisor.new(
agents: [agent_a, agent_b],
task: "Analyze the dataset",
accountability: { tracker: true },
budget: { max_tokens: 100_000, warnings: [0.8, 0.95] },
cascade: { strategy: :monotonic },
clearance: { level: :c2 },
dereliction: { detect: true },
bypass: { enabled: false },
vacancy: { auto_designate: true },
audit: { hash_chain: true }
)
require "kailash/kaizen"
# Envelope tracking with gradient zones
tracker = Kailash::Kaizen::L3::EnvelopeTracker.new(
budget: { max_tokens: 50_000 }
)
# Scoped context with access control
context = Kailash::Kaizen::L3::ScopedContext.new(
projection: { allow: ["data.*"], deny: ["data.secret.*"] }
)
# Agent factory with lifecycle tracking
factory = Kailash::Kaizen::L3::AgentFactory.new
instance = factory.spawn(agent_spec, parent: supervisor)
# Session memory (in-memory, per-conversation)
agent.memory.session.store("key", "value")
agent.memory.session.recall("key")
# Shared memory (across agents)
agent.memory.shared.store("shared_key", data)
# Persistent memory (DataFlow-backed, cross-session)
agent.memory.persistent.store("long_term", data)
require "kailash/kaizen"
require "kailash/dataflow"
db = Kailash::DataFlow.new do |config|
config.database_url = ENV["DATABASE_URL"]
end
delegate = Kailash::Kaizen::Delegate.new(model: ENV["LLM_MODEL"])
delegate.tool("query_users", description: "Query user database") do |params|
db.express.list("User", filter: params[:filter])
end
require "kailash/kaizen"
require "kailash/nexus"
app = Kailash::Nexus::App.new(port: 3000)
app.handler("chat", description: "Chat with AI agent") do |params|
delegate = Kailash::Kaizen::Delegate.new(model: ENV["LLM_MODEL"])
result = delegate.run_sync(params[:message])
{ response: result }
end
app.start # Agent accessible via API, CLI, and MCP
require "kailash"
require "kailash/kaizen"
registry = Kailash::Registry.new
builder = Kailash::WorkflowBuilder.new
builder.add_node("KaizenAgent", "agent1", {
"agent" => "SummaryAgent",
"input" => "Analyze this data"
})
Kailash::Kaizen::BaseAgent for custom agentsUse Kaizen when you need to:
Pipeline pattern selection:
For Kaizen-specific questions, invoke:
kaizen-specialist - Kaizen framework implementationtesting-specialist - Agent testing strategies skill - When to use Kaizen vs other frameworks