Workspaces and Environments
VM-X AI uses a hierarchical structure for organization and isolation: Workspaces and Environments. Understanding this structure is essential for effectively managing your AI resources.
Workspaces
A Workspace is the top-level isolation layer that groups a set of environments. Workspaces provide:
- Multi-tenancy: Complete isolation between different organizations or teams
- Access Control: Workspace-level permissions and member management
- Resource Organization: Logical grouping of related environments
Workspace Members
Each workspace can have two types of members:
- Owner: Can do anything in the workspace, including deleting the workspace
- Member: Can create environments, AI connections, and resources, but cannot delete workspaces
Creating a Workspace
- Navigate to Getting Started from the sidebar
- Fill in workspace details:
- Name: A descriptive name
- Description: Optional description
Environments
An Environment is an isolation layer within a workspace that groups resources. Environments provide:
- Resource Isolation: AI Connections, AI Resources, API Keys, and Usage data are scoped to environments
- Environment-based Routing: Different environments can have different configurations
- Deployment Separation: Separate environments for development, staging, and production
Creating an Environment
- Navigate to the Workspaces page from the sidebar
- Click on the plus icon next to the workspace
- Fill in environment details:
- Name: A descriptive name (e.g., "production", "staging", "development")
Workspace and Environment Isolation
All resources in VM-X AI are scoped to a workspace and environment:
- AI Connections: Created within an environment
- AI Resources: Created within an environment
- API Keys: Created within an environment
- Usage Data: Tracked per environment
- Audit Logs: Scoped to workspace and environment
API Endpoint Structure
The completion API uses workspace and environment IDs in the endpoint path:
/v1/completion/{workspaceId}/{environmentId}/chat/completions
/v1/completion/{workspaceId}/{environmentId}/responses
/v1/completion/{workspaceId}/{environmentId}/anthropic/messages
VM-X AI exposes three completion-style routes under the same workspace/environment scope:
- Chat Completions — OpenAI's classic chat completions shape. Most SDKs target this format.
- Responses — OpenAI's newer Responses API (typed events, reasoning surfaces, function tools).
- Messages — drop-in compatibility for clients written against
Anthropic's
POST /v1/messages. Routed to an Anthropic-native provider (theAnthropicprovider via@anthropic-ai/sdk, or AWS Bedrock-Invoke for Claude models), the body is sent verbatim with no conversion —cache_control, extendedthinking, server tools (web_search_20250305,code_execution_20250522,bash_20250124,text_editor_20250728,computer_20250124), citations, and refusalstop_detailsall survive end-to-end. Cross-provider fallback to a non-Anthropic upstream converts to the internal pivot and back, dropping fields the wire format can't express.
All three share routing, fallback, capacity gating, audit, and the
vmx envelope. See the
API reference for the per-endpoint deep dives:
Chat Completions,
Responses, and
Anthropic Messages.
This ensures:
- Complete isolation between workspaces
- Complete isolation between environments
- No risk of cross-environment data access
Example API Usage
import OpenAI from 'openai';
const workspaceId = '6c41dc1b-910c-4358-beef-2c609d38db31';
const environmentId = '6c1957ca-77ca-49b3-8fa1-0590281b8b44';
const resourceName = 'chat-completion';
const openai = new OpenAI({
baseURL: `http://localhost:3000/v1/completion/${workspaceId}/${environmentId}`,
apiKey: '<VM_X_API_KEY>',
});
const completion = await openai.chat.completions.create({
model: resourceName, // VM-X Resource Name
messages: [{ role: 'user', content: 'Hello!' }],
});
Best Practices
1. Organize by Purpose
Create workspaces for:
- Different organizations or teams
- Different projects
- Different business units
2. Use Environments for Lifecycle
Create environments for:
- Development: Testing and development
- Staging: Pre-production testing
- Production: Live production workloads
3. Separate Credentials
Use different AI Connections for:
- Different environments (separate API keys)
- Different providers
- Different regions
4. Isolate Resources
Create separate AI Resources for:
- Different use cases
- Different cost tiers
- Different performance requirements
5. Manage Access
- Assign workspace members appropriately
- Use roles for fine-grained permissions
- Review access regularly
Managing Workspace Members
Adding Members
- Navigate to the Workspaces from the sidebar
- Click on the edit icon next to the workspace
- Click Add Member
- Select user and role (Owner or Member)
Removing Members
- Navigate to the Workspaces from the sidebar
- Click on the edit icon next to the workspace
- Click Members
- Click on the remove icon next to the member
Troubleshooting
Cannot Access Workspace
If you cannot access a workspace:
- Check Membership: Verify you are a member of the workspace
- Check Permissions: Verify your role has the required permissions
- Check Workspace Status: Verify the workspace exists and is active
Cannot Access Environment
If you cannot access an environment:
- Check Workspace Access: Verify you have access to the parent workspace
- Check Environment Exists: Verify the environment exists
- Check Permissions: Verify your role has the required permissions
Resources Not Visible
If resources are not visible:
- Check Environment: Verify you are viewing the correct environment
- Check Permissions: Verify your role has read permissions
- Check Resource Status: Verify resources are enabled