---
layout: default
---
# systemPrompt: Configurando el Comportamiento
**String simple:**
```typescript
const agent = createAgent({
model: "mistral:mistral-large-latest",
tools: [weatherTool],
systemPrompt: "Eres un asistente meteorológico. Sé conciso y preciso.",
});
```
**SystemMessage (para features avanzados como cache de Anthropic):**
```typescript
import { SystemMessage } from "langchain";
const agent = createAgent({
model: "anthropic:claude-sonnet-4-6",
tools: [weatherTool],
systemPrompt: new SystemMessage({
content: [
{ type: "text", text: "Eres un experto en clima...", cache_control: { type: "ephemeral" } }
],
}),
});
```