Julep Tools — 에이전트가 쓰는 도구

Julep Tools — 에이전트가 쓰는 도구

에이전트에게는 모델이 목표를 달성하기 위해 '호출'할 수 있는 **프로그래밍 인터페이스(도구)**가 주어져요. 예를 들어 web_search(query) 도구로 인터넷을 검색할 수 있어요. Julep은 에이전트 실행을 관리하는 백엔드라는 점이 특징이에요.

도구의 구성

  1. 이름(Name): 도구의 고유 식별자.
  2. 유형(Type): 도구의 카테고리. 네 가지가 있어요.
    • 사용자 정의 함수(User-defined functions): OpenAI의 function-calling과 유사. 클라이언트 처리가 필요하고, 작업은 클라이언트가 함수를 실행해 결과를 반환할 때까지 멈춰요.
    • system 도구: 작업 실행 트리거나 메타데이터 필드 추가 같은 Julep API 호출용 내장 도구.
    • integrations: 에이전트 역량을 확장하는 내장 서드파티 도구.
    • api_calls: 워크플로 중 직접 실행되는 API 호출.
  3. 인자(Arguments): 도구에 필요한 입력.

시스템 도구 예시

name: Example system tool task
description: List agents using system call tools
tools:
  - name: list_agent_docs
    description: List all docs for the given agent
    type: system
    system:
      resource: agent
      subresource: doc
      operation: list
main:
  - tool: list_agents
    arguments:
      limit: 10

자동 도구 실행 (Automatic Tool Execution)

Julep은 auto_run_tools 파라미터로 에이전트가 수동 개입 없이 도구를 쓰도록 지원해요.

  • 세션(채팅): sessions.chat() 호출 시 auto_run_tools=true 설정.
  • 작업(프롬프트 스텝): 프롬프트 스텝 정의에 auto_run_tools: true 설정.
response = client.sessions.chat(
    session_id=session.id,
    messages=[{"role": "user", "content": "Tell me about the latest developments in quantum computing"}],
    auto_run_tools=True
)
print(response.choices[0].message.content)

모델이 도구가 필요하다고 결정하면, Julep이 도구를 실행하고 출력을 캡처해 다시 모델에 보내며 한 번의 API 호출로 대화를 이어가요.

더 알아보기 (Learn more)

출처: Julep 공식 문서