Configures Claude Code hooks and Codex hooks.json/notify. Use when adding PreToolUse guards, Stop hooks, managed hooks, format-on-save, preflight, audits, or worktree/budget hooks.
日本語の概要は準備中です。原文の説明を表示しています。
Builds production AI bots with Python for support, sales, and custom domains. Use when designing conversation flows, personas, escalation, or LangGraph state.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Use this skill to build, ship, and iterate on conversational AI bots — support, sales, or domain-specific — using pure Python frameworks and AI coding agents.
This skill absorbs ai-langgraph-bots and is the single entry point for stateful bot implementation, including LangGraph graph design, checkpoints, and human-in-the-loop.
Default posture: explicit conversation state, typed tool contracts, deterministic escalation rules, guardrails before launch, compliance filtering before responses reach users, and analytics from day one. No visual workflow tools — code-first only.
| Need | Route to |
|---|---|
| Voice pipeline engineering (STT, TTS, telephony) | ../ai-voice-bots/SKILL.md |
| Agent architecture decisions (build-vs-not, shape) | ../ai-agents/SKILL.md |
| RAG / retrieval system design | ../ai-rag/SKILL.md |
| KB/vector-brain construction, ingest scripts, SQL, manifests, eval seeds | ../ai-vector-brain/SKILL.md |
| Prompt engineering and structured outputs | ../ai-prompt-engineering/SKILL.md |
| N8N / visual workflow automation | ../software-workflow-automation/SKILL.md |
| Help center content design | ../product-help-center/SKILL.md |
| Agent eval harnesses and red-team packs | ../qa-agent-testing/SKILL.md |
| Need | Default | Notes |
|---|---|---|
| Choose a bot framework | references/framework-selection.md | Pure Python: LangGraph, Claude Agent SDK, Pydantic AI; voice → ../ai-voice-bots/SKILL.md |
| Design conversation flows | references/conversation-design.md | State machines, fallback trees, slot filling, multi-turn |
| Define bot personality | references/persona-design.md | Tone, brand voice, safety boundaries |
| Build a support bot | references/support-bot-patterns.md | Zendesk/Intercom/Freshdesk, KB grounding, resolution tracking |
| Build a sales bot | references/sales-bot-patterns.md | CRM integration, lead qualification, demo booking |
| Add human handoff | references/handoff-to-human.md | Escalation triggers, warm handoff, queue routing |
| Route across channels | references/channel-routing.md | Web chat, WhatsApp, SMS, email, in-app |
| Wire persistent memory | references/bot-memory-integration.md | remember/recall loop, memory tier by bot type, anti-pattern blocks |
| Defend against injection | references/injection-and-jailbreak-defense.md | Spotlighting, canary, tool-output sanitization, red-team pack |
| Migrate from n8n / Langflow | references/migration-from-n8n.md | Node mapping, secret hygiene, gap closure, before/after |
| Measure and improve | references/bot-analytics-improvement.md | CSAT, containment rate, A/B, improvement loops |
| Deploy to production | references/production-deployment.md | Serving, scaling, canary, cost per conversation |
| Roll out new bot versions without dropping sessions | references/stateful-rollout-and-blue-green.md | Cohort canary, checkpoint migration, graceful drain, rollback |
| Rotate provider keys and survive provider outages | references/secret-rotation-and-model-fallback.md | Two-key window, hot reload, fallback chain, circuit breakers |
| Pick a hosting platform (Vercel, Fly.io, Railway, Render, Cloudflare) | ../software-paas-hosting/references/agent-hosting-matrix.md | Text-bot stacks B1–B4 with concrete platform choices |
| Design LangGraph state | references/graph-design-patterns.md | State, nodes, edges, routers, subgraphs |
| Add checkpoints or HITL | references/state-checkpoints-and-hitl.md | Persistence, replay, approval, recovery |
| Test graph workflows | references/testing-and-production.md | Graph testing, observability, handoff |
What is the bot's primary job?
├── Answer questions / resolve issues
│ ├── Has a knowledge base or help center? → Support Bot (KB-grounded)
│ └── Needs to query live systems (orders, accounts)? → Support Bot (tool-using)
├── Qualify leads / book meetings / handle objections
│ └── Sales Bot
├── Execute workflows (approvals, scheduling, data entry)
│ └── Workflow Bot — consider LangGraph graph-shaped orchestration
└── Multi-domain or unclear
└── Start with the dominant use case; add domains incrementally
| Framework | Best for | State model | Streaming | Voice support |
|---|---|---|---|---|
| LangGraph | Complex multi-step bots with branching, checkpoints, HITL | Explicit typed graph state | Yes (via callbacks) | Via Pipecat/LiveKit integration |
| Claude Agent SDK | Tool-using bots with Anthropic models | SDK-managed conversation | Yes (native) | No (text-only) |
| Pydantic AI | Lightweight bots with structured outputs | Pydantic models | Yes | No |
Voice frameworks (Pipecat, LiveKit Agents) are owned by ../ai-voice-bots/SKILL.md — this skill is not voice/STT/TTS. Go there for framework choice, imports, and pipeline code; come back here for conversation state, persona, and guardrails once the graph/agent "brain" is decided.
Default: LangGraph for complex stateful bots, Claude Agent SDK for simpler tool-using bots, ai-voice-bots' pick when voice is primary. For linear decision cascades without cycles or checkpoints, consider plain async Python — LangGraph's dependency chain (langchain-core and its transitive packages) may not be worth the overhead.
Pydantic AI: its major-version rewrite moved extension points to a composable
capabilities=[...]API and removedhistory_processors=,event_stream_handler=andprepare_tools=from theAgentconstructor. Check which major version you have installed before copying an example, and read the current upgrade guide at ai.pydantic.dev. Migration notes → references/framework-selection.md.
Full comparison → references/framework-selection.md
Reach for LangGraph when the bot needs cycles, explicit state, checkpoints, or human approval — not as a default. For a linear cascade (spam → router → support → reply) with no cycles or HITL, plain async Python with if/elif routing is simpler and has zero framework overhead.
Key guardrails:
START for new code. set_entry_point() is still documented as equivalent to add_edge(START, key), but the START edge is clearer and matches current examples. Import from langgraph.graph import StateGraph, START, END.TypedDict with total=False, reducer-annotated fields for accumulated data.(state, *, clients) -> dict via functools.partial — testable without monkey-patching.Full depth:
max_turns in the conversation_eval.py rubric.Full depth → references/conversation-design.md
scripts/bot_cost_estimator.py --cache models this write-then-read pattern.startup-compliance-enterprise-readiness/references/regulatory-overlays.md for the full obligation set and dates.max_iterations is hit. See references/testing-and-production.md for the pattern, which is framework-agnostic; check whether your agent runtime has a native outcome or grader hook before building the loop yourself.ai-context-layer). Pick a memory pattern: P2 (support bots), P4 (sales bots with temporal facts), P6 (episodic-semantic for general bots) from ai-context-layer/patterns-catalog.md. Wire the remember / recall loop per references/bot-memory-integration.md. Load recalled facts only for support tiers — spam filter and router stay single-turn to avoid history-bias.no-new-privileges, secrets from manager not env files in production.MODEL_ID env var or a config file), and re-verify it against the vendor's current model list before every deploy, not from memory.Classify each supported intent as answer, read, propose, mutate, or handoff, then give it an explicit tool allowlist, confirmation rule, fallback, and success signal. Unknown intents and failed preconditions must take the handoff or safe-answer path; they must not inherit the nearest intent's tools. Before launch, measure wrong-action and failed-handoff rates per intent alongside containment, because higher containment can hide harmful automation.
MemoryService interface between the bot and the vendor SDK so a vendor swap is a one-file change, not a rewrite.References
Assets
--pricing rates file for bot_cost_estimator.pyai-voice-botsScripts
python3 scripts/conversation_eval.py --input conversations.jsonl [--min-pass-rate 1.0] [--warnings-fail] — Multi-turn conversation evaluator. Have the bot record each confirmation it asks for as a request_confirmation tool call ({"action": "issue_refund", "args": {"order_id": "55"}}). The evaluator then fails any state-changing call that no confirmed request covers, and exits 1 when the pass rate is below --min-pass-rate (default 1.0). Set require_confirmation_tool: true in the rubric once the bot emits the call, so a transcript without it fails instead of passing. Without the call, a text heuristic reports warnings only; pass --warnings-fail to make those warnings fail the gate toopython3 scripts/bot_cost_estimator.py --pricing rates.json --model <name> --avg-turns 8 — Per-conversation cost estimator. Ships no prices: copy assets/pricing-template.json, fill in rates from each provider's pricing page, and pass it with --pricing; without it the script exits 2 and prints no estimate. It also accepts the dated price file of ops-cost-optimization's cost_estimator.py (checked date plus models with input_per_1m/output_per_1m and optional cache rates), so one file can feed both the per-call and the per-conversation estimatepython3 scripts/red_team_pack.py --input responses.jsonl — Prompt-injection, PII-leak, and jailbreak detection against bot responsesData
EvidenceBundle and typed answer contract; LangGraph + Mem0 baseline; with-model and without-model pathsWhen prior decisions or pitfalls are relevant, consult learnings.consolidated.md if present; use learnings.md only for needed history or as the available fallback. Otherwise skip both.
After applying it, if you encountered a pattern worth remembering, a mistake worth preventing, or a domain fact that surprised you, append one dated bullet to learnings.md via agents-skills-feedback-loop/scripts/append_learning.py. Do not modify SKILL.md itself.
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Configures Claude Code hooks and Codex hooks.json/notify. Use when adding PreToolUse guards, Stop hooks, managed hooks, format-on-save, preflight, audits, or worktree/budget hooks.
日本語の概要は準備中です。原文の説明を表示しています。
Configures and hardens Claude Code and Codex MCP servers. Use when connecting databases, APIs, SaaS, building servers, or serving a clearance-filtered knowledge base.
日本語の概要は準備中です。原文の説明を表示しています。
Owns instruction files: AGENTS.md, CLAUDE.md, personal and repo rules. Use when writing, pruning, auditing them, sharing rules across Claude and Codex, or fixing ignored rules.
日本語の概要は準備中です。原文の説明を表示しています。
Creates and audits agent skills: SKILL.md, references, scripts, runtime metadata. Use when writing, validating, or security-reviewing a skill, or fixing truncated skill listings.
日本語の概要は準備中です。原文の説明を表示しています。
Adds per-skill learnings loops for dated patterns, mistakes, and domain facts. Use when wiring skill memory, consolidation, or drift audits.
日本語の概要は準備中です。原文の説明を表示しています。
Chooses subagent, team, workflow, or debate and launches it on Claude Code or Codex. Use when delegating, running agent review boards, or installing shared agents.
日本語の概要は準備中です。原文の説明を表示しています。