invarium_prepare_blueprint
Validate and preview an agent blueprint locally before uploading to Invarium. Runs schema validation, confidence scoring, and a full Agent Readiness Audit — nothing is sent to the backend.
When to Use
Call invarium_prepare_blueprint as the first step when registering or updating an agent. It validates the blueprint YAML, computes a confidence level, and runs a local Agent Readiness Audit (ARS) that scores the blueprint on security, reliability, system design, and tool quality.
Use this to iterate on your blueprint before committing to an upload. Fix findings, re-run invarium_prepare_blueprint to see the updated score, and only call invarium_upload_blueprint once you are satisfied.
See Create and Upload a Blueprint for the end-to-end workflow.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
blueprint | string | Yes | — | YAML string of the agent blueprint. Must include agent_name (or pass it separately), at least one tool, and valid schema fields. |
agent_name | string | No | null | Agent name override. If omitted, the name is extracted from the agent_name or name field in the blueprint YAML. |
invarium_prepare_blueprintValidate and preview an agent blueprint BEFORE uploading to Invarium. Runs schema validation, confidence scoring, and a full static audit locally -- nothing is sent to the Invarium backend. Use this to review the blueprint with the user before calling invarium_upload_blueprint.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
blueprint | string | required | YAML string of the agent blueprint. |
agent_name | string | null | default: null | Optional agent name override. Falls back to blueprint field. |
Returns
Validation result with blueprint preview, confidence level, Agent Readiness Score, per-category breakdown, and actionable findings.
Example
"Validate the blueprint for my customer-support-agent before uploading"Response
On success, the tool returns a formatted text block with five sections:
Blueprint saved to: .invarium/customer_support_agent_blueprint.yaml
Blueprint preview for "customer-support-agent"
Agent: customer-support-agent
Description: Handles customer inquiries via chat
Framework: langchain
Tools (3): search_tickets, create_ticket, escalate_to_human
Workflow chains: 2
Confidence: high
Agent Readiness Score: 82/100 (Green)
Category breakdown with per-category scores and recoverable points.
Fix these to reach 100:
SECURITY
Tool 'search_tickets' missing error_handling
No rate limiting defined
RELIABILITY
No fallback tools defined
Review the blueprint file and the score above. To improve your
score, fix the findings above and re-run prepare_blueprint.
When ready, confirm and I'll upload to Invarium.Blueprint Preview
| Field | Description |
|---|---|
| Agent | The resolved agent name. |
| Description | Agent description from the blueprint. |
| Framework | The framework the agent uses (e.g., langchain, crewai, custom). |
| Tools | Number of tools and their names. |
| Workflow chains | Number of workflow chains defined. |
| Confidence | How well the blueprint describes the agent: high, medium, or low. |
| Graph | Node and edge counts, if a graph is included in the blueprint. |
Agent Readiness Score (ARS)
The ARS is a 0—100 score computed from four weighted categories:
Scores across four categories: Security, Reliability, System Design, and Tool Quality — weighted by production risk.
| Category | What It Measures |
|---|---|
| Security | Guardrails, PII handling, input validation, authorization checks. |
| Reliability | Error handling, fallbacks, retry policies, timeout configuration. |
| System Design | Workflow completeness, constraint coverage, system prompt quality. |
| Tool Quality | Parameter definitions, descriptions, return types, side effect declarations. |
Each finding deducts points from its category. The “Fix these to reach 100” section shows which findings to address.
See Agent Readiness Audit for a full explanation of scoring and categories.
Saved Blueprint File
The tool saves the blueprint to .invarium/<agent_name>_blueprint.yaml in your project directory. You can review this file before proceeding to upload.
Examples
Basic Usage
Validate a blueprint and review the audit results:
"Validate this blueprint for my customer-support-agent before uploading"With Agent Name Override
Pass the agent name separately instead of including it in the blueprint YAML:
"Prepare the blueprint and use 'travel-booking-agent' as the agent name"Iterative Improvement
After reviewing findings, fix the blueprint and re-run to see the updated score:
// First run: ARS = 62/100
"Validate the blueprint for my agent"
// Fix findings: add error_handling, guardrails, descriptions
// Second run: ARS = 91/100
"Re-validate the improved blueprint"
// Satisfied -- proceed to upload
"Upload the blueprint to Invarium"Error Responses
| Error | Cause | Fix |
|---|---|---|
Blueprint is not valid YAML: ... | The blueprint string is not parseable YAML. | Check for syntax errors. Regenerate the blueprint if needed. |
Missing agent_name. Provide it as a parameter or include it in the blueprint. | No agent name found in the blueprint YAML or the agent_name parameter. | Add agent_name to the blueprint YAML or pass it as the agent_name parameter. |
Blueprint validation failed: ... | One or more schema validation errors. | Fix the listed validation errors and try again. See Blueprint Schema. |
See Error Codes for the full error reference.