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

# Data Agent Creation Tools

> Create and manage specialized data agents. Assign tools, deploy to Slack, control access, and update configurations.

## **Overview**

### **Tool Name**

```json theme={null}
make_baby_bot
```

### **Purpose**

The **make\_baby\_bot** toolset lets you create, configure, deploy, and
administer purpose-built data agents. Define instructions, select
implementations, assign tools and reusable knowledge bases, manage permissions,
and roll out bots to Slack or other environments.

### **Key Features & Functions**

<Steps>
  <Step title="Create Specialized Agents" icon="robot">
    Spin up new bots with clear instructions and a chosen model implementation.
  </Step>

  <Step title="Curate Tool Access" icon="toolbox">
    Grant or remove capabilities so each bot has only what it needs.
  </Step>

  <Step title="Deploy to Slack" icon="slack">
    Connect data agents to Slack with controlled access to users or channels.
  </Step>

  <Step title="Admin & Governance" icon="shield-halved">
    List, monitor, update, and retire bots with auditable controls.
  </Step>

  <Step title="Evolve Implementations" icon="arrows-rotate">
    Switch engines or providers as requirements change.
  </Step>
</Steps>

<Tip>
  Name and scope each data agent narrowly. Fewer tools and focused instructions produce safer, more predictable behavior.
</Tip>

<Note>
  GenesisAuditor's definition is managed by Genesis. Definition-changing calls in
  this toolset fail for that agent; see the
  [GenesisAuditor guide](/docs/Genesis-Data-Agents/GenesisAuditor-Agent) for the
  behavior and what remains configurable.
</Note>

## **Input Parameters for Each Function**

### **`make_baby_bot`**

**Parameters**

| **Name** | **Definition** | **Format** |
| - | - | :-: |
| **bot\_id** | Unique, **case-sensitive** id in the format `bot_name-xxxxxx` (6 letter code). `Eve` and `eve` are different agents. Genesis rejects a new id that differs from an existing agent only by letter case. | String |
| **bot\_name** | Human friendly data agent name. | String |
| **bot\_intro** | Optional short one-line description shown in agent lists and the overview. Keep it at 500 characters or fewer; if omitted, no description is set. | String |
| **bot\_instructions** | System instructions. Maximum length 250,000 characters. | String |
| **bot\_implementation** | Runtime LLM engine for the agent: `openai`, `azureopenai`, `cortex`, `databricks`, or `litellm`. LiteLLM sub-provider inputs such as `litellm_anthropic` normalize to `litellm`. | String |
| **available\_tools** | *(Legacy)* Comma separated tool group names to grant. Prefer `default_tool_groups` plus `tool_access_mode`/`tool_access_list`; legacy values are migrated into the durable context defaults. | String |
| **knowledge\_bases** | Registered knowledge base IDs to assign at creation time. Accepts a list, JSON array string, or comma-separated string. | String or Array of strings |
| **activate\_slack** | Set `Y` to enable Slack deployment, `N` to disable. | String |
| **slack\_access\_open** | `true` for open to all, `false` for allow list. | Boolean |
| **runner\_id** | Server identifier for hosting (if applicable). | String |
| **confirmed** | Extra confirmation flag used only when prompted by the system. | String |

<Note>
  Knowledge bases are different from raw document indexes. First register the
  reusable bundle with
  [Knowledge Base Admin Tools](/docs/Genbot-Toolkit/Knowledge-Base-Admin-Tools),
  then pass its `knowledge_base_id` values here.
</Note>

<Warning>
  **Case-sensitive agent IDs.** Thread storage paths and metadata caches key off
  the exact `bot_id` string stored in `BOT_SERVICING`. On case-insensitive
  filesystems, two agents whose ids differ only by letter case would collide in
  storage, so `make_baby_bot` returns `success: false` with an error naming the
  conflicting id when that happens.
</Warning>

