---
title: "Customize the system prompt"
description: "Learn how to customize the system prompt for the AI agent when using it with Tiptap Cloud."
canonical_url: "https://tiptap.dev/docs/content-ai/capabilities/agent/configure/system-prompt"
---

# Customize the system prompt

Learn how to customize the system prompt for the AI agent when using it with Tiptap Cloud.

Would you like to customize how your AI agent acts, writes and responds to users? Define a custom system prompt.

## Usage with Tiptap Cloud

When using the AI Agent extension with Tiptap Cloud, use the `systemPrompt` option to set a custom system prompt for the AI agent.

```ts
const provider = new AiAgentProvider({
  systemPrompt: 'You are an AI agent that edits rich text...',
  // ... Other options
})
```

This will **replace** the default system prompt that is used in Tiptap Cloud.

## Usage with a custom AI agent

When using the AI Agent extension with a custom AI agent running in your backend, the way to customize the system prompt depends on the AI model provider you are using. Learn more in our [Custom AI agent integration guide](https://tiptap.dev/docs/content-ai/capabilities/agent/custom-llms.md).

## Support multiple AI agent types

Thanks to system prompts, your app can support multiple types of AI Agents, each with their rules and personality. You can change the system prompt at any time by calling the `setSystemPrompt` method.

```ts
provider.setSystemPrompt('You are an AI agent that edits rich text...')
```

## Crafting a good system prompt

Nailing the right system prompt can be hard. The `@tiptap-pro/extension-ai-agent-server` package provides a default system prompt that works out of the box with the AI agent. Use it as a starting point to build your custom system prompt.

```ts
import { getDefaultSystemPrompt } from '@tiptap-pro/extension-ai-agent-server'

// Log the default system prompt to read it and adjust it to your needs.
console.log(getDefaultSystemPrompt())
```

Prompt engineering techniques can help you obtain the desired behavior from the AI agent. To learn more, see these resources:

- [ChatGPT Prompt Engineering for Developers (course by DeepLearning.AI)](https://www.deeplearning.ai/short-courses/chatgpt-prompt-engineering-for-developers/)
- [OpenAI prompt engineering guide](https://platform.openai.com/docs/guides/text)
- [GPT-4.1 prompting guide](https://cookbook.openai.com/examples/gpt4-1_prompting_guide)
- [Anthropic prompt engineering guide](https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/overview)
