Skip to content

docs: explain Agent Description extended fields - #89

Open
PreciousNwakama wants to merge 2 commits into
agent-network-protocol:mainfrom
PreciousNwakama:docs/issue-16-extended-fields-guide
Open

docs: explain Agent Description extended fields#89
PreciousNwakama wants to merge 2 commits into
agent-network-protocol:mainfrom
PreciousNwakama:docs/issue-16-extended-fields-guide

Conversation

@PreciousNwakama

@PreciousNwakama PreciousNwakama commented Jul 29, 2026

Copy link
Copy Markdown

🔗 Related Issue | 相关 Issue

Closes #16


📝 PR Type | PR 类型

  • Feature | 新功能
  • Bugfix | 问题修复
  • Documentation | 文档修改
  • Style | 代码格式(不影响功能)
  • Refactor | 重构
  • Test | 测试相关
  • Chore | 其他

📋 Description | 描述

Adds a non-normative guide for extended fields used by Agent Description and Product documents.

This PR also aligns the existing hotel and coffee-shop examples with the standard JSON format defined by ANP-07 v1.1.

Changes include:

  • documenting the standard ANP-07 Agent Description fields;
  • documenting optional domainEntity, customizationOptions, and hotel-room fields;
  • migrating the hotel and coffee-shop examples from legacy JSON-LD to standard JSON;
  • replacing JSON-LD keywords and ad:-prefixed fields;
  • using NaturalLanguageInterface and StructuredInterface consistently;
  • updating the hotel search interface to return standard ANP Product documents;
  • removing the obsolete empty JSON-LD section heading from ANP-07.

Validation performed:

  • Parsed all six updated JSON documents.
  • Parsed all JSON snippets in the guide.
  • Confirmed that documentation links resolve.
  • Confirmed that no JSON-LD constructs remain under examples/adp.
  • Validated the updated OpenAPI document with Redocly.
  • Ran git diff --check successfully.

⚠️ Breaking Changes | 破坏性变更

  • Yes
  • No

✅ Checklist | 检查项

  • The code compiles correctly | 代码可以正确编译
  • All tests passed | 所有测试均通过
  • Relevant documentation updated | 已更新相关文档
  • PR has been linked to the related issue | 已关联相关 Issue

Compilation and automated tests are not applicable because this is a documentation and example-data update.

@chgaowei

Copy link
Copy Markdown
Collaborator

Thank you for contributing this documentation. After reviewing the current ANP-07 v1.1 specification, we found that the normative Agent Description format now uses standard JSON rather than JSON-LD constructs such as @context, @type, @id, and ad:-prefixed fields.

The hotel and coffee-shop examples in the repository still use the legacy JSON-LD format. As a result, this guide currently documents historical examples rather than the data model defined by the current specification. Linking it from the main specification could incorrectly suggest that JSON-LD remains the normative Agent Description format.

We recommend updating this PR as follows:

Use the standard JSON fields defined by the current ANP-07 specification;
Remove the guide’s dependency on JSON-LD vocabularies, @context, and ad: prefixes;
Update the legacy hotel and coffee-shop examples to the current standard JSON format;
Document the extended fields based on the updated data model.

The overall document structure is reasonable, but the guide, examples, and current specification should first be aligned before this PR is merged.

@PreciousNwakama

Copy link
Copy Markdown
Author

Thank you for contributing this documentation. After reviewing the current ANP-07 v1.1 specification, we found that the normative Agent Description format now uses standard JSON rather than JSON-LD constructs such as @context, @type, @id, and ad:-prefixed fields.

The hotel and coffee-shop examples in the repository still use the legacy JSON-LD format. As a result, this guide currently documents historical examples rather than the data model defined by the current specification. Linking it from the main specification could incorrectly suggest that JSON-LD remains the normative Agent Description format.

We recommend updating this PR as follows:

Use the standard JSON fields defined by the current ANP-07 specification; Remove the guide’s dependency on JSON-LD vocabularies, @context, and ad: prefixes; Update the legacy hotel and coffee-shop examples to the current standard JSON format; Document the extended fields based on the updated data model.

The overall document structure is reasonable, but the guide, examples, and current specification should first be aligned before this PR is merged.

Thank you for the review and clarification. I have updated the PR to align the guide and examples with the standard JSON format defined by ANP-07 v1.1.
The update:

  • removes JSON-LD constructs and ad: prefixes from the guide and ADP examples;
  • migrates the hotel and coffee-shop Agent Description and Product documents to the current ANP-07 fields;
  • uses NaturalLanguageInterface and StructuredInterface consistently;
  • updates the hotel search interface schema to return standard ANP Product documents;
  • documents optional domain fields using the updated plain-JSON model; and
  • removes the obsolete empty JSON-LD section heading from ANP-07.

I also validated all JSON documents and guide snippets, checked the documentation links, and linted the updated OpenAPI document successfully.
Please let me know if any additional adjustments are needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Perfection of the Agent Description Protocol: Improve the definition of extended fields

2 participants