Skip to content

docs: fix agent.json examples to match current schema#6878

Merged
Hundao merged 1 commit into
aden-hive:mainfrom
Hundao:docs/fix-agent-json-examples
Mar 31, 2026
Merged

docs: fix agent.json examples to match current schema#6878
Hundao merged 1 commit into
aden-hive:mainfrom
Hundao:docs/fix-agent-json-examples

Conversation

@Hundao

@Hundao Hundao commented Mar 31, 2026

Copy link
Copy Markdown
Collaborator

Description

Fix outdated agent.json examples in the developer guide that use node_id/edge_id and a flat structure. Updated to match the current load_agent_export() schema with proper graph wrapper, id fields, and goal section.

Based on the approach from PR #6452 by @Jose37456.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)

Related Issues

Fixes #897

Changes Made

  • Replaced node_id / edge_id with id in all agent.json examples
  • Wrapped nodes and edges under graph key
  • Added goal section with success_criteria
  • Added agent metadata section
  • Verified the example JSON loads correctly via load_agent_export()

Testing

  • Verified example JSON loads correctly with load_agent_export()
  • Compared against real agent.json files in examples/templates/

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • My changes generate no new warnings

Summary by CodeRabbit

  • Documentation
    • Updated developer guide examples to reflect the new agent configuration schema with an improved nested structure. Agent metadata, graph definitions, nodes, and edges are now organized more clearly. The success criteria format evolved from a single string to a structured array of criteria objects.

Replace outdated node_id/edge_id with id, wrap nodes/edges under
graph key, add goal section with success_criteria. Matches what
load_agent_export() and NodeSpec actually expect.

Fixes aden-hive#897

Co-authored-by: Jose37456 <Jose37456@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Mar 31, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 88023bef-59d7-47ec-8453-1cab1811e5ce

📥 Commits

Reviewing files that changed from the base of the PR and between 6ee510d and 6185166.

📒 Files selected for processing (1)
  • docs/developer-guide.md

📝 Walkthrough

Walkthrough

Updated the manual agent.json example in the developer guide from a legacy flat structure to a nested graph-centric schema that matches the current loader expectations. Changes include restructuring with top-level agent and graph objects, renaming node_id to id, and converting success_criteria from a string to an array of structured objects.

Changes

Cohort / File(s) Summary
Documentation Schema Update
docs/developer-guide.md
Updated exports/my_agent/agent.json example schema from legacy flat structure to current nested graph-centric format. Added agent.id/name/version/description fields, restructured goal.success_criteria as array of objects, and moved tool references to graph.nodes[].tools.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A schema so flat, now stands tall and proud,
Nested graphs dancing through developer clouds,
Node IDs transformed, success criteria true,
The docs now align with the loader's new view!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: updating agent.json examples to match the current schema. It directly relates to the primary objective of the PR.
Linked Issues check ✅ Passed The PR addresses all objectives from issue #897 [#897]: aligns the documentation example with the current load_agent_export() schema, replaces deprecated fields (node_id, string success_criteria) with current fields (id, nested structure), and ensures nodes load correctly.
Out of Scope Changes check ✅ Passed All changes are scoped to updating documentation (docs/developer-guide.md) to align examples with the current schema, with no unrelated modifications to code or other aspects.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@Hundao
Hundao merged commit d5ba985 into aden-hive:main Mar 31, 2026
9 checks passed
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.

Manual agent.json example in DEVELOPER.md does not match current loader schema

1 participant