---
title: "Create Agent"
method: POST
path: "/v2/agents"
tags: ["Public API"]
---

# Create Agent

`POST /v2/agents`

Create a Web Search Agent. Either pass `template` to materialize a pre-built template (its fields, goals, sources, and suggested questions are copied), or define the agent from scratch with `display_name`, `goals`, `sources`, and an optional `output_schema` for structured results.

## Request body

- WebSearchAgentCreateRequestPublicV2
  - `agent_name` string, nullable — Stable agent name.
  - `description` string, nullable — Agent description shown to users.
  - `display_name` string, nullable — Human-friendly agent name shown to users.
  - `effort` 'low' | 'medium' | 'high' | 'x-high' | '5x-high' | 'max' — Canonical effort tier names for the research graph.
  - `goals` string[] — Ordered goals for the agent to follow.
  - `icon` string, nullable — Icon identifier used when presenting the agent.
  - `is_active` boolean — Whether the agent can be used to start new runs.
  - `output_schema` object, nullable — JSON schema describing the structured output the agent should produce.
  - `skill` string, nullable — Skill or operating context for the agent.
  - `sources` AgentSourcesPublicV2
    - `allow` WebSearchAgentSourceCreateRequestPublicV2[] — Source groups the agent is allowed to use.
      - `domains` string[], required — Domains included in this source group.
      - `order` integer — Zero-based source group position.
      - `title` string, required — Source group title.
    - `avoid` string, nullable — Free-text guidance describing sources or domains to avoid.
    - `block` WebSearchAgentSourceCreateRequestPublicV2[] — Source groups the agent should not use.
      - `domains` string[], required — Domains included in this source group.
      - `order` integer — Zero-based source group position.
      - `title` string, required — Source group title.
    - `prioritize` string, nullable — Free-text guidance describing sources or domains to prioritize.
  - `suggested_questions` string[] — Suggested prompts users can run with this agent.
  - `template` string, nullable — Template name to materialize this instance from. When set, the scalar fields and child rows are copied from the template.
  - `use_case` 'research' | 'enrichment' | 'dataset_building'

## Response `201`

Successful Response

- WebSearchAgentResponsePublicV2
  - `agent_name` string, nullable — Stable agent name.
  - `created_at` string, date-time, required — When the agent was created.
  - `description` string, required — Agent description shown to users.
  - `display_name` string, required — Human-friendly agent name shown to users.
  - `effort` 'low' | 'medium' | 'high' | 'x-high' | '5x-high' | 'max', required — Canonical effort tier names for the research graph.
  - `goals` WebSearchAgentGoalResponsePublicV2[], required — Ordered goals for the agent to follow.
    - `goal` string, required — Goal text.
    - `id` string, required — Unique goal identifier (wsag_<uuid>).
    - `order` integer, required — Zero-based goal position.
  - `icon` string, required — Icon identifier used when presenting the agent.
  - `id` string, required — Unique web search agent identifier (wsa_<uuid>).
  - `is_active` boolean, required — Whether the agent can be used to start new runs.
  - `output_schema` object, nullable, required — JSON schema describing the structured output the agent should produce.
  - `skill` string, required — Skill or operating context for the agent.
  - `sources` AgentSourcesResponsePublicV2, required
    - `allow` WebSearchAgentSourceResponsePublicV2[] — Source groups the agent is allowed to use.
      - `domains` string[], required — Domains included in this source group.
      - `id` string, required — Unique source group identifier (wsas_<uuid>).
      - `order` integer, required — Zero-based source group position.
      - `title` string, required — Source group title.
    - `avoid` string, nullable — Free-text guidance describing sources or domains to avoid.
    - `block` WebSearchAgentSourceResponsePublicV2[] — Source groups the agent should not use.
      - `domains` string[], required — Domains included in this source group.
      - `id` string, required — Unique source group identifier (wsas_<uuid>).
      - `order` integer, required — Zero-based source group position.
      - `title` string, required — Source group title.
    - `prioritize` string, nullable — Free-text guidance describing sources or domains to prioritize.
  - `suggested_questions` WebSearchAgentSuggestedQuestionResponsePublicV2[], required — Suggested prompts users can run with this agent.
    - `id` string, required — Unique suggested question identifier (wsasq_<uuid>).
    - `order` integer, required — Zero-based suggested question position.
    - `question` string, required — Suggested prompt text.
  - `updated_at` string, date-time, required — When the agent was last updated.
  - `use_case` 'research' | 'enrichment' | 'dataset_building', required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/nimbleway/apis/api-gateway.md) · [All operations](https://skmtc.net/nimbleway/apis/api-gateway/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/nimbleway/api-gateway/revisions/9bfe220b7a29/schema)
