Skip to main content

Agent Management Overview

Full lifecycle management APIs for RAG Agent instances

A RAG Agent serves as the runtime entity for knowledge retrieval (knowledge/search) and knowledge-based Q&A (knowledge/chat). The Agent Management APIs enable programmatic creation, configuration, deployment, querying, and deletion of Agents—eliminating the need to manually perform these operations in the console.

Relationship with Runtime APIs

First use the Management APIs to create and deploy an Agent, then obtain its agent_id and use it with Runtime APIs to initiate retrieval or Q&A requests.

Lifecycle

The agent_config can only be modified in the beta draft version. For already-deployed versions, only the agent_version_desc field may be updated. To modify configuration, first use the update API to revise the draft, then use the deploy API to publish a new version. Deletion is soft deletion and idempotent: repeated deletion calls will not raise errors.

API List

All endpoints use POST with JSON request bodies and share the base path /api/v1/indices/rag/app/.
OperationEndpointDescription
Create AgentPOST /app/createCreates a new Agent in initial draft state
Update AgentPOST /app/updateUpdates name, description, or draft configuration
Deploy AgentPOST /app/deployDeploys the beta draft as a new version
Delete AgentPOST /app/deletePerforms soft deletion; idempotent
List AgentsPOST /app/listPaginated list of Agents under the current tenant
Get Agent DetailsPOST /app/getRetrieves full Agent information, optionally specifying a version
Copy AgentPOST /app/copyCopies an existing Agent to generate a new draft

Scenarios

Agents support two scenarios (agent_scene):
ScenarioValuePurposeCorresponding Runtime API
Knowledge Q&AchatConfigure Q&A model, citation behavior, refusal logic, etc.knowledge/chat
Knowledge RetrievalsearchConfigure multi-knowledge-base routing, hybrid ranking, retrieval parameters, etc.knowledge/search
The agent_config structure differs between the two scenarios; refer to individual API documentation for details.
Externally, use chat (internally mapped to general); search remains consistent both internally and externally.

Permission Requirements

Write operations (create, update, deploy, delete, copy) require corresponding knowledge base permissions, determined by roles configured in Business Space Member Management:
OperationRequired Permission
createKnowledge Base – Create
updateKnowledge Base – Modify
deployKnowledge Base – Modify
deleteKnowledge Base – Delete
copyKnowledge Base – Create
Holding the Knowledge Base – FullAccess permission grants authority to perform all the above operations. A 403 response indicates insufficient permissions; contact your Business Space administrator to adjust your role. Read operations (list, get) require only an API Key.