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

# Create and Manage AI Agents in the Nexalytica Agent Foundry

> Learn how to browse, search, and create AI agents in the Agent Foundry, covering every field and option in the 8-step creation wizard.

The Agent Foundry is your central hub for building and managing AI agents in Nexalytica. An agent is a configurable AI assistant you set up once — it runs analysis, monitors your data, and delivers insights, alerts, and reports either on demand or on a schedule. This guide walks you through the Agent Foundry listing page and every step of the agent creation wizard.

## The Agent Foundry listing

When you open the Agent Foundry, you see all agents your departments have access to, organised into four sections: **Running**, **Paused**, **Idle**, and **Errored**.

### Finding agents

Use the search bar to filter agents by name or description. You can also narrow the list using the **Departments** filter and the **Status** filter, which covers the following states:

| Status   | Meaning                                                       |
| -------- | ------------------------------------------------------------- |
| Running  | The agent is actively executing a task right now.             |
| Evolving | The agent is undergoing a self-improvement cycle.             |
| Paused   | The agent has been manually paused; queued runs are waiting.  |
| Idle     | The agent is ready and waiting for its next trigger.          |
| Error    | The agent encountered an unrecoverable error on its last run. |

### Agent cards

Each agent appears as a card showing its current status, a short description, and a set of at-a-glance metrics:

| Metric       | Description                                        |
| ------------ | -------------------------------------------------- |
| Total Runs   | Cumulative number of times the agent has executed. |
| Success Rate | Percentage of runs that completed without error.   |
| Avg Run Time | Average duration of a completed run.               |
| Confidence   | Average confidence score across recent outputs.    |
| Last Active  | Timestamp of the most recent run.                  |

Click the **`...`** menu on any card to access quick actions:

| Action         | What it does                                           |
| -------------- | ------------------------------------------------------ |
| Open           | Opens the agent detail view.                           |
| Pause / Resume | Toggles the agent between active and paused states.    |
| Restart        | Terminates any in-flight run and starts fresh.         |
| Edit           | Returns you to the creation wizard to modify settings. |
| Delete         | Soft-deletes the agent to Trash after confirmation.    |

### Creating a new agent

To start building an agent, click **New Agent** in the top-right corner of the listing page, or press **`n`** from anywhere in the Foundry. Nothing is saved until you complete the final step of the wizard.

***

## The agent creation wizard

The wizard has eight steps. You can move back and forth freely — Nexalytica does not create anything until you click **Create agent** on the final step.

