Workspaces

Your AI empire starts here 🏒

Workspaces are like folders for your AI infrastructure. One workspace for customer support bots, another for analytics, maybe one just for fun? You do you!

Why Workspaces?

  • πŸ—‚οΈ Organize - Keep different projects separate
  • πŸ‘₯ Collaborate - Share with team members
  • πŸ”’ Isolate - Dev, staging, and prod separated
  • πŸ“Š Track - See bot and memory counts at a glance

Quick Operations

List All Workspaces

Show me what you got! πŸ“‹

GET /api/workspaces/workspaces

Example:

curl -H "Authorization: Bearer moa_your_token" \
     https://api.memof.ai/api/workspaces/workspaces

Response:

[
  {
    "id": "ws_123456789",
    "name": "Customer Support",
    "description": "Support bot workspace",
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z",
    "members_count": 3,
    "bots_count": 5
  }
]

Create Workspace

Time to build! πŸ—οΈ

POST /api/workspaces/workspace/create

Request Body:

{
  "name": "string (required)",
  "description": "string (optional)"
}

Example:

curl -X POST https://api.memof.ai/api/workspaces/workspace/create \
  -H "Authorization: Bearer moa_your_token" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Analytics Bots",
    "description": "Data analysis and reporting bots"
  }'

Response:

{
  "id": "ws_123456789",
  "name": "Analytics Bots",
  "description": "Data analysis and reporting bots",
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z"
}

Get Workspace Details

The full story πŸ“–

GET /api/workspaces/workspace/{workspace_id}

Example:

curl -H "Authorization: Bearer moa_your_token" \
     https://api.memof.ai/api/workspaces/workspace/ws_123456789

Response:

{
  "id": "ws_123456789",
  "name": "Customer Support",
  "description": "Support bot workspace",
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z",
  "members": [
    {
      "id": "member_123",
      "user": {
        "id": "user_456",
        "username": "john_doe",
        "email": "john@example.com"
      },
      "role": "admin",
      "joined_at": "2024-01-15T10:30:00Z"
    }
  ],
  "bots": [
    {
      "id": "bot_789",
      "name": "Support Bot Alpha",
      "description": "First line support"
    }
  ]
}

Update Workspace

Change of plans? ✏️

PUT /api/workspaces/workspace/{workspace_id}/update

Request Body:

{
  "name": "string (optional)",
  "description": "string (optional)"
}

Example:

curl -X PUT https://api.memof.ai/api/workspaces/workspace/ws_123456789/update \
  -H "Authorization: Bearer moa_your_token" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Premium Customer Support",
    "description": "VIP customer support bots"
  }'

Delete Workspace

Goodbye, old friend πŸ‘‹

DELETE /api/workspaces/workspace/{workspace_id}/delete

⚠️ Warning: This deletes all bots and memories in the workspace. No undo button!

Example:

curl -X DELETE https://api.memof.ai/api/workspaces/workspace/ws_123456789/delete \
  -H "Authorization: Bearer moa_your_token"

Workspace Organization Tips

By Environment

πŸ”΅ Dev Workspace β†’ Your playground 🟑 Staging Workspace β†’ Pre-production testing 🟒 Production Workspace β†’ The real deal

By Function

πŸ€– Customer Support β†’ Support bots πŸ“Š Analytics β†’ Data bots πŸ’¬ Chat Bots β†’ Conversational agents πŸ”§ Internal Tools β†’ Employee assistants

By Client

🏒 Acme Corp β†’ Client A bots 🏭 Globex Inc β†’ Client B bots πŸͺ Initech LLC β†’ Client C bots

Common Patterns

Multi-Tenant Setup

# Create separate workspaces per client
for client in "ClientA" "ClientB" "ClientC"; do
  curl -X POST https://api.memof.ai/api/workspaces/workspace/create \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d "{\"name\": \"$client Workspace\"}"
done

Environment Separation

# Create environment-specific workspaces
for env in "Development" "Staging" "Production"; do
  curl -X POST https://api.memof.ai/api/workspaces/workspace/create \
    -H "Authorization: Bearer $TOKEN" \
    -H "Content-Type: application/json" \
    -d "{\"name\": \"$env Environment\"}"
done

Error Scenarios

Duplicate Name

{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Workspace name already exists"
  }
}

Tip: Add a date or version number to make it unique.

Workspace Not Found

{
  "error": {
    "code": "NOT_FOUND",
    "message": "Workspace not found"
  }
}

Double-check that workspace ID!

Best Practices

βœ… Do This

  • Descriptive names - "Production Support Bots" beats "Workspace 1"
  • Add descriptions - Future you will thank present you
  • Separate environments - Don't mix dev and prod
  • Regular cleanup - Delete unused workspaces

❌ Avoid This

  • Generic names - "Test", "New", "Workspace"
  • Everything in one - Organization is your friend
  • Forgetting to delete - Unused workspaces pile up
  • No descriptions - "What was this for again?"

What's Next?

Workspace created? Awesome! Now:

  1. Create a Bot - Populate your workspace
  2. Store Memories - Give your bot a brain
  3. Check Examples - See it all in action

Happy organizing! 🎯