Skip to content

Documentation navigation

mAIvn Studio

Open your app in Studio, configure a run, and inspect its progress.

#mAIvn Studio

mAIvn Studio is a local workbench for your agents. Its browser UI lets you find your apps, chat with them across multiple turns, and watch each step as it happens. Use it to build and debug on your own machine before shipping to users.

It provides a local HTTP/SSE interface for discovering apps, running multi-turn sessions, and inspecting execution events in real time.

#Start Studio

Install the Studio companion alongside the SDK and launch it from the directory that contains your maivn_studio.json config file. Studio looks for the config in the current working directory, then in up to three parent directories. With no config it starts with defaults and logs a warning.

Shell
pip install maivn maivn-studio
maivn studio

maivn studio runs python -m maivn_studio.main with the Python that runs the maivn command, so it always starts the Studio installed beside your SDK. If the companion is missing, the command offers to install it when you are at a terminal, and prints the install hint otherwise. There is no maivn-studio command. To launch Studio without the SDK CLI, run:

Shell
python -m maivn_studio

maivn-studio 2.3.1 pairs with SDK maivn 2.7.0 or a later 2.x version. SDK 3.x needs a Studio release that supports it, so check the Studio release notes before you upgrade the SDK in a project that uses Studio.

Using uv? With a uv-managed project the maivn command lives in the project's .venv, which uv does not put on your PATH automatically. Either run it through uv: ``bash uv run maivn studio ` or activate the virtual environment first (.venv\Scripts\activate on Windows, source .venv/bin/activate on macOS/Linux) and then maivn studio` works directly. This is expected uv behavior, not a Studio bug.

Optional CLI overrides:

  • --config / -c: explicit maivn_studio.json path
  • --host
  • --port / -p
  • --debug / -d
  • --reload / -r
  • --no-browser
  • --list-apps: print the app catalog Studio would show, then exit
  • --reset-history: archive the local execution-history database, then exit
Studio configuration panel beside the quickstart conversation

Open the configuration panel to review the selected app and run options before sending a prompt. This capture uses the quickstart example before execution.

#Configuration

Studio reads maivn_studio.json (note the underscore) from the current working directory or up to three parent directories. A minimal config tells Studio where to find your app modules and how to launch the local UI. Without one, Studio binds 127.0.0.1:8080:

Key sections:

  • studio: name, host, port, debug
  • env: environment file (default .env) and required variables. When MAIVN_API_KEY is listed under required, Studio checks the key against the API at startup and stops with a clear message if it is missing or rejected.
  • discovery: app scan paths and excludes
  • saved_prompts: persisted prompts shown in Studio
  • apps: explicit app declarations (in addition to discovery)
  • agents: standalone agent declarations
  • swarms: standalone swarm declarations
JSON
{
  "studio": {
    "name": "My Studio",
    "host": "127.0.0.1",
    "port": 8088,
    "debug": true
  },
  "discovery": {
    "paths": ["apps/core", "apps/features", "apps/projects"],
    "exclude": ["__pycache__", ".pytest_cache", "conftest"]
  }
}

#App Discovery and Metadata

Studio walks every discovery.paths directory and registers each Python module that defines at least one top-level Agent or Swarm. You can shape how an app appears in Studio with these optional module-level constants:

  • APP_PROMPTS: list of preset prompts shown in the chat composer.
  • APP_INVOCATION: dict of default execution options applied on every run.
  • DEFAULT_PROMPT: a single string fallback prompt.
  • messages: a pre-built list of HumanMessage / RedactedMessage instances.
  • configure_variant(variant: str | None): hook called before execution when the user picks a non-default variant.

Studio Authoring and Debugging covers APP_NAME, APP_CATEGORY, APP_CAPABILITIES and APP_EXECUTOR.

If an app does not expose APP_PROMPTS or messages, Studio falls back to extracting literal HumanMessage(content=...) calls from the module source.

APP_INVOCATION accepts: model, reasoning, force_final_tool, targeted_tools, memory_config, system_tools_config, allow_private_in_system_tools, stream_response, stream_deltas, max_output, followup_questions, attached_skill_ids, auto_skills, auto_skills_query, auto_skills_limit and auto_skills_skill_set. Other keys are ignored.

#Sessions and the Chat Composer

Each app launches inside a session: pick an app from the catalog, optionally choose a variant, then send a message. Studio's composer supports human and redacted message types, system-message overrides, attachments, structured output, batch runs and schedules.

Studio agent cards for the research-desk example

The agent cards show the selected example's agents before a run starts.

#Batch runs

Switch the composer to batch mode when you need to compare prompts, variants, models, or targeted tools in one grouped turn. Each row becomes its own batch item and can override variant, model, reasoning, system_message, targeted_tools, force_final_tool and stream_response without changing the app module. Uniform batches reuse the top-level invocation settings for every item. Batch options sets runs per row, how many run at once, and whether they run asynchronously.

The batch SSE sequence is:

  • batch_start — pending row metadata
  • batch_item_complete — one completed row payload
  • batch_complete — aggregate status and all item results

#Live Event Stream

Studio renders the public maivn.events schema, so each frame carries contract_version, event_name, event_kind, and the nested descriptors (tool, assistant, assignment, enrichment, interrupt, output, error_info) you see documented in the Events API reference.

Because Studio is a trusted developer tool running on your machine, it uses the bridge in internal mode and preserves full observability payloads for debugging. Do not copy that setting into customer-facing browser apps — for end-user frontends, use EventBridge(..., audience="frontend_safe") instead.

Common event types:

  • session_start
  • tool_event
  • assistant_chunk
  • status_message
  • system_tool_start
  • system_tool_chunk
  • system_tool_complete
  • agent_assignment
  • enrichment
  • hook_fired
  • interrupt_required
  • turn_complete
  • final
  • batch_start
  • batch_item_complete
  • batch_complete
  • error
  • session_end

turn_complete and the three batch_* events are Studio's own. The rest come from the maivn.events contract.

For the canonical packet contract and bridge-family normalization details, see:

When a supervised Swarm redeploys the same agent multiple times, Studio renders each deployment as a separate nested agent card. The card key is the invocation or assignment ID, not the agent name, so repeated coding_agent or verifier runs stay visible as distinct passes.

#Memory Apps in Studio

A memory-focused app can provide module-level APP_PROMPTS and an APP_INVOCATION.memory_config, so you can run retrieval and persistence flows without re-entering memory settings every turn.

For memory lifecycle verification, monitor enrichment phases such as:

  • memory_summarizing
  • memory_retrieving
  • memory_retrieved
  • memory_indexing
  • memory_skill_extracting
  • memory_insight_extracting
  • resource_registering
  • resource_registered
  • resource_dedup_reused
  • redaction_previewed
  • message_redaction_applied

memory_indexed and extraction phases can appear after the final response because indexing/extraction are asynchronous post-finalize operations.

For redaction workflows, Studio surfaces dedicated activity cards for preview and session-start redaction phases. Those cards expose:

  • inserted placeholder keys
  • values added to private_data
  • merged private data after preview
  • matched and unmatched caller-supplied known PII values

This visibility is appropriate in Studio because it runs locally for the developer who owns the data. Customer-facing frontends should not expose those raw fields; use the safe bridge audience described in Frontend Events.