Python REPL

Scenaven can run a sandboxed Python session on mesh-api alongside your active simulation session. Use it for scripted inspection, quick VTK operations, or agent-assisted workflows.

Where to find it

The agent rail on the right side of the embed viewer hosts:

  • amAIra — conversational assistant (when gateway is configured)
  • Python — interactive REPL tied to the current mesh session

The rail appears when the deployment enables the agent gateway and you are signed in with the required entitlements.

Prerequisites

Requirement Why
Active mesh session REPL runs against your loaded source data
Connected Infrastructure Commands execute on mesh-api
Valid auth (cloud) AntiNode session authorizes REPL endpoints
Agent gateway (optional) Required for amAIra; Python tab may work independently per deployment

If the Python tab is missing, your deployment may not expose the REPL or the gateway URL is unset.

What the REPL can do

Typical uses:

  • Inspect arrays, bounds, and field names on the canonical VTK source
  • Run small VTK snippets that mesh-api exposes in the sandbox
  • Prototype operations before they become first-class UI filters

The REPL does not replace the sidebar for everyday clip and warp — those go through the compile pipeline for consistent USD output.

Session lifecycle

You load data (upload or example)
    → mesh-api holds the canonical VTK session
    → You open the Python tab
    → Each cell runs on the server; stdout/stderr return to the browser
    → Closing the viewer or starting a new upload ends the session context

Long-running cells block until mesh-api finishes. Avoid heavy loops that starve other users on shared cloud tenants.

amAIra integration

When amAIra is enabled, you can ask questions about your scene in natural language. The assistant may suggest Python snippets or point you to UI controls. It does not bypass server-side entitlement checks — cloud operations still require a valid session.

Safety and limits

  • Code runs in a server sandbox, not in your browser.
  • No arbitrary filesystem access to your laptop — only session-scoped assets on mesh-api storage.
  • Resource limits depend on deployment (CPU, memory, timeouts).

Troubleshooting

Symptom Things to check
Python tab missing Gateway not configured or feature disabled
"No active session" Load data or an example first
Commands time out Reduce workload; check mesh-api logs
Auth errors Re-sign in; confirm AntiNode entitlements