# RBAC for AI agents and space restrictions for agents

**URL:** <https://discuss.elastic.co/t/rbac-for-ai-agents-and-space-restrictions-for-agents/389431>\
**Category:** Elastic Search\
**Tags:** elastic-agent-builder\
**Created:** [August 11, 2026, 12:18pm UTC](https://discuss.elastic.co/t/rbac-for-ai-agents-and-space-restrictions-for-agents/389431 "2026-08-11T12:18:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![venkatkumar229](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/venkatkumar229/32/104663_2.png) [@venkatkumar229](https://discuss.elastic.co/u/venkatkumar229)\
**Post date:** [August 11, 2026, 12:18pm UTC](https://discuss.elastic.co/t/rbac-for-ai-agents-and-space-restrictions-for-agents/389431/1 "2026-08-11T12:18:02Z")

</div>

Hi Team,

We have two questions related to AI Agents and would appreciate your guidance.

### 1. Restricting users to access only specific agents

We have multiple AI Agents within a single Space in our Elastic environment, for example:

- APAC Agent

- EU Agent

- Global Agent

We would like to restrict agent access based on the user's role/geography. For example:

- **APAC users** → should have access only to the APAC Agent

- **EU users** → should have access only to the EU Agent

- **Global users** → should have access to all agents

For example, when an **APAC user logs in** , we would like only the APAC Agent to be displayed/available to the user, while the EU and Global Agents should not be displayed or accessible.

Is it possible to achieve this?

### 2. A2A Authentication and User Authorization

We are also evaluating the **Agent-to-Agent (A2A)** integration, where an external application/agent invokes an Elastic AI Agent.

In this scenario, we would like to understand whether the **user's Elasticsearch roles/permissions can be applied to the A2A request**.

For example, if an external agent invokes our Elastic AI Agent on behalf of a user, can Elastic validate the user's identity and Elasticsearch roles and ensure that the user can access **only the data they are authorized to access**?

In other words, we would like to ensure that the A2A integration does not bypass the existing Elasticsearch/Kibana authorization and that the user's permissions are enforced when the AI Agent accesses Elasticsearch data. We will be using elastic A2A server to expose the agents to other agents.

Could you please confirm whether these scenarios are supported and, if so, provide guidance on the recommended configuration/architecture?

Thanks in advance for your help.

---

<div class="post-metadata">

**Author:** ![bmorelli25](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bmorelli25/32/38738_2.png) [@bmorelli25](https://discuss.elastic.co/u/bmorelli25)\
**Post date:** [August 20, 2026, 10:54pm UTC](https://discuss.elastic.co/t/rbac-for-ai-agents-and-space-restrictions-for-agents/389431/2 "2026-08-20T22:54:21Z")

</div>

For **question 1** , I think this is doable.

As of 9.5, custom agents support [individual-user access controls](https://www.elastic.co/docs/explore-analyze/ai-features/agent-builder/custom-agents#per-agent-access-controls). You could use the [access\_control API endpoint](https://www.elastic.co/docs/api/doc/kibana/operation/operation-put-agent-builder-agents-id-access-control#operation-put-agent-builder-agents-id-access-control-body-application-json) to assign individual users (based on geo) to the appropriate agents. Right now the only supported type is `user`, so you would need to do this for each user. For example:

```http
PUT kbn:/api/agent_builder/agents/{apac-agent}/access_control
{
  "entries": [
    {
      "type": "user",
      "name": "apac-user-1",
      "role": "user"
    },
    {
      "type": "user",
      "name": "global-user-1",
      "role": "user"
    }
  ]
}

```

You could set up a sync service to ensure roles stay up-to-date.
