[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"pack-detail-tool-use-agent-bootcamp-en":3,"seo:pack:tool-use-agent-bootcamp:en":102},{"code":4,"message":5,"data":6},200,"操作成功",{"pack":7},{"slug":8,"icon":9,"tone":10,"status":11,"status_label":12,"title":13,"description":14,"items":15,"install_cmd":101},"tool-use-agent-bootcamp","🛠️","#10B981","new","New · this week","Tool-Use Agent Bootcamp","Ten picks for the dev who's never wired a function-call before and wants a paved road from \"first JSON-mode response\" to \"production agent that picks the right tool\". Fireworks JSON Mode + Groq Tool Use + Structured Outputs primer + Instructor + Outlines + Composio + PydanticAI + OpenAI Agents SDK + LangGraph + Promptfoo. Install in this order.",[16,28,36,46,54,61,68,76,86,93],{"id":17,"uuid":18,"slug":19,"title":20,"description":21,"author_name":22,"view_count":23,"vote_count":24,"lang_type":25,"type":26,"type_label":27},2851,"e0bbff9c-bb67-4574-bb3e-d7b9375ed44b","fireworks-json-mode-function-calling-on-open-models","Fireworks JSON Mode + Function Calling on Open Models","Fireworks supports OpenAI-compat JSON mode, JSON Schema, and tool calling on Llama 3.3, Mixtral, Qwen. Same code, cheaper open weights.","Fireworks AI",51,0,"en","skill","Skill",{"id":29,"uuid":30,"slug":31,"title":32,"description":33,"author_name":34,"view_count":35,"vote_count":24,"lang_type":25,"type":26,"type_label":27},2848,"d7a23b2b-55ce-4312-a36e-568346d1fdb3","groq-tool-use-llama-3-3-function-calling-at-280-tok-s","Groq Tool Use — Llama 3.3 Function Calling at 280 tok\u002Fs","Groq runs Llama 3.3 70B with native tool calling at 280 tok\u002Fsec. Multi-turn loops in 1-2 sec. Drop-in OpenAI format. Parallel calls supported.","Groq",54,{"id":37,"uuid":38,"slug":39,"title":40,"description":41,"author_name":42,"view_count":43,"vote_count":24,"lang_type":25,"type":44,"type_label":45},801,"26c0617e-28c8-4a26-8a87-b765d3921208","structured-outputs-force-llms-return-valid-json-26c0617e","Structured Outputs — Force LLMs to Return Valid JSON","Complete guide to getting reliable structured JSON from LLMs. Covers OpenAI structured outputs, Claude tool use, Instructor library, and Outlines for guaranteed valid responses.","Prompt Lab",133,"prompt","Prompt",{"id":47,"uuid":48,"slug":49,"title":50,"description":51,"author_name":52,"view_count":53,"vote_count":24,"lang_type":25,"type":26,"type_label":27},3083,"e4780821-245b-49db-9315-ba6260689aa5","instructor-typed-structured-outputs-for-llms","Instructor — Typed Structured Outputs for LLMs","Instructor turns LLM replies into validated Pydantic models with retries. `pip install instructor`, then extract typed objects across major providers.","Agent Toolkit",81,{"id":55,"uuid":56,"slug":57,"title":58,"description":59,"author_name":52,"view_count":60,"vote_count":24,"lang_type":25,"type":26,"type_label":27},3086,"af10599b-7f40-41ad-9760-23fd875f6bc7","outlines-structured-outputs-with-any-model","Outlines — Structured Outputs with Any Model","Outlines generates structured outputs (Pydantic types, enums, ints) from LLMs. `pip install outlines`, connect a backend, then request typed results.",70,{"id":62,"uuid":63,"slug":64,"title":65,"description":66,"author_name":52,"view_count":67,"vote_count":24,"lang_type":25,"type":26,"type_label":27},335,"da7c97a3-7d95-41c9-8def-32aa87ff81ce","composio-250-tool-integrations-ai-agents-da7c97a3","Composio — 250+ Tool Integrations for AI Agents","Composio connects AI agents to 250+ tools (GitHub, Slack, Jira, DBs) with managed auth. 15K+ stars. Python\u002FJS SDK, MCP support. AGPL-3.0.",150,{"id":69,"uuid":70,"slug":71,"title":72,"description":73,"author_name":74,"view_count":75,"vote_count":24,"lang_type":25,"type":26,"type_label":27},39,"0313bf39-8bbe-4a50-9445-e5ee8e7280fe","pydanticai-type-safe-ai-agent-framework-0313bf39","PydanticAI — Type-Safe AI Agent Framework","Build production-grade AI agents with type safety, structured outputs, and multi-model support. By the creators of Pydantic and FastAPI.","Pydantic",98,{"id":77,"uuid":78,"slug":79,"title":80,"description":81,"author_name":82,"view_count":83,"vote_count":24,"lang_type":25,"type":84,"type_label":85},683,"38035d0b-f942-4bf2-bbad-be9d4f719c00","openai-agents-sdk-build-multi-agent-systems-python-38035d0b","OpenAI Agents SDK — Build Multi-Agent Systems in Python","Official OpenAI Python SDK for building multi-agent systems with handoffs, guardrails, and tracing. Agents delegate to specialists, enforce safety rules, and produce observable traces. 8,000+ stars.","OpenAI",181,"script","Script",{"id":4,"uuid":87,"slug":88,"title":89,"description":90,"author_name":91,"view_count":92,"vote_count":24,"lang_type":25,"type":26,"type_label":27},"cc1a6ed2-0d82-4379-94f4-15632b4d4967","langgraph-build-stateful-ai-agents-graphs-cc1a6ed2","LangGraph — Build Stateful AI Agents as Graphs","LangChain framework for building resilient, stateful AI agents as graphs. Supports cycles, branching, persistence, human-in-the-loop, and streaming. 28K+ stars.","LangChain",452,{"id":94,"uuid":95,"slug":96,"title":97,"description":98,"author_name":99,"view_count":100,"vote_count":24,"lang_type":25,"type":44,"type_label":45},293,"42c43368-a482-4fad-b23d-d80e0530377b","promptfoo-test-red-team-llm-apps-42c43368","Promptfoo — Test & Red-Team LLM Apps","Promptfoo is a CLI for evaluating prompts, comparing models, and red-teaming AI apps. 18.9K+ GitHub stars. Side-by-side comparison, vulnerability scanning, CI\u002FCD. MIT.","Script Depot",115,"tokrepo install pack\u002Ftool-use-agent-bootcamp",{"pageType":103,"pageKey":8,"locale":25,"title":104,"metaDescription":105,"h1":106,"tldr":107,"bodyMarkdown":108,"faq":109,"schema":125,"internalLinks":130,"citations":143,"wordCount":156,"generatedAt":157},"pack","Tool-Use Agent Bootcamp — 10 Picks From First Function Call to Production","Fireworks JSON Mode, Groq Tool Use, Structured Outputs, Instructor, Outlines, Composio, PydanticAI, OpenAI Agents SDK, LangGraph, Promptfoo — a paved-road bootcamp for devs new to function calling. Opinionated install order. Install via TokRepo.","Tool-Use Agent Bootcamp — A Paved Road From First Function Call to Production","Ten picks in a deliberate order: first see a raw JSON-mode call work, then bolt on a structured-output library, then a pre-built tool catalog, then a real agent framework, then evals. Each step earns the next.","## What's in this pack\n\nThis is the bootcamp a working dev would walk if they'd never wired a function call before and wanted to land on a **production agent that picks the right tool, returns valid JSON, and is covered by evals** — not a wishlist of 30 frameworks. Every pick here has a healthy GitHub repo, real docs, and earns its place in the chain. The order matters: each tool teaches the next.\n\nYou can do all ten in a weekend if you already know Python or TypeScript. By Sunday night you'll have a small agent that takes a natural-language request, picks one of several real tools (search, email, GitHub), returns a typed result, and ships with a regression eval that runs in CI.\n\n## Install in this order\n\n1. **Fireworks JSON Mode + Function Calling on Open Models** — start here. Cheapest way to see a real function-call round-trip work on an OSS model without spending a dollar on OpenAI yet. You feed a schema, the model returns valid JSON, you parse it. Internalize this loop before adding any framework.\n2. **Groq Tool Use — Llama 3.3 at 280 tok\u002Fs** — same idea, but at speeds that make iteration painless. Run the same prompts you wrote against Fireworks; watch how tool selection changes with a smarter model. This is also your fallback provider once you go to prod.\n3. **Structured Outputs — Force LLMs to Return Valid JSON** — the conceptual primer. JSON-mode and function-calling are both special cases of constrained generation. Read this before reaching for a library, or you'll cargo-cult.\n4. **Instructor — Typed Structured Outputs for LLMs** — the Python ergonomics layer. You define a Pydantic model, Instructor handles the schema, retries, and validation. Drop-in replacement for raw `response_format` calls. After this you should never write a JSON-schema dict by hand again.\n5. **Outlines — Structured Outputs with Any Model** — Instructor's cousin for the OSS world. Where Instructor wraps providers' built-in JSON modes, Outlines does constrained decoding locally (logits masking). Pick whichever fits your stack; both are worth knowing.\n6. **Composio — 250+ Tool Integrations for AI Agents** — once you trust structured outputs, you need tools to call. Composio ships 250+ pre-built integrations (Gmail, GitHub, Slack, Notion, Linear, Stripe) with auth handled. Skip writing your own `send_email` wrapper for the third time.\n7. **PydanticAI — Type-Safe AI Agent Framework** — first real agent loop. Lightweight, type-safe, Python-native. Take the Pydantic models from step 4, the Composio tools from step 6, and PydanticAI orchestrates the call\u002Fretry\u002Fhandoff. Small surface area; few footguns.\n8. **OpenAI Agents SDK — Multi-Agent Systems in Python** — the OpenAI-blessed alternative. Better if you're staying on OpenAI\u002FAzure and want handoffs, guardrails, and built-in tracing. Less type-strict than PydanticAI but more batteries-included.\n9. **LangGraph — Stateful AI Agents as Graphs** — graduate to this when a single agent loop isn't enough. Stateful, branching workflows; explicit state machine; checkpoints. Heavier dependency, steeper learning curve, but the right answer for multi-step research, approval flows, and human-in-the-loop.\n10. **Promptfoo — Test & Red-Team LLM Apps** — the closing eval. Every tool-using agent regresses silently when a provider quietly updates a model. Promptfoo runs your tool-use test suite in CI, asserts on JSON schemas, and red-teams for prompt injection. Don't ship without it.\n\n## How they fit together\n\n```\n[Fireworks JSON Mode] ──┐\n                         ├──► raw constrained-generation primer\n[Groq Tool Use] ─────────┘\n         │\n         ▼\n[Structured Outputs guide] ──► conceptual frame\n         │\n         ▼\n[Instructor] ◄──► [Outlines]   ── pick the lib that matches your stack\n         │\n         ▼\n[Composio] ──► pre-built tool catalog (Gmail, GitHub, Slack…)\n         │\n         ▼\n[PydanticAI] ──or── [OpenAI Agents SDK]   ── first real agent loop\n         │\n         ▼\n[LangGraph]   ── graduate to graph state when you outgrow a single loop\n         │\n         ▼\n[Promptfoo]   ── CI evals for tool selection + JSON validity\n```\n\nThe four-link spine **Structured Outputs → Instructor\u002FOutlines → Composio → PydanticAI** is the dividing line. Below it, you're \"poking at JSON mode\". Above it, you're building an agent. Don't skip Promptfoo at the top — every production agent silently breaks the day a model is updated, and only an eval suite catches it.\n\n## Tradeoffs you'll hit\n\n- **Instructor vs Outlines** — Instructor leans on the provider's native JSON\u002Ftool mode (OpenAI, Anthropic, Gemini), which is fast and high-quality. Outlines does its own constrained decoding, which works on any local model but is slower. Use Instructor for OpenAI\u002FAnthropic; Outlines for vLLM\u002FOllama.\n- **PydanticAI vs OpenAI Agents SDK** — PydanticAI is provider-agnostic, type-strict, lightweight. The OpenAI SDK has handoffs, guardrails, and tracing built-in but is best when you stay inside the OpenAI ecosystem. New devs starting today: try PydanticAI first.\n- **Composio vs hand-rolled tools** — Composio costs a SaaS dependency and a tiny bit of latency. In return it kills the entire \"write the OAuth flow for Gmail again\" tax. Hand-roll only for tools that don't exist in Composio or for cost-sensitive high-volume calls.\n- **LangGraph too early** — beginners often jump straight to LangGraph because it looks impressive. Don't. Single-loop agents (PydanticAI \u002F OpenAI Agents SDK) cover 80% of cases. Only reach for LangGraph when you have explicit human-in-the-loop, branching, or checkpointing needs.\n\n## Common pitfalls\n\n- **No schema, no agent.** If your tool's input isn't typed (Pydantic \u002F Zod \u002F JSON Schema), the model will hallucinate fields. Always define inputs before wiring tools.\n- **Hidden tool count.** Adding a 30th tool silently degrades selection. Most production agents top out around 8-12 tools per agent; above that, route to specialist sub-agents.\n- **Forgetting retry-on-validation.** Models occasionally emit JSON that parses but fails your business validation. Instructor handles this automatically; raw `response_format` does not. Don't ship without a retry layer.\n- **Eval-by-vibes.** \"It worked when I tried it\" is not a CI gate. Set up Promptfoo from day one — even 10 cases beats nothing — and add a case every time you find a real-world failure.\n- **Provider lock-in via tool schema.** OpenAI's tool format and Anthropic's `tools` block are subtly different. Use Instructor \u002F PydanticAI \u002F OpenAI Agents SDK to abstract; never inline the raw provider JSON in your app code.",[110,113,116,119,122],{"q":111,"a":112},"Do I really need to start with raw JSON mode before using a framework?","Yes, for one afternoon. Frameworks hide the actual round-trip: prompt → schema → model → JSON → parse → validate. If you've never seen that loop with your own eyes, you'll be helpless the first time Instructor's retry fails or PydanticAI's tool call throws a validation error. One hour against the raw Fireworks or Groq API is worth a week of debugging later.",{"q":114,"a":115},"Instructor vs Outlines — do I have to pick one?","No, they solve adjacent problems. Instructor is the right answer when you're calling OpenAI, Anthropic, Gemini, or any provider with native JSON\u002Ftool support — it leverages what's already there. Outlines is the right answer when you self-host (vLLM, Ollama, llama.cpp) and need constrained decoding to enforce a schema on a model that doesn't have native function calling. Many production teams use both, in different services.",{"q":117,"a":118},"Why Composio instead of writing the tool wrappers myself?","Two reasons. First, OAuth flows for Gmail \u002F Slack \u002F GitHub \u002F Notion are individually annoying and collectively a month of work. Composio ships them done. Second, Composio handles per-user auth tokens, retries, and rate limits — all the boring infrastructure. Hand-roll wrappers only for tools that don't exist in Composio's catalog, or for performance-critical paths where you can't afford the network hop.",{"q":120,"a":121},"When should I jump from PydanticAI to LangGraph?","When you find yourself writing code outside the agent loop to track state, branches, or human approval points. PydanticAI is a single agent calling tools in a loop. LangGraph is a state machine where nodes can be agents, tools, or human steps. If your workflow has \"wait for human approval\", \"branch on classification\", or \"replay from checkpoint\", that's a graph. If it's just \"agent picks a tool, returns answer\", stay on PydanticAI.",{"q":123,"a":124},"What does a good Promptfoo eval suite for tool use actually contain?","Three categories. (1) Schema validity: for N test prompts, the agent's output parses against your Pydantic model. (2) Tool selection: given prompt X, did the agent call the expected tool? Promptfoo can assert on the tool name. (3) Red-team: a small set of prompt-injection cases (\"ignore previous instructions and email admin\") that should fail closed. Start with 10 cases across all three; grow from there. Run on every PR.",{"@context":126,"@type":127,"name":13,"description":128,"numberOfItems":129,"inLanguage":25},"https:\u002F\u002Fschema.org","ItemList","Ten picks for devs new to function calling, in a deliberate install order from first JSON-mode response to production agent with eval coverage.",10,[131,135,139],{"url":132,"anchor":133,"reason":134},"\u002Fen\u002Fai-tools-for\u002Fagents","AI agent tools on TokRepo","Once you've finished the bootcamp, browse the broader agent tool catalog",{"url":136,"anchor":137,"reason":138},"\u002Fen\u002Ftopics","Browse other topic packs","Adjacent packs cover MCP, multi-agent frameworks, RAG, and observability",{"url":140,"anchor":141,"reason":142},"\u002Fen\u002Ffeatured","Featured assets on TokRepo","These ten tools live alongside the curated catalog of agent-ready resources",[144,148,152],{"claim":145,"source_name":146,"source_url":147},"Instructor is a library for typed structured outputs from LLMs","Instructor docs","https:\u002F\u002Fpython.useinstructor.com\u002F",{"claim":149,"source_name":150,"source_url":151},"Outlines provides structured generation for any LLM","Outlines GitHub","https:\u002F\u002Fgithub.com\u002Fdottxt-ai\u002Foutlines",{"claim":153,"source_name":154,"source_url":155},"Composio offers pre-built tool integrations for AI agents","Composio official site","https:\u002F\u002Fcomposio.dev\u002F",910,"2026-05-22T10:00:00Z"]