Skip to content
BENIBIX Learn

systemPrompt Option

Also known as system_prompt, claude_code preset, Claude Agent SDK systemPrompt

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

Think of it like

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

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.

Why it matters

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

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 code

typescript
systemPrompt: {
  type: "preset",
  preset: "claude_code",
  append: "Always run the tests.",
}
Claude Code's prompt, plus one line of your own.

Common mistake

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

Key takeaways

  1. 1
    Minimal by default. Tool calls only.
  2. 2
    claude_code preset. The full prompt.
  3. 3
    append adds to it. Keeps the rest.

Compare