---
layout: default
---

# ¿Agentes con APIs Nativas?

Cada provider tiene su propio enfoque

<v-clicks>

### OpenAI: Assistants API

```typescript
const assistant = await openai.beta.assistants.create({
  name: "Analyst", tools: [{ type: "code_interpreter" }], model: "gpt-4.1",
});
const thread = await openai.beta.threads.create();
const run = await openai.beta.threads.runs.create(thread.id, { assistant_id: assistant.id });
```

- Agentes con estado, tools built-in (code interpreter, file search)

### Anthropic: Claude Agent SDK
- Agent SDK con tools built-in (Bash, Read, Edit, Web...)
- O tool use manual si prefieres control total

### Google (Gemini): @google/genai SDK

```typescript
import { GoogleGenAI } from "@google/genai";
const ai = new GoogleGenAI({ apiKey: process.env.GEMINI_API_KEY });
const response = await ai.models.generateContent({
  model: "gemini-2.5-flash", contents: "Explica RAG",
});
```

- Function calling similar a OpenAI
- Vertex AI Agents Builder para low-code enterprise

</v-clicks>


