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

# Python SDK

> 에이전트 트레이스를 Agent Lens로 전송하는 CoreWeave Forge Python SDK 레퍼런스입니다.

CoreWeave Forge Python SDK(`coreweave`)는 에이전트 대화, 턴, LLM Call, 도구 Call, 하위 에이전트를 OpenTelemetry span으로 기록하여 Agent Lens로 내보냅니다. 이 레퍼런스는 SDK 버전 0.1.0b0을 기준으로 합니다.

<h2 id="install">
  설치
</h2>

SDK를 사용하려면 Python 3.10 이상이 필요합니다.

```bash theme={"system"}
pip install coreweave
```

공급자 SDK를 자동으로 트레이스하려면 해당 extra를 설치하세요:

```bash theme={"system"}
pip install "coreweave[openai]"
pip install "coreweave[anthropic]"
pip install "coreweave[google-genai]"
```

<h2 id="import-and-initialize">
  임포트 및 초기화
</h2>

트레이싱 모듈을 임포트한 다음, 프로젝트를 `entity/project` 형식으로 지정해 [`init`](/ko/products/agent-lens/reference/python-sdk/setup#init)을 호출하세요. `api_key`를 전달하지 않으면 `init`은 `WANDB_API_KEY` 환경 변수에서 API 키를 읽어옵니다.

```python theme={"system"}
from coreweave.forge.agentlens import tracing

tracing.init("[ENTITY]/[PROJECT]")
```

<h2 id="reference-pages">
  레퍼런스 페이지
</h2>

<h3 id="setup">
  설정
</h3>

| 페이지 | 다루는 내용 |
| - | - |
| [설정 및 종료](/ko/products/agent-lens/reference/python-sdk/setup) | `init`, `force_flush`, `shutdown`, `TracingSession` |

<h3 id="spans">
  Span
</h3>

| 페이지 | 다루는 내용 |
| - | - |
| [Conversation](/ko/products/agent-lens/reference/python-sdk/conversation) | `Conversation` |
| [Turn](/ko/products/agent-lens/reference/python-sdk/turn) | `Turn` |
| [LLM](/ko/products/agent-lens/reference/python-sdk/llm) | `LLM` |
| [Tool](/ko/products/agent-lens/reference/python-sdk/tool) | `Tool` |
| [SubAgent](/ko/products/agent-lens/reference/python-sdk/subagent) | `SubAgent` |
| [Span 함수](/ko/products/agent-lens/reference/python-sdk/span-functions) | `start_conversation`, `start_turn`, `start_llm`, `start_tool`, `start_subagent`, `end_conversation`, `end_turn`, `end_llm`, `get_current_conversation`, `get_current_turn`, `get_current_llm` |

<h3 id="batch-logging">
  배치 로깅
</h3>

| 페이지 | 다루는 내용 |
| - | - |
| [배치 로깅](/ko/products/agent-lens/reference/python-sdk/batch-logging) | `log_turn`, `log_conversation`, `LogResult` |

<h3 id="messages">
  메시지
</h3>

| 페이지 | 다루는 내용 |
| - | - |
| [메시지 유형](/ko/products/agent-lens/reference/python-sdk/message-types) | `Message`, `MessagePart`, `TextPart`, `ReasoningPart`, `ToolCallPart`, `ToolCallResponsePart`, `BlobPart`, `UriPart`, `FilePart`, `Usage`, `Reasoning`, `MediaAttachment` |

<h3 id="provider-integrations">
  공급자 인테그레이션
</h3>

| 페이지 | 내용 |
| - | - |
| [인테그레이션](/ko/products/agent-lens/reference/python-sdk/integrations) | `autopatch`, `disable_autopatch`, `patch_openai`, `unpatch_openai`, `patch_anthropic`, `unpatch_anthropic`, `patch_google_genai`, `unpatch_google_genai`, `unpatch_all` |
