> For the complete documentation index, see [llms.txt](https://docs.nexos.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nexos.ai/gateway-api/agent-management.md).

# Agent Management

Manage agents.

## List agents for a specific user

> Retrieve list of agents for a specific user.

```json
{"openapi":"3.0.0","info":{"title":"Nexos AI Public API Production","version":"1.0.0"},"tags":[{"name":"Agent Management","description":"Manage agents."}],"servers":[{"url":"https://api.nexos.ai"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Authenticate by sending your nexos API key in the `X-Api-Key` header (e.g. `X-Api-Key: user-...` for a user key or `X-Api-Key: team-...` for a team key). This is an alternative to the `Authorization: Bearer` scheme. If both `X-Nexos-Key` and `X-Api-Key` are sent, `X-Nexos-Key` takes precedence."}},"schemas":{"AgentSortByField":{"type":"string","enum":["name","created_at"]},"AgentSortOrder":{"type":"string","enum":["asc","desc"],"description":"Sort order, must be used together with sort_by.field."},"Agent":{"description":"Represents an AI agent.","type":"object","properties":{"id":{"type":"string","description":"Unique identifier."},"name":{"type":"string","description":"Agent name."},"description":{"type":"string","description":"Agent description.","nullable":true},"instructions":{"type":"string","description":"Agent instructions."},"model":{"type":"string","description":"Model name."},"created_at":{"type":"string","format":"date-time","description":"The time the agent was created."}},"required":["id","created_at","name","model"]}},"responses":{"AgentListResponse":{"description":"A list of agents.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/Agent"}},"total":{"type":"integer","format":"int64"}}}}}}}},"paths":{"/v1/agents":{"get":{"operationId":"get-agents-v1","summary":"List agents for a specific user","tags":["Agent Management"],"description":"Retrieve list of agents for a specific user.","parameters":[{"name":"limit","in":"query","required":false,"description":"The number of items to return.","schema":{"type":"integer","format":"int64","default":100,"minimum":1,"maximum":200}},{"name":"offset","in":"query","required":false,"description":"The number of items to skip.","schema":{"type":"integer","format":"int64"}},{"name":"sort_by.field","in":"query","schema":{"$ref":"#/components/schemas/AgentSortByField"},"description":"Field to sort by, must be used together with sort_by.order."},{"name":"sort_by.order","in":"query","required":false,"schema":{"$ref":"#/components/schemas/AgentSortOrder"},"description":"Sort order, must be used together with sort_by.field."},{"name":"include_shared","in":"query","required":false,"description":"Whether to include agents shared with the user.","schema":{"type":"boolean","default":false}}],"responses":{"200":{"$ref":"#/components/responses/AgentListResponse"},"404":{"description":"Agent not found."}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.nexos.ai/gateway-api/agent-management.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
