ConstOptionaloverrides: SystemPromptSectionOverridesReplacement body text keyed by section; omitted
sections fall back to the default. The section heading is added automatically,
so an override does not repeat it. Pass the result to
MapAgentOptions.systemPrompt.
The composed system prompt string.
import { createMapAgent, composeSystemPrompt } from '@tomtom-org/maps-sdk-plugin-agent-toolkit';
const agent = createMapAgent(map, {
model: openai('gpt-4o'),
// No need to repeat "RESPONSE FORMATTING:" — it is prepended for you.
systemPrompt: composeSystemPrompt({
responseFormatting: 'Always respond in Spanish, and keep it terse.',
}),
});
Composes the base system prompt from SYSTEM_PROMPT_SECTIONS, applying any per-section overrides.