# System instructions

> Tell Antarya how to answer for a whole conversation.

This is not available on this model yet. The model object's `capabilities.system` turns true when it is.

## What it is for

A system instruction sets the way Antarya answers for every turn: the role she plays, the tone, the format. Put it in `system`, not in a user message, so it applies without being repeated in the conversation.

## Add an instruction

```bash
curl https://antarya.ai/v1/chat \
  -H "Authorization: Bearer $ANTARYA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "system": "You are a careful contracts assistant. Answer in plain English and keep it under 120 words.",
    "messages": [
      {"role": "user", "content": "Summarise this contract'"'"'s termination clause."}
    ]
  }'
```

```python
from antarya import Antarya

client = Antarya()

reply = client.chat.create(
    system="You are a careful contracts assistant. Answer in plain English and keep it under 120 words.",
    messages=[{"role": "user", "content": "Summarise this contract's termination clause."}],
)
print(reply.content[0].text)
```

```typescript
import Antarya from "antarya";

const client = new Antarya();

const reply = await client.chat.create({
  system: "You are a careful contracts assistant. Answer in plain English and keep it under 120 words.",
  messages: [{ role: "user", content: "Summarise this contract's termination clause." }],
});
console.log(reply.content[0].text);
```

```bash
antarya --system "You are a careful contracts assistant. Answer in plain English and keep it under 120 words." "Summarise this contract's termination clause."
```

Output:

```
{
  "id": "req_04",
  "content": [
    {"type": "text", "text": "Either side can end the agreement by giving 30 days of written notice..."}
  ],
  "stop_reason": "end_turn",
  "usage": {"input_tokens": 41, "output_tokens": 52}
}
```

## Writing a good instruction

State what you want, not what you fear. "Answer in plain English" works better than a list of things to avoid. Give the role once, then the format. If the answer feeds another program, say so and ask for the exact shape; for strict shapes use [Structured output](https://antarya.ai/docs/guides/structured-output.md) instead.

## Parameters

- `system` (text, optional): Instructions that apply to the whole conversation. Send it again with every request, since Antarya keeps nothing between requests.
- `messages` (array, required): The conversation, as in any chat request.

## Next steps

- [Structured output](https://antarya.ai/docs/guides/structured-output.md): Get replies in a JSON shape you define.
- [Conversations](https://antarya.ai/docs/guides/conversations.md): Pass history from turn to turn.
- [CLI](https://antarya.ai/docs/cli.md): Use --system from your terminal.
