# systemPrompt Option

> The option that sets what the agent is told before any task.

**Field:** Artificial Intelligence  
**Category:** Claude Agent SDK  
**Also known as:** system_prompt, claude_code preset, Claude Agent SDK systemPrompt

## Think of it like

It is like a job card a new helper reads on day one.

## Definition

systemPrompt is the Agent SDK option that sets the agent's system prompt. In Python it is system_prompt. Left out, the SDK uses a minimal prompt that covers tool calls and little else. A string replaces it with your own. The claude_code preset loads Claude Code's full prompt, and append adds your lines to the end of it.

## Example

Leo's agent kept skipping the test run. He switches to the claude_code preset and appends one line asking it to run the tests.

## Example code

```typescript
systemPrompt: {
  type: "preset",
  preset: "claude_code",
  append: "Always run the tests.",
}
```

Claude Code's prompt, plus one line of your own.

## Why it matters

The default is thin. With no prompt set, the agent acts less like Claude Code than you think.

## Common mistake

Leaving systemPrompt out and expecting the full Claude Code prompt. You have to ask for the preset.

## Three principles

- **Minimal by default.** Tool calls only.
- **claude_code preset.** The full prompt.
- **append adds to it.** Keeps the rest.

## Related terms

- [System Prompt](https://learn.benibix.com/term/ai/system-prompt)
- [--append-system-prompt Flag](https://learn.benibix.com/term/ai/append-system-prompt-flag)
- [settingSources Option](https://learn.benibix.com/term/ai/setting-sources-option)

## Told apart from

- [SystemMessage vs systemPrompt Option](https://learn.benibix.com/compare/sdk-system-message-vs-system-prompt-option): People think SystemMessage holds the system prompt, and it does not. The systemPrompt option is the set of rules the agent gets before your task. SystemMessage is a message the SDK sends back to your code. The first one, init, reports the session ID, the model and the tools. Later ones mark events, such as a chat being squeezed into a summary.

---

Source: https://learn.benibix.com/term/ai/system-prompt-option
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-20
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
