Skip to content

feat: inject $schema URL into generated agentcore.json#692

Merged
jesseturner21 merged 5 commits intoaws:mainfrom
Hweinstock:feat/schema-injection
Mar 27, 2026
Merged

feat: inject $schema URL into generated agentcore.json#692
jesseturner21 merged 5 commits intoaws:mainfrom
Hweinstock:feat/schema-injection

Conversation

@Hweinstock
Copy link
Copy Markdown
Contributor

@Hweinstock Hweinstock commented Mar 26, 2026

Description

Follow-up to #661 (JSON Schema generation). Injects a $schema URL into agentcore.json so IDEs automatically pick up validation and autocomplete.

Three changes:

  1. Added $schema to AgentCoreProjectSpecSchema, so it now accepts the field on read, and it's optional for backwards compatibility with existing projects
  2. Added SCHEMA_URL constant in config-io.ts pointing to the custom domain of the schema.
  3. writeProjectSpec injects $schema via spread before calling validateAndWrite.
  4. update the schema with the latest changes.

Also, refactor to avoid duplicating createDefaultProjectSpec in three places.

Notes:

  • we DO NOT inject the schema into existing projects.
  • small behavior change where remove all on a project maintains our tags. I think this is an improvement in the case that a user starts from fresh and we still want the tags, but wanted to callout.

Remaining Work

  • bake into release process automatically.

Related Issue

Closes #

Documentation PR

N/A

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Other (please describe):

Testing

How have you tested the change?

  • I ran npm run typecheck
  • I ran npm run lint

End-to-end tested:

  1. New project creation injects $schema into agentcore.json
  2. Existing projects without $schema still read and deploy correctly
  3. Deploy with $schema present — agent + resource created, invoked successfully
  4. Deploy without $schema — identical behavior
  5. Adding resources via CLI preserves $schema through read-modify-write
  6. Manually editing agentcore.json with $schema present deploys without issues

Verified url is live and point to schema on main: https://schema.agentcore.aws.dev/v1/agentcore.json

final-demo.mov

Checklist

  • I have read the CONTRIBUTING document
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.

@github-actions github-actions bot added size/m PR size: M and removed size/m PR size: M labels Mar 26, 2026
@github-actions github-actions bot removed the size/m PR size: M label Mar 27, 2026
@github-actions github-actions bot added the size/m PR size: M label Mar 27, 2026
@Hweinstock Hweinstock force-pushed the feat/schema-injection branch from 2fd73d7 to e263033 Compare March 27, 2026 13:48
@github-actions github-actions bot added size/m PR size: M and removed size/m PR size: M labels Mar 27, 2026
@Hweinstock Hweinstock force-pushed the feat/schema-injection branch from e263033 to cc37e92 Compare March 27, 2026 13:54
@github-actions github-actions bot added size/m PR size: M and removed size/m PR size: M labels Mar 27, 2026
@Hweinstock Hweinstock force-pushed the feat/schema-injection branch from cc37e92 to 141bd6f Compare March 27, 2026 14:07
@github-actions github-actions bot added size/m PR size: M and removed size/m PR size: M labels Mar 27, 2026
@Hweinstock Hweinstock force-pushed the feat/schema-injection branch from 141bd6f to b3cdf69 Compare March 27, 2026 14:09
@github-actions github-actions bot added size/m PR size: M and removed size/m PR size: M labels Mar 27, 2026
@Hweinstock Hweinstock force-pushed the feat/schema-injection branch from b3cdf69 to 84b7f2e Compare March 27, 2026 14:13
@github-actions github-actions bot added size/m PR size: M and removed size/m PR size: M labels Mar 27, 2026
@Hweinstock Hweinstock marked this pull request as ready for review March 27, 2026 14:33
@Hweinstock Hweinstock requested a review from a team March 27, 2026 14:33
aidandaly24
aidandaly24 previously approved these changes Mar 27, 2026
@Hweinstock Hweinstock force-pushed the feat/schema-injection branch from 6fc3dd9 to f4b0c8a Compare March 27, 2026 16:55
@github-actions github-actions bot added size/m PR size: M and removed size/m PR size: M labels Mar 27, 2026
@jesseturner21 jesseturner21 merged commit 915125d into aws:main Mar 27, 2026
17 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants