The AIView extension view provides users with a generic AI assistant for SystemWeaver. There is no required Meta model as the view will work with any type of SystemWeaver data. As part of the setup process, the extension view must be defined. This article describes how to configure the view shown in the client.

Prerequisites

  • Familiar with the SystemWeaver meta model building blocks (e.g., Items, Parts and Attributes)
  • Familiar with the SystemWeaver Script Language
  • An installation of the SystemWeaver Explorer client (swExplorer) release Kallebäck (R52) or later
  • Assignment of the SW Architect role in the server
  • An installation of the SystemWeaver Architect client (swArchitect)
  • The SWExtension.AIExtension folder is located in your Client's swExplorerExtensions directory
  • Access to the AI keys usually for your organization's artificial intelligence services



Configuring the View

  1. Go to File > Configure the explorer
  2. On the Item views tab, select the AIView.
  3. Click View example XML and copy the script as a starting point for your configuration. It is also shown below.
  4. Click Edit configuration and paste the configuration into the Edit XML window. 
  5. Modify the configuration to meet the needs of the use case(s). See the Explanation of Configurable Elements below.
  6. When you have completed all WeaverAI configuration as described in WeaverAI and are ready to test and make it available to users, check the Active box. Users must log out and back in to see the new option.


Configuration Skeleton

<AIViewConfigs>
  <AIViewConfig id="1">
    <ViewSettings> ... </ViewSettings>   <!-- required: how the view appears in swExplorer -->
    <TopItem itemType="..."/>            <!-- optional, repeatable: restrict to item types -->
    <Colors> <Color>...</Color> </Colors><!-- optional: graph/chat accent palette -->
    <LLMApiKeys> ... </LLMApiKeys>        <!-- optional: per-user/group keys + access gate -->
    <Roles> ... </Roles>                 <!-- optional: selectable system-prompt personas -->
  </AIViewConfig>
</AIViewConfigs>

Example Configuration

Below is an example XML for the view. Each <AIViewConfig> in the example is a complete, copy-pasteable template. Every option block appears, in the canonical order: ViewSettings -> TopItem -> Colors -> LLMApiKeys -> Roles.


<AIViewConfigs>
    <!-- Full template - per-user keys, corporate palette -->
    <AIViewConfig id="1">
        <ViewSettings>
            <Caption>AIView (Full Template)</Caption>
            <RibbonGroup>Extensions</RibbonGroup>
            <Description>Complete example with every option block.</Description>
            <Image guiImage="31"/>
        </ViewSettings>
        <TopItem itemType="RQ, SI0209, SI0223"/>
        <TopItem itemType="BIDM"/>
        <Colors>
            <Color>#1B4F72</Color>
            <Color>#2E86C1</Color>
            <Color>#27AE60</Color>
            <Color>#F39C12</Color>
            <Color>#8E44AD</Color>
            <Color>#E74C3C</Color>
        </Colors>
        <LLMApiKeys>
            <User name="alice">
                <APIKey LLMProvider="Anthropic" Key="sk-ant-REPLACE"/>
                <APIKey LLMProvider="OpenAI" Key="sk-REPLACE"/>
            </User>
        </LLMApiKeys>
        <Roles>
            <Role name="Generic" default="true">
                <SystemPrompt><![CDATA[You are a helpful AI assistant for SystemWeaver. Be concise and accurate.]]></SystemPrompt>
            </Role>
            <Role name="Requirements Reviewer">
                <SystemPrompt><![CDATA[You review SystemWeaver requirements for clarity, testability and INCOSE compliance.]]></SystemPrompt>
            </Role>
        </Roles>
    </AIViewConfig>

    <!-- Full template - per-group keys, color-blind-safe (Okabe-Ito) palette -->
    <AIViewConfig id="2">
        <ViewSettings>
            <Caption>AIView (Full Template - Groups)</Caption>
            <RibbonGroup>Extensions</RibbonGroup>
            <Description>Complete example; visibility gated to groups.</Description>
            <Image guiImage="31"/>
        </ViewSettings>
        <TopItem itemType="BIDM"/>
        <Colors>
            <Color>#E69F00</Color>
            <Color>#56B4E9</Color>
            <Color>#009E73</Color>
            <Color>#F0E442</Color>
            <Color>#0072B2</Color>
            <Color>#D55E00</Color>
            <Color>#CC79A7</Color>
        </Colors>
        <LLMApiKeys>
            <Group name="AI Users">
                <APIKey LLMProvider="Anthropic" Key="sk-ant-REPLACE"/>
            </Group>
        </LLMApiKeys>
        <Roles>
            <Role name="Generic" default="true">
                <SystemPrompt><![CDATA[You are a helpful AI assistant for SystemWeaver.]]></SystemPrompt>
            </Role>
        </Roles>
    </AIViewConfig>

    <!-- Full template - single item type, named colors -->
    <AIViewConfig id="3">
        <ViewSettings>
            <Caption>AIView (Full Template - Named Colors)</Caption>
            <RibbonGroup>Extensions</RibbonGroup>
            <Description>Complete example using standard color names.</Description>
            <Image guiImage="31"/>
        </ViewSettings>
        <TopItem itemType="BIDM"/>
        <Colors>
            <Color>Red</Color>
            <Color>Blue</Color>
            <Color>Green</Color>
            <Color>Orange</Color>
            <Color>Purple</Color>
            <Color>Gray</Color>
        </Colors>
        <LLMApiKeys>
            <User name="bob">
                <APIKey LLMProvider="Anthropic" Key="sk-ant-REPLACE"/>
            </User>
        </LLMApiKeys>
        <Roles>
            <Role name="Generic" default="true">
                <SystemPrompt><![CDATA[You are a helpful AI assistant for SystemWeaver.]]></SystemPrompt>
            </Role>
        </Roles>
    </AIViewConfig>

