initial commit: slides + practica_resueltos + README

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-29 11:50:55 +02:00
commit 0aff31e2d3
203 changed files with 23207 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
---
layout: default
---
# Checkpointer: MemorySaver
<div class="mt-4 text-xs">
<v-click>
**MemorySaver**: Persistencia en memoria (desarrollo/testing)
```typescript
import { createAgent } from "langchain";
import { MemorySaver } from "@langchain/langgraph";
const agent = createAgent({
model: "mistral:mistral-large-latest",
tools: [weatherTool],
checkpointer: new MemorySaver(), // En memoria RAM
});
const config = { configurable: { thread_id: "conv-1" } };
// Primera conversación
await agent.invoke(
{ messages: [{ role: "user", content: "Hola, soy María" }] }, config
);
// Segunda conversación - recuerda el contexto
await agent.invoke(
{ messages: [{ role: "user", content: "¿Cómo me llamo?" }] }, config
);
// "Tu nombre es María"
```
</v-click>
</div>