OKF validator
Check an OKF knowledge pack before handing it to an agent. Use generic validation for external bundles or the stricter SEO export profile for files generated here.
Install and validate the files
Install the CLI once, then run seo start to connect your site and Google data. After setup you can run this validator yourself or ask your agent to run it.
Install the SEO CLI globally.
npm i -g seoRun setup after installation.
seo startCheck an OKF knowledge pack before an agent uses it.
seo okf validate ./okfWhat the validator checks
Validate an Open Knowledge Format pack for paths, sources, trust signals, lifecycle, freshness, and Markdown references before an agent uses it.
- Best for
- Files were generated or edited and need validation.
- Needs
- OKF Markdown files
- You get
- Validate an Open Knowledge Format pack for paths, sources, trust signals, lifecycle, freshness, and Markdown references before an agent uses it.
- Use next
- Build site knowledge for agents
Every report follows the same rules for missing data and outside estimates.See how report data works.
What you need before you run it
The report uses the information below. Optional sources are only used when you ask for them.
OKF Markdown files
Supplies the limited paths and file contents that need structural validation.
Use a different report for these jobs
These jobs need a different report or a manual review.
Use the validator with an agent or in code
The command above is enough for most work. These options let an agent, script or application run the same validator with explicit input and structured output.
CLI
Use the report catalog when an agent, script or CI job needs predictable JSON instead of the normal terminal output. Check the current input first, then run the validator with the validated parameters.
Check the current input before the agent or script runs the validator.
seo reports describe okf-validate --jsonOnce the input is valid, run the validator through the report catalog.
seo reports run okf-validate --params '{"profile":"okf","files":[{"path":"index.md","content":"# Example knowledge"},{"path":"caveats.md","content":"# Caveats"}]}' --jsonMCP
An MCP agent follows the same two-step flow. It inspects the current schema, fills the required fields and only then runs the validator.
Ask the MCP server for the current validator input.
{
"id": "okf-validate"
}Run the validator after the agent has checked and filled the input.
{
"id": "okf-validate",
"params": {
"profile": "okf",
"files": [
{
"path": "index.md",
"content": "# Example knowledge"
},
{
"path": "caveats.md",
"content": "# Caveats"
}
]
}
}TypeScript
Install the package in a Node 22 project when your application needs to run the validator directly. The result includes the same evidence, warnings and limits returned through the CLI and MCP server.
Add the SEO package to your project.
npm install seoRun the validator from your TypeScript application.
import { executeReport } from 'seo/mcp'
const result = await executeReport(
'okf-validate',
{
"profile": "okf",
"files": [
{
"path": "index.md",
"content": "# Example knowledge"
},
{
"path": "caveats.md",
"content": "# Caveats"
}
]
},
)
console.log(result)What to do next
Fix broken paths, missing files and invalid manifest references before using the pack. Rebuild from the source evidence when the errors show that the export itself is incomplete.
- 01Correct invalid files and rerun validation.
- 02Rebuild from a current crawl when source details is unclear.