<Note>
  Creating an agent requires `manage_agents` or `create_agents`. A caller with
  only `create_agents` receives management rights on the agent it creates or
  imports, but not on other agents. Operations that change an existing agent
  require global `manage_agents` or a manage grant on that specific agent.
  Administrators can restore a missing creator grant through the RBAC API; see
  [RBAC in Genesis](/docs/Security-Controls/RBAC-Practical-Guide).
</Note>

<Note>
  **Context-default validation is fail-fast.** When `make_baby_bot` receives
  context-default settings, Genesis validates the capability policy and the default
  tool-group cap before writing the new agent. An invalid patch
  returns `success: false` with an `error` and structured `details`; no agent
  row is created, so you can correct the defaults and retry with the same
  `bot_id`. If validation passes but the later persistence step fails, the
  response identifies that the agent was created and includes a repair hint to
  use `set_bot_context_defaults`, `assign_bot_role`, and
  `set_bot_knowledge_bases` instead of creating it again.
</Note>

### **`get_available_tools`**

**Parameters**

| **Name** | **Definition** | **Format** |
| - | - | :-: |
| **include\_functions** | Include function details. Default `false`. | Boolean |

### **`_remove_bot`**

**Parameters**

| **Name** | **Definition** | **Format** |
| - | - | :-: |
| **bot\_id** | Id of the agent to delete. | String |
| **confirmed** | Must equal `!CONFIRM DELETE <bot_id>` to proceed with deletion. | String |

<Warning>
  **Removing a data agent is permanent.** Back up instructions and configs before calling `_remove_bot`.
</Warning>

### **`_list_all_bots`**

**Parameters**

| **Name** | **Definition** | **Format** |
| - | - | :-: |
| **with\_instructions** | Include full instruction text. Default `false`. | Boolean |

### **`_deploy_to_slack`**

**Parameters**

| **Name** | **Definition** | **Format** |
| - | - | :-: |
| **bot\_id** | Agent id to deploy to Slack. | String |
| **slack\_app\_token** | Optional inline Slack master app token used for manifest operations. | String |
| **slack\_app\_refresh\_token** | Inline Slack master refresh token used to obtain a fresh config token for deploy or redeploy. | String |

<Note>
  Tool-driven Slack deployment requires inline master credentials. Provide `slack_app_refresh_token` on the deploy call, and optionally `slack_app_token` when you want Genesis to rotate from the current master token in the same step.
</Note>

### **`add_new_tools_to_bot`** (deprecated)

<Warning>
  Deprecated. Use `manage_context(action='ADD_CONTEXT', active_tool_groups='...')` for per-thread activation, or `set_bot_context_defaults(default_tool_groups=[...])` for durable defaults. This wrapper now redirects to the durable defaults path (it no longer writes the removed `available_tools` column).
</Warning>

**Parameters**

| **Name** | **Definition** | **Format** |
| - | - | :-: |
| **bot\_id** | Target agent id. | String |
| **new\_tools** | Tool group names to add to the durable defaults. | Array of strings |

### **`remove_tools_from_bot`** (deprecated)

<Warning>
  Deprecated. Use `manage_context(action='REMOVE_CONTEXT', active_tool_groups='...')` for per-thread changes, or `set_bot_context_defaults(default_tool_groups=[...])` for durable defaults. This wrapper now redirects to the durable defaults path.
</Warning>

**Parameters**

| **Name** | **Definition** | **Format** |
| - | - | :-: |
| **bot\_id** | Target agent id. | String |
| **remove\_tools** | Tool group names to remove from the durable defaults. | Array of strings |

### **`update_bot_instructions`**

**Parameters**

| **Name** | **Definition** | **Format** |
| - | - | :-: |
| **bot\_id** | Target agent id. | String |
| **new\_instructions** | Replacement instruction text. | String |
| **bot\_instructions** | Legacy alias for `new_instructions` when older workflows still use it. | String |
| **confirmed** | Must equal `CONFIRMED` before Genesis applies the instruction change. | String |

<Note>
  Genesis previews the current and proposed instructions first, then requires a follow-up call with `confirmed="CONFIRMED"` before saving the update.
</Note>

### **`add_bot_files`**

**Parameters**