<Steps>
  ### Step 1 — Identity

  Give your agent a clear identity so your team can find and understand it quickly.

  | Field       | Required | Notes                                                                           |
  | ----------- | -------- | ------------------------------------------------------------------------------- |
  | Name        | Yes      | A short, recognisable label for the agent.                                      |
  | Description | No       | A plain-language summary of what the agent does.                                |
  | Departments | Yes      | At least one department must be selected. Agents are never org-wide by default. |
  | Owner       | No       | Defaults to you. The owner controls sharing, deletion, and transfer.            |

  <Note>
    Departments determine who can see and use the agent. If you leave a department later, ownership transfer may be required.
  </Note>

  ### Step 2 — Model & Modes

  Choose how your agent reasons and which AI model powers each mode. At least one mode must be enabled and paired with a model before you can proceed.

  <Note>
    Only models approved by your Org Admin appear in the model selector. Contact your administrator if you need access to a model that isn't listed.
  </Note>

  The table below describes each available mode:

  | Mode           | Toggle         | Best for                                                                                                                                                |
  | -------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | **ReAct**      | On by default  | Standard, chat-with-tools reasoning. The agent follows a think → act → observe loop. Use this for most analytical tasks.                                |
  | **Quick**      | Off by default | Sub-2-second responses with no tool use. Ideal for greetings, simple lookups, and yes/no questions.                                                     |
  | **Deep**       | Off by default | Multi-agent collaboration for complex, multi-step research tasks where thoroughness matters more than speed.                                            |
  | **Graph**      | Off by default | Branching and parallel workflows with optional human-in-the-loop checkpoints. Use for structured processes that require approvals or conditional paths. |
  | **Persistent** | Off by default | A long-running background agent that stays alive across sessions. Required for scheduled monitoring and continuous data watching.                       |

  You can enable multiple modes simultaneously. After enabling a mode, select the model you want it to use from the dropdown.

  Optionally, write an **Initial system prompt** — standing instructions applied to all enabled modes every time the agent runs.

  ### Step 3 — Tools

  Grant your agent access to the capabilities it needs to complete its tasks.

  Browse the **tool tree**, which organises available tools by category. Tick any tool to grant it, or tick an entire category to select all tools within it. The **Selected count** at the top of the panel updates as you make choices.

  <Tip>
    Selecting no tools is perfectly valid. The agent still has access to always-on system capabilities such as reasoning, formatting, and memory.
  </Tip>

  You can change the tool selection later from the agent's **Configuration** tab.

  ### Step 4 — Data Sources

  Connect your agent to the data it needs to query and act on.

  For each data source you want to connect, tick its checkbox and then configure:

  | Setting           | Options                  | Notes                                                   |
  | ----------------- | ------------------------ | ------------------------------------------------------- |
  | Access level      | Read only / Read & write | **Read & write** grants full query and mutation rights. |
  | Daily query limit | Integer (0 = unlimited)  | Set a cap to control costs and prevent runaway queries. |

  <Warning>
    Granting **Read & write** access allows the agent to modify data in that source. Only enable this when your use case explicitly requires it, and pair it with an appropriate approval threshold in Step 6.
  </Warning>

  You can connect additional data sources later from the agent's **Data Context** tab.

  ### Step 5 — Triggers

  Define what causes the agent to run. You can add multiple triggers of different types.

  Click **Add trigger** and choose one of the following:

  <CardGroup cols={2}>
    <Card title="Schedule" icon="clock">
      Set a cron expression and timezone. The agent fires automatically on the defined schedule.
    </Card>

    <Card title="Data Change (CDC)" icon="database">
      Watch one or more tables or sources. The agent fires when a change is detected. Add an optional debounce delay to avoid rapid-fire triggers.
    </Card>

    <Card title="Webhook" icon="webhook">
      The agent fires when an HTTP POST hits its unique endpoint. Optionally restrict requests to a list of allowed IP addresses.
    </Card>

    <Card title="Manual" icon="hand-pointer">
      No configuration required. A person fires the agent on demand from the detail view or from chat.
    </Card>
  </CardGroup>

  Each trigger has an **Enabled** toggle so you can deactivate it without deleting it. To permanently remove a trigger, click **Remove**.

  <Info>
    If you add no triggers, the agent can still be fired manually from its detail view or invoked from a chat session.
  </Info>

  ### Step 6 — Security

  Set the boundaries within which the agent operates. These controls protect your data and limit the blast radius of any misconfiguration.

  | Setting                   | Description                                                                                                                                       |
  | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
  | Role name                 | A label identifying this agent's access role in audit logs.                                                                                       |
  | Permission level          | **Read-only SELECT** — queries only. **Read & write** — queries and mutations. **Admin** — full schema access.                                    |
  | PII access                | **Masked** — values replaced with asterisks. **Hashed** — values replaced with one-way hashes. **Clear** — raw values returned (not recommended). |
  | PII mask fields           | A list of specific field names the agent must always redact in its responses.                                                                     |
  | Row limit per query       | Hard cap on rows returned in a single query.                                                                                                      |
  | Rate limit                | Maximum queries per hour. Set to 0 to disable the limit.                                                                                          |
  | Cost guardrail            | Daily spend ceiling in your billing currency. Runs halt automatically when the ceiling is reached.                                                |
  | Approval threshold        | Actions whose estimated cost exceeds this value require a human approver before executing.                                                        |
  | Flag-confidence threshold | Outputs whose confidence score falls below this value are flagged for human review.                                                               |
  | Data retention            | How long generated artefacts (reports, insights, cached results) are stored before automatic deletion.                                            |
  | Query validation          | When enabled, Nexalytica pre-checks generated SQL/queries for safety before running them.                                                         |

  <Warning>
    Setting PII access to **Clear** means the agent can return raw personally identifiable information in its outputs. Only use this where your data governance policy explicitly permits it.
  </Warning>

  ### Step 7 — Notifications

  Configure where and how the agent sends alerts and status updates.

  Click **Add binding** and complete the form for each channel you want to use:

  | Field                | Options                                                                                                  |
  | -------------------- | -------------------------------------------------------------------------------------------------------- |
  | Channel              | In-app / Email / Slack / PagerDuty                                                                       |
  | Destination          | The specific inbox, email address, channel, or service key to receive messages.                          |
  | Credential reference | An optional reference to a stored credential for authenticated delivery.                                 |
  | Events filter        | Filter by insight severity (Low / Medium / High / Critical), run failures, or actions awaiting approval. |
  | Enabled              | Toggle the binding on or off without deleting it.                                                        |

  To remove a binding entirely, click **Remove** next to it.

  <Info>
    You can skip this step entirely and add notification channels later from the agent's **Configuration** tab.
  </Info>

  ### Step 8 — Review

  The final step shows a read-only summary of every choice you made in Steps 1–7. Review each section carefully.

  * Click **Back** to return to any earlier step and make changes.
  * Click **Create agent** to save everything in a single atomic commit and open the new agent's detail view.

  <Note>
    Nothing is written to Nexalytica until you click **Create agent**. Closing the wizard at any earlier step discards all unsaved work.
  </Note>
</Steps>

***

## Permissions

| Role                | What they can do                                                                |
| ------------------- | ------------------------------------------------------------------------------- |
| Organisation Member | Create agents. Departments selected in Step 1 determine visibility.             |
| Owner               | Share, delete, and transfer agents they own.                                    |
| Org Admin           | Approve tools and models available for selection in Settings → AI Capabilities. |

<Info>
  Departments control agent visibility — an agent is only visible to members of the departments chosen in Step 1. There is no org-wide visibility option.
</Info>
