---
title: "Remove an agent from a group (idempotent)"
method: DELETE
path: "/agents/{agent_id}/groups/{group_id}"
tags: ["Agent Groups"]
---

# Remove an agent from a group (idempotent)

`DELETE /agents/{agent_id}/groups/{group_id}`

## Request

- Base URL: `https://api.mnemom.ai/v1`
- URL: `https://api.mnemom.ai/v1/agents/{agent_id}/groups/{group_id}`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-Mnemom-Api-Key`

Agent-centric membership route. Removes the agent from the group. Idempotent — if the agent is not a member the call still succeeds (the desired end state is already met). The agent's other group memberships are unaffected. Authorization: the `group_id` is resolved to its owning organization and the caller must be an owner/admin of that org (a group in another org is invisible → 404), and the delete is keyed on both `group_id` and `agent_id`, so neither a foreign group nor a foreign agent can be touched and no other tenant's data is affected.

## Path parameters

- `agent_id` string, required
- `group_id` string, uuid, required

## Response `200`

Membership removed (or was already absent)

- object
  - `removed` boolean
  - `group_id` string
  - `agent_id` string

## Other responses

- `401`: Authentication required
- `403`: Forbidden
- `404`: Resource not found
- `429`: Rate-limit exceeded. The global per-IP limiter (100 requests/minute, applied to every `/v1/*` route) rejected this request. Back off until the window resets — `Retry-After` carries the cooldown in seconds and `X-RateLimit-Reset` the absolute reset time.
- `500`: Server error — request was well-formed but the server failed to fulfill it. Typically a downstream dependency (DB / RPC / external API) returned an unexpected error.
- `503`: An upstream dependency is currently unavailable. The request was not processed; retry after the cooldown window.

---

[API](https://skmtc.dev/mnemom/apis/mnemom-api.md) · [All operations](https://skmtc.dev/mnemom/apis/mnemom-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mnemom/apis/mnemom-api/revisions/274b7a6ea182?raw)
