Custom instructions
Use a system prompt and AGENTS.md to guide model output.
Add a system prompt and AGENTS.md
Send both as top-level UTF-8 strings. Use system_prompt for response behaviour and agents_md for project rules.
{
"model": "deepseek-v4.1-flash-1017",
"system_prompt": "Use British English and answer in two sentences.",
"agents_md": "# Project rules\nUse table-driven tests and descriptive test names.",
"messages": [{"role": "user", "content": "Suggest a test for our string parser."}],
"max_tokens": 256
}| Field | Maximum UTF-8 size |
|---|---|
system_prompt |
150 KB |
agents_md |
200 KB |
Use the file’s text as the value of agents_md. The system prompt, project rules, history and reply share the model’s context window. Keep the rules that matter to the current task and use a model with enough room for the complete request.
Send a local file
This Bash example needs jq. It preserves the file’s line breaks when producing JSON.
jq -n --rawfile agents AGENTS.md '{
model: "deepseek-v4.1-flash-1017",
messages: [{role: "user", content: "Suggest a test for our string parser."}],
system_prompt: "Answer concisely.",
agents_md: $agents,
max_tokens: 256
}' | curl --fail-with-body -sS https://site6.eokgg.win/v1/chat/completions \
-H "Authorization: Bearer $SITE6_API_KEY" \
-H 'Content-Type: application/json' \
--data-binary @-Read the file in Python, TypeScript, PowerShell and other languages.
Keep instructions on follow-ups
Include the fields on each new request, including a Responses continuation with previous_response_id. Server tools run within the original request and their follow-up generations carry its instructions. Clients that call a function and submit its result in a new request should resend the settings.
Attach a document as a file when you want the model to read it as source material. The agents_md field is for project instructions that should guide the answer.