Skip to content

Conversation

@leemthompo
Copy link
Contributor

@leemthompo leemthompo commented Nov 7, 2025

@leemthompo leemthompo self-assigned this Nov 7, 2025
@leemthompo leemthompo added the wip label Nov 7, 2025
@leemthompo leemthompo requested review from a team and ppf2 and removed request for a team November 7, 2025 16:44
- Document space-aware URL format for MCP server and APIs
- Add known issue: copy button doesn't include space name in URL
Comment on lines 70 to 76
### MCP server URL copy button does not include space name

When using the **Copy your MCP server URL** button in the Tools UI from a custom {{kib}} Space, the copied URL does not include the space name in the path.

**Workaround:** Manually add `/s/<space-name>` to the URL after your deployment URL. For example: `https://<deployment>/s/<space-name>/api/agent_builder/mcp`

For more information about {{agent-builder}} and Spaces, refer to [Permissions and access control](permissions.md#spaces).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was fixed in elastic/kibana#240955, afaik? Is the current version of the documentation meant to be for 9.2.0?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep we'll remove this once 9.3 lands

I'll add version tag to make it clear

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines 211 to 214
:::{important}
If you're using a custom {{kib}} Space, the copied URL will not include the space name. You must manually add `/s/<space-name>` to the URL path. For example: `https://<deployment>/s/<space-name>/api/agent_builder/mcp`
:::

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(related to last comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines 22 to 29
### {{kib}} privileges

Agent Builder uses two {{kib}} privileges within the `agentBuilder` feature:

- `read_onechat`: Required to use agents, send chat messages, view tools, and access conversations. Maps to the "Read" feature privilege.
- `manage_onechat`: Required to create, update, or delete custom agents and tools. Maps to the "All" feature privilege along with `read_onechat`.

Learn more about [{{kib}} privileges](/deploy-manage/users-roles/cluster-or-deployment-auth/kibana-privileges.md).
Copy link

@pgayvallet pgayvallet Nov 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we usually describe the API privileges granted by a Kibana feature? It feels more like an implementation detail (or I always assumed it was).

I would have presented it that way, personally:

Agent Builder access control is managed via the `agentBuilder` {{kib}} feature:

- "Read" access to the `agentBuilder` feature: Required to use agents, send chat messages, view tools, and access conversations. 
- "All" access to the `agentBuilder`: Required to create, update, or delete custom agents and tools. 

(but I'm not a doc writer 😄)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't sure really how much detail we needed here, @ppf2 can chime in here and can tweak accordingly

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines 33 to 35
Agent Builder requires cluster-level privileges for AI-powered query generation:

- `monitor_inference`: Required for agents to use AI-powered tools. The built-in tools `search` and `generate_esql`, as well as [index search tools](tools/index-search-tools.md), call the {{es}} Inference API to generate queries from natural language.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So technically this is only true when using an IA connector (or the Elastic default LLM which is one), not when using other Kibana GenAI connectors. But I'm not sure we want to mention that.

Another point, technically to use any connector, the user gonna need at least read level permission on the Actions and Connectors Kibana feature. This part may be worth mentioning.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So technically this is only true when using an IA connector (or the Elastic default LLM which is one), not when using other Kibana GenAI connectors. But I'm not sure we want to mention that.

We should mention it. Thx!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tools execute queries against {{es}} indices as the current user. Required privileges depend on which indices the tools access:

- `read`: Required for tools that query data, including `execute_esql`, `search`, `get_document_by_id`, and [{{esql}} tools](tools/esql-tools.md)
- `view_index_metadata`: Required for tools that inspect index structure, including `list_indices`, `get_index_mapping`, and `index_explorer`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure we need an exhaustive list, but for information - view_index_metadata is also required for search (and any index_search type user tools) because they may use index_explorer under the hood.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@leemthompo leemthompo removed the wip label Nov 13, 2025
@leemthompo leemthompo marked this pull request as ready for review November 13, 2025 16:04
@leemthompo leemthompo requested review from a team as code owners November 13, 2025 16:04
@leemthompo
Copy link
Contributor Author

@pgayvallet this has seen a round of iteration, LMKWYT at this point

Copy link

@pgayvallet pgayvallet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

# Permissions and access control in {{agent-builder}}

Use this page to learn how to configure security roles and API keys for Agent Builder. Understanding these privileges helps you control who can use agents, which tools they can access, and what data they can query.

Copy link
Contributor

@florent-leborgne florent-leborgne Nov 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WDYT about adding an H2 here as parent to the 3 privileges sections? (they're all H3 currently while there's no H2), and another before the Granting access ones, to split he page into a "reference" part and a "how-to" part?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense! 😄

Copy link
Contributor

@szabosteve szabosteve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some smaller comments.

Copy link
Contributor

@florent-leborgne florent-leborgne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@szabosteve szabosteve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@leemthompo leemthompo enabled auto-merge (squash) November 18, 2025 13:52
@leemthompo leemthompo merged commit f9178e9 into main Nov 18, 2025
7 checks passed
@leemthompo leemthompo deleted the leemthompo-AB-privileges branch November 18, 2025 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants