1. Install automatically and save the Space connection
- Switch to the target Space and open Integrations → Plugins → Sandbox → OpenShell → Install OpenShell.
- Read the target host and permission requirements, then choose Copy install command.
- Use the matching CLI that supports
aiv plugin setup openshell. Run the complete copied command in a terminal on the AI Vision deployment host. Copying does not run it; do not use another host or Docker daemon. - Follow the reported phases and wait for Space connection saved. Setup prepares the images, dedicated gateway, secure configuration and plugin, then saves and tests the connection through the server. No technical parameters need to be entered.
2. Set the Space default and execution policy explicitly
After the automatic-install drawer shows Space connection saved, choose Set as Space default if needed. The server tests the connection again and confirms the binding before showing Space default set. This action preserves the current “Require sandbox execution for custom rules” setting and the frozen targets of existing Tasks.Actual Linux AMD64 VM: confirmed default and compact footer · Read-only English view · Click to enlarge
Sandbox: provider configuration and Space execution policy · Running UI with demonstration data · Click to enlarge
3. Choose the custom rule’s execution environment
In a team space, open Diagnosers → New Diagnoser and choose the rule type. Under Execution environment, select one of the three execution-mode buttons:Custom rule execution: three modes, the resolved target and readiness · Running UI with API demonstration data · Click to enlarge
Confirm the enhanced Python environment
A compatible connection shows Enhanced Python · imports, files and code tests. Open Available libraries for the Python and package versions reported by this sandbox: pytest, NumPy, pandas, Pydantic, jsonschema and openpyxl, alongside the standard library. You do not enter images, install packages or select another runtime mode.- New rules: the editor automatically uses enhanced Python once it confirms a compatible sandbox, and saves that environment identity.
- Existing rules: keep their restricted Python behavior until you explicitly choose Use enhanced Python, review the draft and save it. Historical Task snapshots retain their original behavior.
- Local or incompatible targets: cannot run enhanced rules and never trigger local fallback. Choose a compatible sandbox before saving or trying the rule.
- Plugin update required: ask your operator for matching plugin and workload versions. Increasing timeout or memory alone does not add runtime support to an old plugin.
Actual Linux AMD64 VM: saved rule, enhanced Python and six libraries · Chinese interface · Click to enlarge
evaluate(trace) or evaluate(trace, context) and return each declared metric, its good / bad verdict, reason and JSON evidence. Enhanced rules support ordinary imports, helper functions and classes. Use context for materials and reference tests; confirm observed field expressions with View Trace Structure.
New automatic installations recommend 1 CPU, 1 GiB and 30 seconds. Existing connections are unchanged. With management permission and a compatible environment whose limits are too low, choose Apply recommended limits. This raises only insufficient values, preserves higher limits and checks readiness again. Read Effective execution budget in the summary, separately from Connection limit. The read-only runtime API reports the smaller of the enhanced service ceiling and the connection limit: a connection capped at 5 seconds still cannot run for 30 seconds.
Load 7 complete examples, from starter checks to advanced evaluation
Expand Load an example and choose from Starter examples or Advanced examples. Each includes matching metrics, complete evaluation code, reference materials, expected values and synthetic test input. Loading replaces these draft contents and clears previous Trial results, so start with a new rule. Inspect each metric’s reason and evidence, then deliberately change an input to confirm that the rule detects an error. Theexample.* fields are teaching conventions, not fields automatically collected from your Agent. Examples need neither network access nor package installation.
Reference materials are inputs to the evaluator. If they are malformed or internally inconsistent, fix them and rerun; an evaluator execution error is not an Agent-quality verdict.
JSON structure and citation fields
JSON structure and citation fields
schema.json requires a non-empty answer and at least one unique citation ID, and forbids extra fields. Change input citations to []: expect schema_valid: bad and a field path. A valid structure does not establish a correct answer.Metrics loaded: schema_valid.Combined CSV and Excel checks
Combined CSV and Excel checks
sales.csv and the value openpyxl reads from reference.xlsx:B2 against reported input; both references are 42. Change only example.total to 41: csv_total should become bad while xlsx_match remains good. Loading includes the binary workbook; no Base64 copying is needed.Metrics loaded: csv_total, xlsx_match.reference.xlsx: This binary file loads with the example. The source workbook contains B2 = 42; you do not construct it manually.Parameterized tests for generated code
Parameterized tests for generated code
normalize_tags through a temporary candidate module. Reference tests check case folding, deduplication, first-seen order, input preservation, empty values and invalid input. Replace .casefold() with .lower() in the candidate: the Unicode case should fail. The file uses pytest parameterization and exception assertions rather than checking only whether a process starts.Metrics loaded: reference_tests.Orders and refunds across tables
Orders and refunds across tables
orders.csv contains 3 orders and refunds.csv allows multiple refunds per order. Aggregate refunds before joining to avoid counting orders twice, then reconcile integer-cent amounts by region. Expected East is 2100, West is 2500 and net revenue is 4600 cents. Change only net_revenue_cents to see a passing regional metric and a failing net-revenue metric.Metrics loaded: regional_totals, net_revenue.Business constraints for refund decisions
Business constraints for refund decisions
refund_cents to 11000 for the 10000-cent order: expect business_valid: bad with constraint locations and reasons.Metrics loaded: business_valid.Retrieval ranking and citation coverage
Retrieval ranking and citation coverage
["doc-x", "doc-a", "doc-b"]: recall and citation coverage can still pass while ranking quality fails. This compares supplied relevance labels and citation IDs. It does not establish answer faithfulness or call an embedding or judge model.Metrics loaded: retrieval_recall, ranking_quality, citation_coverage.Pointwise tolerance and aggregate error
Pointwise tolerance and aggregate error
tolerance, error_budget.Adapt an example to an actual Trace
Use View Trace Structure to locate actual output or candidate source, then replace theexample.* read locations in the code. Do not assume that output belongs to the first Span. Replace reference materials, relevance labels or error thresholds and keep every returned metric aligned with its declaration. Select the actual Trace, rerun the Trial, inspect each reason and evidence, then save. Missing source, files or tool calls are not reconstructed.
Reference tests check ordinary correctness against your requirements; they do not promise protection against deliberately cheating candidates. A business model checks rule consistency, not actual business authorization. Relevance labels, citation IDs and numerical error checks are not semantic fact-checking.
Real sandbox results for the new examples
Real sandbox results for the new examples
Real sandbox captures from earlier starter examples
Real sandbox captures from earlier starter examples
Add your own tests and data materials
Expand Tests and data materials, choose small files or add a text file. Edit reference tests, JSON, CSV and relative paths; select XLSX files to retain their binary contents. You can also enter an optional Expected value (JSON) and read the parsed value throughcontext.expected.
Expected JSON format for API material submissions
Expected JSON format for API material submissions
materials.expected_json. For example:context.expected. Legacy API materials.expected objects remain accepted, but cannot appear together with expected_json. Editing and saving an old rule converts it to the new field.Check the complete execution-input budget
Before running, inspect the editor’s input usage and effective budget. Expand it for exact request and worker-input byte counts. Code, the complete Trace (including originalpayload and attributes), materials, expected JSON and serialization overhead share this budget. The separate 512 KiB material limit still applies.
New installations default to 8 MiB (8,388,608 bytes), with a 16 MiB operator hard ceiling. The actual budget also depends on the workload image’s qualified capacity. An old image without valid immutable input-capacity metadata retains the 2 MiB compatibility limit; editing a connection does not upgrade that image.
The platform checks both the complete request and normalized worker input before reserving a lease. It never silently truncates the Trace. Recheck after code, material, expected-value or sample edits. Oversize input disables Run; sandbox_input_limit reports the stage, actual bytes and allowed bytes. Reduce the meaningful evaluation input or ask your operator to update the matching components. Do not discard arbitrary Spans, bypass completeness checks or raise the gRPC decoder ceiling to hide a total-budget failure. Old plugins without preflight support require an update.
4. Try the rule on a reviewed Trace
- Follow the custom rule example to confirm the actual field expressions in
evaluate(trace), declared metrics and return format. - Confirm the execution mode and resolved target. Under Test and Validate, choose a Trace you have checked manually and select Run Diagnosis.
- Compare each metric’s verdict, reason and evidence with the Trace. Resolve execution or cleanup failures first; they do not mean that the Agent being checked has poor quality.
- Ask your operator to confirm that the workload was cleaned up. Neither Readiness verified nor a rule’s exit code proves cleanup.
- Run another trial after changing the rule, execution environment, connection or sample, then save the diagnoser. Add it to a diagnosis task for a formal run.
bad. Invalid reference tests, environment mismatch and runtime faults are execution errors. With no observed candidate failure, zero tests or incomplete skip/xfail verification are also execution errors, never passing verification.
Restricted rules retain the original 5-second default service ceiling. Enhanced rules default to a 30-second service ceiling; the actual limit is the smaller service/connection value. The trial HTTP phase budget is 600 seconds for creation, execution and cleanup; it does not allow a single rule to run for 600 seconds.
New tasks freeze their resolved execution target at creation. Changing the Space default does not reroute existing tasks; historical tasks retain their recorded route. If the connection endpoint, image or resource profile changes, old tasks may report sandbox_identity_changed. Check the configuration and create a new task rather than expecting the old one to switch connections.
Inspect the individual Record after a formal Task
Open the Task in execution history, check selected/scanned samples, valid judgments, skips and failures, then open the corresponding diagnosis Record. Compare each metric, reason and evidence. A Task markedsucceeded does not establish that every rule executed successfully or that every metric is good. Resolve execution failures, cleanup failures and incomplete input before interpreting Agent quality.
For programmatic acceptance, use existing authorization to read that Record’s execution_status and execution evidence, including backend=sandbox and provider=openshell. Rules requiring a complete Trace should also check source_complete and projection_failed. Execution status, metric good / bad and human-review status are separate facts.
One persisted Record from the actual Linux AMD64 VM · Chinese interface and synthetic input · Click to enlarge
Advanced: connect an existing OpenShell service
Use this only for an independently deployed plugin service. The recommended automatic flow does not require these fields. Switch to the target Space and open Integrations → Plugins → Sandbox → OpenShell → Add connection. Obtain these values from your operator:Add an OpenShell connection using the operator's endpoint and image · Example values; token omitted in this capture, required on create · Click to enlarge
OpenShell: manage this Space's connections; deployment help is initially collapsed · Running UI with demonstration data · Click to enlarge


















