Workspace Architecture
Each workspace has:- Isolated AGFS storage (
viking://user/,viking://agent/, etc.) - Separate VectorDB namespace
- Independent user management
- At least one ADMIN user
Create Workspace
Create a new workspace with its first admin user. This initializes all required directories and storage. Authentication: ROOT onlyRequest Body
string
required
Unique workspace identifier
string
required
User ID for the first admin of this workspace
Response
string
Response status (
ok or error)object
Creation result
number
Request processing time in seconds
Example
List Workspaces
List all workspaces with user counts and creation timestamps. Authentication: ROOT onlyResponse
string
Response status (
ok or error)array
Array of workspaces
number
Request processing time in seconds
Example
Delete Workspace
Delete a workspace and all associated data including users, API keys, AGFS storage, and VectorDB records. Authentication: ROOT onlyPath Parameters
string
required
Workspace ID to delete
Response
string
Response status (
ok or error)object
Deletion result
number
Request processing time in seconds
Example
Cascade Deletion Details
When a workspace is deleted, the following cleanup occurs:1. AGFS Data Cleanup
All directories for the account are removed:2. VectorDB Cleanup
All vectors and metadata tagged with the account ID are deleted from:- Context collection
- Any custom collections
3. User and Key Cleanup
All users in the workspace and their API keys are removed from the key manager.Complete Workflow Example
Configuration
To enable admin APIs, configure the root API key in your server:Multi-Tenant Best Practices
Use Strong Root Keys
Use Strong Root Keys
The root API key has full system access. Generate cryptographically secure keys and store them securely (e.g., in a secrets manager).
Minimize Root Key Usage
Minimize Root Key Usage
- Create workspaces and initial admins with ROOT
- Let ADMIN users manage their own workspace users
- Only use ROOT for workspace deletion and role changes
Name Workspaces Consistently
Name Workspaces Consistently
Use lowercase identifiers with hyphens:
acme-corp✅team-alpha✅AcmeCorp❌team_alpha❌
Plan for Workspace Lifecycle
Plan for Workspace Lifecycle
- Create workspaces for teams/projects
- Archive data before deletion
- Remove unused workspaces periodically
- Monitor workspace resource usage
Related Endpoints
- User Management - Manage users within workspaces
- System Status - Check system health