| **Name** | **Definition** | **Format** |
| - | - | :-: |
| **bot\_id** | Target agent id. | String |
| **new\_file\_ids** | File IDs to attach to the bot. | Array of strings |
| **new\_file\_names** | Legacy alias for `new_file_ids` when `new_file_ids` is not supplied. | Array of strings |

<Note>
  File attachments are supported for OpenAI-based bots. Cortex-based bots return an error because that runtime does not support files.
</Note>

### **`update_app_level_key`**

**Parameters**

| **Name** | **Definition** | **Format** |
| - | - | :-: |
| **bot\_id** | Target agent id. | String |
| **slack\_app\_level\_key** | New Slack app level key. | String |

### **`_update_bot_implementation`**

**Parameters**

| **Name** | **Definition** | **Format** |
| - | - | :-: |
| **bot\_id** | Target agent id. | String |
| **bot\_implementation** | New runtime engine: `openai`, `azureopenai`, `cortex`, `databricks`, or `litellm` (LiteLLM sub-providers normalize to `litellm`). | String |

### **`get_bot_knowledge_bases`**

**Parameters**

| **Name** | **Definition** | **Format** |
| - | - | :-: |
| **bot\_id** | Target agent id whose current knowledge bases should be inspected. | String |

Returns the assigned `knowledge_base_ids`, raw assignment rows,
`effective_knowledge_bases`, and whether runtime `search_knowledge_bases` and
`read_knowledge_base_doc` currently have any enabled knowledge bases to search
or read for that bot.

### **`set_bot_knowledge_bases`**

**Parameters**

| **Name** | **Definition** | **Format** |
| - | - | :-: |
| **bot\_id** | Target agent id. | String |
| **knowledge\_bases** | Replacement set of registered knowledge-base IDs. Accepts a list, JSON array string, or comma-separated string. | String or Array of strings |

<Note>
  Pass `knowledge_base_id` values, not raw document index names. If you need to
  create the reusable bundle first, use
  [Knowledge Base Admin Tools](/docs/Genbot-Toolkit/Knowledge-Base-Admin-Tools).
</Note>

### **`get_bot_context_defaults`**

**Parameters**

| **Name** | **Definition** | **Format** |
| - | - | :-: |
| **bot\_id** | Target agent id. | String |

Returns `success`, `bot_id`, and a compact `defaults` object with thread-start
tool groups and skills plus `tool_access_mode`, `tool_access_list`,
`skill_access_mode`, and `skill_access_list`. Requires `manage_agents`.

### **`set_bot_context_defaults`**

**Parameters**

| **Name** | **Definition** | **Format** |
| - | - | :-: |
| **bot\_id** | Target agent id. | String |
| **default\_tool\_groups** | Tool groups to auto-load at thread start. | String, array of strings, or comma-separated string |
| **default\_skills** | Skills to auto-load at thread start. | String, array of strings, or comma-separated string |
| **never\_compress\_skills** | Default skills whose injected text thread compression keeps in full. Pass the complete list; `[]` clears it. | String, array of strings, or comma-separated string |
| **tool\_access\_mode** | Tool-policy mode: `all`, `allowlist`, or `denylist`. | String |
| **tool\_access\_list** | Tool groups referenced by `tool_access_mode`. | String, array of strings, or comma-separated string |
| **skill\_access\_mode** | Skill-policy mode: `all`, `allowlist`, or `denylist`. | String |
| **skill\_access\_list** | Skills referenced by `skill_access_mode`. | String, array of strings, or comma-separated string |

Supply at least one field to update. On success, returns `success`, `bot_id`,
and the updated `defaults` snapshot. Requires `manage_agents`.

