> ## Documentation Index
> Fetch the complete documentation index at: https://www.algolia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# algolia agentstudio agents create

> Create an Agent Studio agent.

```txt Usage theme={"system"}
algolia agentstudio agents create [flags]
```

## Examples

Create a draft from flags (not publishable until it has a provider and model):

```sh icon=square-terminal theme={"system"}
algolia agentstudio agents create --name "support-bot" --instructions "You are a helpful assistant."
```

Create from a JSON object:

```sh icon=square-terminal theme={"system"}
algolia agentstudio agents create --json '{"name":"support-bot","instructions":"You are a helpful assistant."}'
```

Create with a provider and model so the agent can be published:

```sh icon=square-terminal theme={"system"}
algolia agentstudio agents create --json '{"name":"support-bot","instructions":"You are a helpful assistant.","providerId":"22222222-2222-4222-8222-222222222222","model":"gpt-4o"}'
```

## Flags

<ParamField body="--instructions">
  Agent prompt
</ParamField>

<ParamField body="--json">
  Agent JSON object (include providerId and model to publish later)
</ParamField>

<ParamField body="--name">
  Agent name
</ParamField>

## Output formatting flags

<ParamField body="--allow-missing-template-keys">
  If true, ignore errors in templates due to missing fields or map keys. This only applies to golang and jsonpath output formats.
</ParamField>

<ParamField body="-o, --output">
  Output format. One of: (json, jsonl, ndjson, jsonpath, jsonpath-as-json, jsonpath-file).
</ParamField>

<ParamField body="--template">
  Template string or path to a template file to use when --output=jsonpath, --output=jsonpath-file.
</ParamField>
