initial commit: slides ready + upgraded

This commit is contained in:
2026-05-24 10:37:53 +02:00
commit f6f46972c3
173 changed files with 16756 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>