Each `never_compress_skills` entry must also be in `default_skills`; exceeding
the configured per-agent cap is rejected. See [Advanced Settings](/docs/Setup/Advanced-Settings#never-compress-default-skills)
for the cap and [Agents Center and Skills](/docs/User-Guide/Agents-Center-And-Skills#default-thread-start-skills)
for how never-compress affects injected skill text.

When Genesis rejects the patch because of capability policy, thread preflight,
or default auto-load caps, the tool returns `success: false`, a human-readable
`error` string, and a structured `details` object (for example
`rejected_skills`, `skill_access_mode`, `skill_access_list`, `violation`, and
`cap`) so agents can adjust the request without guessing. Other failures return
only `success` and `error` with no `details` key.

Persistent defaults can retain a policy-authorized channel-bound group while its
runtime adapter is temporarily unavailable; runtime availability is enforced when
the group is activated for a thread.

`set_bot_capability_policy` is a convenience wrapper that forwards only the
policy fields to `set_bot_context_defaults` and shares the same error envelope.

### **`get_bot_capability_policy`**

**Parameters**

| **Name** | **Definition** | **Format** |
| - | - | :-: |
| **bot\_id** | Target agent id. | String |

Returns `success`, `bot_id`, and a `policy` object with
`tool_access_mode`, `tool_access_list`, `skill_access_mode`, and
`skill_access_list`. Requires `manage_agents`.

### **`agent_management`**

Author and synchronize portable, Git-backed agent definitions. Requires
`manage_agents` and `manage_repos`. Call `EXPORT_PREVIEW` before
`EXPORT_COMMIT` whenever a user asks to make a local agent reusable across
Genesis instances. Neither export nor sync applies agent lifecycle changes on
any instance — per-instance enablement and applying a commit-pinned preview
remain separate administrator actions in **Config → Managed Sources**.

| Parameter | Type | Default | Notes |
| - | - | - | - |
| `action` | string | none | One of `REGISTER_MANAGED_SOURCE`, `SYNC_FROM_REPO`, `PUSH_TO_REPO`, `EXPORT_PREVIEW`, `EXPORT_COMMIT`. |
| `params` | object or JSON string | `{}` | Action-specific fields (see table below). |

| Action | `params` fields |
| - | - |
| `REGISTER_MANAGED_SOURCE` | `repo_id` (required). Optional: `source_id`, `remote_url`, `connection`, `release_ref`, `agents_root`, `enabled` (boolean). Registers the repository with `scan_types_enabled: ["agents"]`. Sync only previews agent changes; it does not apply them. |
| `SYNC_FROM_REPO` | `source_id` or `repo_id` (one required). Discovers agent changes from Git and returns a preview. Never applies agent lifecycle changes (`apply_agent_changes` is always `false`). |
| `EXPORT_PREVIEW` | `agent_id` (required; `bot_id` accepted as alias). Returns the strict, secret-free portable definition that would be written to `agent.yaml`. |
| `EXPORT_COMMIT` | `agent_id` (required). Optional: `source_id` or `repo_id`, `artifact_path`, `title`, `body`, `commit_message`. Writes `agents/&lt;agent_id&gt;/agent.yaml` to an isolated per-user worktree and opens a PR/MR. Does not enable or apply the agent on any instance. |
| `PUSH_TO_REPO` | `agent_id` (required). Optional: `title`, `body`, `commit_message`. Opens a PR/MR for valid edits already made in the managed agent workspace. |

The exported `agent.yaml` manifest includes behavior and capability defaults only.
It intentionally excludes Slack or Teams credentials, OAuth secrets, API keys,
database credentials, attached files, knowledge bases, RBAC role assignments, and
instance-specific deployment settings.

For later edits to an already-managed definition, edit through the managed
artifact workspace with `file(action="write"/"search_replace"/etc, repo_id="...",
artifact_type="agent", artifact_id="&lt;agent_id&gt;",
file_path="agent.yaml")`, then call `PUSH_TO_REPO`. For assigning catalog
skills to bots, use [Skill Admin Tools](/docs/Genbot-Toolkit/Skill-Admin-Tools).
For generic clone/branch Git work outside managed artifacts, use
[git\_action](/docs/Genbot-Toolkit/Git-Action-Tools).

**Example**

```python theme={null}
agent_management(
    action="EXPORT_PREVIEW",
    params={"agent_id": "Analyst-k7m2x9"},
)

agent_management(
    action="EXPORT_COMMIT",
    params={
        "agent_id": "Analyst-k7m2x9",
        "source_id": "org-agent-definitions",
        "title": "Add Analyst agent definition",
        "commit_message": "Add agent 'Analyst-k7m2x9' to managed repo",
    },
)
```

### **`_modify_slack_allow_list`**

**Parameters**

| **Name** | **Definition** | **Format** |
| - | - | :-: |
| **action** | One of `LIST`, `GRANT`, `REVOKE`, `GRANT ALL`, `REVOKE ALL`. | String |
| **bot\_id** | Target agent id. | String |
| **user\_identifier** | Slack user id beginning with `U` (when applicable). | String |
| **user\_name** | Full name for user lookup (optional). | String |

<Note>
  **Use Cases below are NOT limited to those and are only referenced as an example.**
</Note>

<Note>
  High-impact allow-list changes use confirmed action strings instead of a
  separate boolean flag. When Genesis returns a confirmation prompt, retry with
  the exact action it requests, such as `GRANT CONFIRMED`,
  `GRANT ALL CONFIRMED`, or `REVOKE ALL CONFIRMED`.
</Note>

## **Use Cases**

1. **Data Engineering Agents** \
   Build and operate data pipelines with guardrails. Grant `data_connector_tools`, `dbt_action`, and `git_and_file_tools` for model runs, schema checks, and versioned SQL changes.
   *Example:* An agent compiles and runs selected dbt models on demand, posts run results, and opens a PR with updated snapshots.
2. **Data Ops Agents** \
   Monitor jobs, surface incidents, and automate remediation steps. Combine `genesis_job_tools`, `harvester_tools`, `jira_connector_tools`, and `slack_tools` for alerting and ticketing.
   *Example:* On failed harvest or long-running warehouse jobs, the agent creates a Jira issue, posts context to Slack, and links logs.
3. **Business Analyst Agents** \
   Provide safe self-service analysis with read-only access. Use `data_connector_tools` for parameterized queries and export to Sheets via `google_drive_tools`.
   *Example:* An analyst asks for weekly revenue by segment; the agent runs a vetted query, returns a table, and publishes a refreshed Google Sheet.

## **Workflow/How It Works**

1. **Create** a agent with a unique `bot_id`, instructions, implementation, and initial tools.
2. **Grant or remove** tools and assigned knowledge bases as the scope sharpens.
3. **Deploy to Slack** if collaboration is required.
4. **Control access** with allow lists or open access.
5. **Iterate** on instructions or switch implementations as needs evolve.
6. **Retire** safely when the data agent is no longer needed.

## **Integration Relevance**

* **slack\_tools** for deployment and notifications.
* **project\_manager\_tools** to align agents with missions and tasks.
* **data\_connector\_tools** for data access in analytics and BI agents.
* **jira\_connector\_tools** to create or update tickets from a agent.
* **file\_manager\_tools** to capture outputs and attach artifacts.

## **Configuration Details**

* `bot_id` must match `name-xxxxxx` where `xxxxxx` is 6 letters or digits, and
  must be unique with **case-sensitive** equality across all agents.
* Tool names must match `get_available_tools` exactly.
* Choose the implementation based on model capability, latency, and cost.
* Slack permissions should follow your org policy for user access and scopes.

## **Limitations or Notes**

1. Deleting a data agent cannot be undone.
2. Tool grants are validated and will fail for unknown tools.
3. Slack deployment requires correct app configuration and workspace permissions.
4. Switching implementations can change model behavior and token limits.
5. Access control changes apply immediately and may interrupt active users.
6. Network connectivity is required for external integrations.

## **Output**

* **Creation and updates** \
  Agent id, configuration summary, granted tools, and deployment status.
* **Listings** Arrays of data agents with ids, names, status, and optional instructions.
* **Access control**
  Current allow list entries and confirmations for grants or revokes.
* **Deployment**
  Slack integration status and any required follow ups.
* **Errors**
  Clear messages for invalid ids, case-only `bot_id` collisions, missing
  permissions, or unsupported tools.
