0Pricing
AI Agents with LangChain & Autonomous Workflows · Ders

Araç Setleri ve Yapılandırılmış Araç Girdileri

İlişkili araçları yeniden kullanılabilir araç setlerinde bir araya getirin ve şemalarla yapılandırılmış, türü belirlenmiş bağımsız değişkenler tanımlayın; böylece aracılarınız doğru parametrelerle güvenilir biçimde çağrı yapsın.

Araç Setleri ve Yapılandırılmış Araç Girdileri, CoddyKit'te ücretsiz bir AI Agents with LangChain & Autonomous Workflows dersidir. Bu, 4 dersinin 4. dersidir. Aşağıdan dersin tamamını ücretsiz okuyabilir, sonra tarayıcıda yerleşik kod editörü ve 7/24 yapay zeka koçu ile uygulamalı olarak pratik yapabilirsin. Bu, AI Agents with LangChain & Autonomous Workflows öğrenme yolunun bir parçasıdır ve ilerlemeniz web ve CoddyKit uygulaması arasında senkronize olur. AI Agents with LangChain & Autonomous Workflows kursu toplamda 4 dersten oluşur.

Bu dersin bazı bölümleri henüz çevrilmemiş olup İngilizce olarak gösterilmektedir.

Beyond Single Tools

Real integrations rarely need just one function. A database integration needs list-tables, run-query, and describe-schema together.

A toolkit groups related tools so an agent gets a coherent capability in one bundle.

The Single-String Limitation

A basic tool takes one string input. But many actions need multiple typed arguments — a date range, a user id, a limit.

Structured tools let the agent pass several validated parameters instead of cramming them into one string.

Defining an Input Schema

Use a Pydantic model to describe the arguments. The field descriptions guide the LLM on how to fill them.

from pydantic import BaseModel, Field

class SearchArgs(BaseModel):
    query: str = Field(description='Search keywords')
    limit: int = Field(description='Max results', default=5)

Attaching the Schema to a Tool

Pass args_schema so the agent knows the exact shape it must produce.

from langchain.tools import StructuredTool

def search(query: str, limit: int = 5):
    return run_search(query, limit)

tool = StructuredTool.from_function(
    func=search,
    name='search',
    description='Search the catalog',
    args_schema=SearchArgs
)

The @tool Decorator Shortcut

The @tool decorator infers a schema from your type hints and docstring, the quickest way to make a structured tool.

from langchain.tools import tool

@tool
def get_weather(city: str, units: str = 'metric') -> str:
    'Get current weather for a city.'
    return fetch_weather(city, units)

Why Descriptions Matter

The LLM chooses tools and fills arguments from your name and descriptions. Vague text causes wrong tool choice or bad parameters.

  • Say what the tool does and when to use it
  • Describe each field clearly
  • Mention units and formats

Building a Toolkit

A toolkit subclass exposes a get_tools() method returning the grouped tools. Shared config (like a client) lives on the toolkit.

from langchain.tools import BaseToolkit

class CrmToolkit(BaseToolkit):
    client: object
    def get_tools(self):
        return [list_contacts, create_contact, add_note]

Giving Tools to an Agent

Expand a toolkit into the agent's tool list. The agent now has the whole capability set at once.

toolkit = CrmToolkit(client=crm)
agent = create_agent(llm, toolkit.get_tools())

Validation Protects You

Because the schema is enforced, malformed agent output is rejected before your function runs. This stops invalid types or missing required fields from reaching your integration.

Handling Tool Errors

Tools can fail (network, bad input). Catch exceptions and return a helpful message so the agent can recover or ask the user, instead of crashing the run.

@tool
def fetch_order(order_id: str) -> str:
    'Look up an order by id.'
    try:
        return api.get(order_id)
    except NotFound:
        return 'No order found with that id.'

Reusability

Toolkits make integrations portable: build a GitHubToolkit once and drop it into any agent. Combine multiple toolkits to give an agent broad, well-defined powers.

Quick Check

Test your tools knowledge.

Recap

You learned to build robust integrations:

  • Structured tools accept multiple typed arguments via an args_schema
  • The @tool decorator infers schemas from hints
  • Clear descriptions drive correct tool use
  • Toolkits bundle related tools for reuse
  • Validation and error handling keep agents stable

Well-structured tools are the backbone of dependable agent integrations.

Sıkça Sorulan Sorular

“Araç Setleri ve Yapılandırılmış Araç Girdileri” dersi ücretsiz mi?

Evet — “Araç Setleri ve Yapılandırılmış Araç Girdileri” dersin tüm metni burada web'de ücretsiz olarak okunabilir. Etkileşimli olarak pratik yapmak (yerleşik kod editörü ve 7/24 yapay zeka koçu) ve AI Agents with LangChain & Autonomous Workflows kursunun geri kalanını açmak için CoddyKit PRO'ya yükselt. AI Agents with LangChain & Autonomous Workflows kursu toplamda 4 dersten oluşur.

“Araç Setleri ve Yapılandırılmış Araç Girdileri” dersinde ne öğreneceğim?

İlişkili araçları yeniden kullanılabilir araç setlerinde bir araya getirin ve şemalarla yapılandırılmış, türü belirlenmiş bağımsız değişkenler tanımlayın; böylece aracılarınız doğru parametrelerle gü… AI Agents with LangChain & Autonomous Workflows ile uygulamalı kodu tarayıcıda doğrudan çalıştırarak pratik yaparsın ve 7/24 yapay zeka koçu dersi çalışırken sorularını yanıtlar.

AI Agents with LangChain & Autonomous Workflows öğrenmeye başlamak için deneyim gerekli mi?

Önceden deneyim gerekmez. CoddyKit'te AI Agents with LangChain & Autonomous Workflows, başlangıçtan ileri seviyeye kadar yapılandırıldığı için buradan başlayabilir veya başından başlayıp kendi hızında ilerleme yapabilirsin. Bu, 4 dersinin 4. dersidir.

“Araç Setleri ve Yapılandırılmış Araç Girdileri” dersi ne kadar sürer?

Çoğu CoddyKit dersi yaklaşık 5–10 dakika sürer. Her biri kısa ve etkileşimli olduğu için sabit ilerleme yaparsın ve web ile uygulama arasında tam olarak bıraktığın yerden devam edebilirsin.

Bu AI Agents with LangChain & Autonomous Workflows dersinde kod yazıp çalıştırabilir miyim?

Evet. Her AI Agents with LangChain & Autonomous Workflows dersi yerleşik bir kod editörü içerir, bu sayede tarayıcıda gerçek kod yazıp çalıştırabilir ve anlık yapay zeka geri bildirimi alırsın — yerel kurulum gerekli değildir.

Bu kursun tüm dersleri

  1. Özel LangChain Araçları Oluşturma
  2. Harici API'lerle Bütünleşme
  3. Web Kazıma ve Veri Zenginleştirme
  4. Araç Setleri ve Yapılandırılmış Araç Girdileri
← AI Agents with LangChain & Autonomous Workflows Sayfasına Dön