alibaba/nacos · error · IllegalArgumentException
Agent draft agentName does not match request
Error message
Agent draft agentName does not match request
What it means
Error "Agent draft agentName does not match request" thrown in alibaba/nacos.
Source
Thrown at ai/src/main/java/com/alibaba/nacos/ai/service/agent/AgentPersistenceService.java:782
}
}
throw conflict("Agent lifecycle metadata changed concurrently: " + agentName, null);
}
private void validateSubsequentDraftInputs(String namespaceId, String agentName,
AgentVersionDetail draft, String basedOnVersion) {
AgentValidationUtils.validateNamespaceId(namespaceId);
AgentValidationUtils.validateAgentName(agentName);
if (draft == null) {
throw new IllegalArgumentException("Agent draft must not be null");
}
AgentValidationUtils.validateVersion(draft.getVersion());
if (draft.getNamespaceId() != null
&& !namespaceId.equals(draft.getNamespaceId())) {
throw new IllegalArgumentException("Agent draft namespaceId does not match request");
}
if (draft.getAgentName() != null && !agentName.equals(draft.getAgentName())) {
throw new IllegalArgumentException("Agent draft agentName does not match request");
}
if (draft.getStatus() != null
&& !AiConstants.Agent.VERSION_STATUS_DRAFT.equals(draft.getStatus())) {
throw new IllegalArgumentException("Agent draft status must be draft");
}
if (draft.getContentDigest() != null || draft.getCreateTime() != null
|| draft.getUpdateTime() != null) {
throw new IllegalArgumentException(
"Agent draft must not contain read-only projection fields");
}
boolean directContent = draft.getCallInterfaces() != null;
boolean copiedContent = StringUtils.isNotBlank(basedOnVersion);
if (directContent == copiedContent) {
throw new IllegalArgumentException(
"Agent draft must contain either callInterfaces or basedOnVersion");
}
if (copiedContent) {
AgentValidationUtils.validateVersion(basedOnVersion);View on GitHub (pinned to 9b989acdf1)
Solutions
- Review the input and runtime state for agent draft agentName, correct the reported problem, and retry.
When it happens
Trigger: Thrown at ai/src/main/java/com/alibaba/nacos/ai/service/agent/AgentPersistenceService.java:782 when the library encounters an invalid state.
Common situations: Submitting a draft whose agentName differs from the request agent name.
AI-assisted analysis of alibaba/nacos@9b989acdf1 (2026-08-14).
Data as JSON: /api/errors/7210b7273e2af4d3.
Report an issue: GitHub.