beacon validate command validates an AGENTS.md file against the expected schema and structure. Optionally, it can also check if declared endpoints are reachable.
Usage
Arguments
The path to the AGENTS.md file to validate.Examples:
./AGENTS.mddocs/AGENTS.md/path/to/AGENTS.md
Options
When enabled, Beacon will attempt to reach all declared endpoints in the AGENTS.md file to verify they’re accessible.Note: This makes actual HTTP requests to the endpoints, so use with caution on production systems.Example:
Optional AI provider for enhanced validation. Currently only
beacon-ai-cloud is supported for this option.Example:Validation Rules
Beacon checks for the following schema requirements:Errors (Must Fix)
- Missing top-level heading - File must have a
# AGENTS.mdor similar#heading - Missing Capabilities section - File must contain a
## Capabilitiessection
Warnings (Recommended)
- No description blockquote - Recommended to have a
> descriptionat the top - Empty capabilities - The Capabilities section should declare at least one capability
- Endpoint missing HTTP method - Endpoints should specify a valid HTTP method (GET, POST, PUT, DELETE, PATCH)
- Missing generator footer - Should include a “Generated by” footer
Examples
Basic validation
Validate with endpoint checks
Validate with unreachable endpoint
Use Beacon Cloud validation
Endpoint Checking Details
When--check-endpoints is enabled:
- Base URL extraction - Beacon looks for a base URL in the AGENTS.md file (typically in the Endpoints section)
- Endpoint parsing - Extracts all endpoint declarations in the format
### \METHOD /path“ - HTTP requests - Makes actual HTTP requests with a 5-second timeout
- Status evaluation - Considers endpoints reachable if response status < 500
- GET
- POST
- PUT
- DELETE
- PATCH
Exit Codes
0- Validation successful (file is valid)1- Validation failed or file not found
Source Code Reference
The validate command implementation can be found in:- Command definition:
/home/daytona/workspace/source/src/main.rs:63-69 - Execution logic:
/home/daytona/workspace/source/src/main.rs:396-446 - Validator:
/home/daytona/workspace/source/src/validator.rs:104-173 - Endpoint checking:
/home/daytona/workspace/source/src/validator.rs:175-247