C.W.K.
Stream
Lesson 05 of 10 · published

Multi-tool orchestration

~20 min · tools, agents, orchestration

Level 0수련생
0 XP0/100 lessons0/14 achievements
0/120 XP to next level120 XP to go0% complete

많은 tool, turn당 한 결정

10개 tool 노출하면 모델이 turn마다 하나 (또는 parallel set) 골라야. Prompt이 이제 routing cognitive load 부담: 어떤 tool이 어떤 intent에 맞는지, 어떤 순서로, 어떤 guardrail로. 많은 agent가 여기서 무너져 — tool 너무 많고, description 너무 thin.

살아남는 패턴

  • Domain별로 tool group — 별도 router prompt가 domain pick, 그 다음 domain-specific agent가 relevant tool만.
  • Parallel tool call — provider가 이제 한 turn에 여러 tool call return 허용. 서로 의존 안 하는 read operation에 써.
  • Sequential dependency hint — 프롬프트에 'X 부르기 전에 Y 불러서 customer_id 받아'. 모델이 explicit ordering honor.
  • Tool budget — request당 tool call 수 cap. Loop 일어나; budget이 어떻게 bound 하느냐.

Anti-pattern

  • 한 agent에 30+ tool — 모델 degrade.
  • 책임 overlap 두 tool — 모델이 random pick.
  • order guidance 없음 — 모델이 하나 pick, 실패, 다른 거 시도 안 함.

Code

Tool budget enforcement·python
MAX_TOOL_CALLS = 8

calls = 0
while calls < MAX_TOOL_CALLS:
    resp = client.messages.create(model=..., tools=tools, messages=msgs)
    if resp.stop_reason == "end_turn":
        break
    if resp.stop_reason == "tool_use":
        calls += 1
        tool_results = run_tools(resp.content)
        msgs += [{"role": "assistant", "content": resp.content},
                  {"role": "user", "content": tool_results}]
else:
    raise RuntimeError("tool budget exhausted")

External links

Exercise

8+ tool 있는 agent 골라. domain별로 group해서 더 작은 tool set 가진 router-fed sub-agent 두 개로. correct-tool selection rate 비교.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.