System prompt
Every lite-agent run starts from a system prompt that grounds the model in your workspace: where it may work, which tools to prefer, and which skills and subagents exist. The SDK builds a good one for you with buildSystemPrompt — workdir, model name, available skills, and available subagents are all filled in automatically — and lets you replace or extend it when your agent needs its own voice, rules, or domain context.
Usage
Pass system to createLiteAgent (or systemPrompt to query) to replace the built-in prompt entirely:
query() accepts the same string under the name systemPrompt:
Appending to the default prompt
A full override throws away the built-in grounding. To keep the default and add your own rules, call buildSystemPrompt yourself and concatenate — it is the same builder the SDK uses internally, exported from @lite-agent/sdk:
buildSystemPrompt(opts) takes a SystemPromptOptions object and returns the prompt string:
When you override system, the SDK no longer injects the auto-generated lists of available skills and subagents into the prompt. The load_skill and Agent tools still work, but the model only knows what to load if your prompt tells it.
What the default prompt contains
buildSystemPrompt produces a compact prompt with these sections:
- Identity & boundary — "You are lite-agent, a coding agent operating in
<workdir>"; never access paths outside it. - Core principles — prefer tools over prose.
- Files — use
read_file/write_file/edit_file/delete_fileinstead of shell equivalents; usebashfor running commands and searching. - Task planning — for 3+ step work, plan with
TaskCreateand track withTaskUpdate(see Tasks). - Skills — pull specialized knowledge on demand with
load_skill, followed by the auto-discovered skill list. - Subagents — when subagents exist, how and when to delegate with the
Agenttool (see Subagents).
Two capabilities extend the prompt at assembly time rather than through system:
- Setting
outputSchemaappends a## Final answersection instructing the model to callfinal_answerexactly once. - The Tasks reminder is injected per turn as a
<system-reminder>message, not into the system prompt.
See also
- Structured output — the
## Final answersection appended whenoutputSchemais set. - Tasks — the per-turn task-list reminder.
- Subagents — the subagent list the default prompt surfaces.
- Getting started — install and run your first agent.