> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tokenlab.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# CrewAI

> OpenAI 호환 LLM 설정을 통해 CrewAI 에이전트에서 TokenLab 모델 사용하기

## 개요

CrewAI는 환경 변수나 `LLM` 클래스에 모델, API 키, 베이스 URL을 설정하여 OpenAI 호환 LLM을 지원합니다.

<Note>
  **유형**: 에이전트 프레임워크

  **기본 경로**: OpenAI 호환 채팅 완성(Chat Completions)

  **지원 신뢰도**: 커스텀 엔드포인트 경로 지원
</Note>

## 환경 변수

```python theme={null}
import os

os.environ["OPENAI_API_KEY"] = "sk-your-tokenlab-key"
os.environ["OPENAI_API_BASE"] = "https://api.tokenlab.sh/v1"
os.environ["OPENAI_MODEL_NAME"] = "claude-sonnet-5"
```

## LLM 클래스

```python theme={null}
from crewai import Agent, LLM

llm = LLM(
    model="claude-sonnet-5",
    base_url="https://api.tokenlab.sh/v1",
    api_key="sk-your-tokenlab-key",
)

agent = Agent(
    role="Research analyst",
    goal="Summarize technical tradeoffs clearly",
    backstory="You produce concise implementation notes.",
    llm=llm,
)
```

## 모델 제안

일상적인 크루(crew) 작업에는 `gpt-5.4-mini`를, 계획 중심의 에이전트에는 `claude-sonnet-5` 또는 `gpt-5.4`를, 빠르고 저렴한 반복 작업에는 `deepseek-v4-flash`를 사용하는 것을 권장합니다.

## 엔드포인트 참고 사항

CrewAI의 OpenAI 호환 경로는 채팅 완성(Chat Completions) 스타일의 에이전트 호출에 가장 적합합니다. 선택한 도구나 SDK가 네이티브 프로토콜을 지원하는 경우에만 TokenLab 네이티브 엔드포인트를 직접 사용하십시오.