</AIViewConfigs>


Explanation of the Configuration Elements

<AIViewConfigs> is the top tag which can include one or more <AIViewConfig>.


<AIViewConfig> is the top tag of each configuration and must have an id attribute. The id attribute in <AIViewConfig> identifies the specific configuration, and should be a unique string value when multiple configurations exist.  Each id is a distinct view instance that can be added to the ribbon.


<ViewSettings> is required. See How to Configure Item View Menu Label Settings


<TopItem> is optional, and restricts the view so it is only active for items of the listed itemType SID(s) and any item type that inherits from them. Supports single SID or a comma-separated list. Omit entirely to make the view available for all item types. Multiple <TopItem> elements are additive.

<TopItem itemType="RQ, SI0209, SI0223"/>
<TopItem itemType="BIDM"/>


<Colors> is optional, and can be used to set the accent palette. Overrides the built-in palette used for chat accent bars. Each <Color> is a hex value (#RRGGBB) or a standard color name (Red, Blue, …). Colors are applied in order and cycle. When absent, a built-in palette is used.

<Colors>
  <Color>#1B4F72</Color>
  <Color>#2E86C1</Color>
  <Color>Green</Color>
</Colors>

<LLMApiKeys> for per-principal keys + access gate is optional, but important. When used: 

  1. Access gatethe view is shown only to a matching SystemWeaver principal (the listed users, or members of the listed groups).
  2. Key injection: the matched principal’s API keys are forwarded to AIHost over the AIFE InitializeBackend call at session start, which initializes the corresponding LLM plugins. Keys are held in memory on the host only.

Rules:

  • Use either <User> entries or <Group> entries inside one <LLMApiKeys> — never both.
  • LLMProvider is free-form: it is forwarded verbatim and mapped host-side to the matching plugin, so new providers need no extension change. Typical values: Anthropic, OpenAI.
  • This is the intended way to supply LLM credentials — AIHost ships with Llm:AcceptedCredentialSources = "Runtime" (see Llm (router-level guards)), meaning providers stay pending until a key arrives over this channel; keys in plugin settings.json or environment variables are ignored.


Element / attributeDescription
<User name="...">A SystemWeaver user the view is visible to.
<Group name="...">A SystemWeaver group whose members the view is visible to.
<APIKey LLMProvider="..." Key="..."/>One provider/key pair for the enclosing principal. Repeatable.


<LLMApiKeys>
  <User name="alice">
    <APIKey LLMProvider="Anthropic" Key="sk-ant-REPLACE"/>
    <APIKey LLMProvider="OpenAI"    Key="sk-REPLACE"/>
  </User>
  <User name="bob">
    <APIKey LLMProvider="Anthropic" Key="sk-ant-REPLACE"/>
  </User>
</LLMApiKeys>


Per-group form:


<LLMApiKeys>
  <Group name="AI Users">
    <APIKey LLMProvider="Anthropic" Key="sk-ant-REPLACE"/>
  </Group>
</LLMApiKeys>


<Roles> are optional and are used to populate the ROLE section in the Settings panel with named personas. Each <Role> carries a system prompt that conditions the model for that session.


Element / AttributeDescription
<Role name="...">Display name shown in the ROLE ComboBox.
default="true"Optional. Marks the role pre-selected on view open. At most one role should be default; if none is, the first listed role wins.
<SystemPrompt>The system prompt sent to the LLM. Wrap in <![CDATA[ … ]]> so it can contain Markdown, <, >, & without escaping.


When no <Roles> section is present, the view falls back to a built-in “Generic” role ("You are a helpful AI assistant for SystemWeaver.").


<Roles>
  <Role name="Generic" default="true">
    <SystemPrompt><![CDATA[You are a helpful AI assistant for SystemWeaver. Be concise and accurate.]]></SystemPrompt>
  </Role>
  <Role name="Requirements Reviewer">
    <SystemPrompt><![CDATA[You review SystemWeaver requirements for clarity, testability and INCOSE compliance...]]></SystemPrompt>
  </Role>
</Roles>

Fixed client connection facts (not configurable in XML)

These are compiled into the client and must match AIHost:

SettingValueNotes
HostlocalhostHard-wired; matches the server cert SAN (IPv4 + IPv6 loopback).
Port5001Must equal AIHost Aife:Port(

Aife (wire plane)

).
TransportHTTPS + mTLSTrust bootstrapped over named pipe SWCertificateExchangeForAIClientServerInLocalmode.
AIHost exeAIHost/SystemWeaver.AIHost.exeStaged next to the extension; auto-started by the client.

What's Next? 

Refer to Configuration Manual for WeaverAI to determine if any additional configuration remains to be done.