Spaces & Workspaces
A Space is a workspace where agents do their work. It's a sandboxed project directory with files, installed tools, skills, secrets, and optionally a Git repository.
Every conversation runs inside a Space. When an agent reads files, runs commands, or uses tools — it all happens within the Space's sandbox.
What's Inside a Space
| Component | Description |
|---|---|
| Files | A sandboxed filesystem where agents can read, write, and edit files |
| Skills | Installed capabilities (e.g., core:research-assistant) |
| MCPs | Tool integrations (e.g., Google Analytics, Ahrefs) |
| Agents | Characters/agents assigned to this workspace |
| Secrets | Encrypted environment variables (API keys, tokens) |
| Git | Optional Git repository (clone, pull, commit) |
| CLAUDE.md | Persistent instructions loaded into every conversation |
Create a Space
Via Web App
- Click + New Space from the dashboard
- Enter a name and optional description
- Choose the type:
- Empty — blank workspace
- Git — clone from a repository URL
- Set visibility:
private,organization, orpublic - Click Create
Via CLI
# Empty space
teamday spaces create --name "Marketing Hub"
# Space from a Git repo
teamday spaces create --name "Backend API" --type git --git-url https://github.com/your-org/repo.git
Via API
curl -X POST "https://us.teamday.ai/api/v1/spaces" \
-H "Authorization: Bearer $TEAMDAY_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Marketing Hub",
"description": "Content creation and SEO workspace",
"visibility": "organization"
}'
Response:
{
"success": true,
"space": {
"id": "abc123",
"name": "Marketing Hub",
"visibility": "organization",
"skillRefs": ["core:research-assistant", "core:data-analyst", ...]
}
}
New spaces automatically include core skills.
Install Resources
Add skills, MCP integrations, and agents to your Space.
Add Skills
teamday spaces add-skill <space-id> core:research-assistant core:data-analyst
Via API:
curl -X PATCH "https://us.teamday.ai/api/v1/spaces/<space-id>" \
-H "Authorization: Bearer $TEAMDAY_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"addSkills": ["core:research-assistant", "core:data-analyst"]}'
Add MCPs
teamday spaces add-mcp <space-id> google-analytics ahrefs
Via API:
curl -X PATCH "https://us.teamday.ai/api/v1/spaces/<space-id>" \
-H "Authorization: Bearer $TEAMDAY_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"addMcps": ["mcp-id-1", "mcp-id-2"]}'
Add Agents
teamday spaces add-agent <space-id> <agent-id>
When you add a Character to a Space, TeamDay automatically:
- Writes the agent definition to
.claude/agents/{name}.md - Installs the Character's skill dependencies
- Installs the Character's subagent dependencies
Via API:
curl -X PATCH "https://us.teamday.ai/api/v1/spaces/<space-id>" \
-H "Authorization: Bearer $TEAMDAY_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"addAgents": ["agent-id"]}'
Remove Resources
teamday spaces remove-skill <space-id> core:data-analyst
teamday spaces remove-mcp <space-id> ahrefs
teamday spaces remove-agent <space-id> <agent-id>
Via API:
curl -X PATCH "https://us.teamday.ai/api/v1/spaces/<space-id>" \
-H "Authorization: Bearer $TEAMDAY_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"removeSkills": ["core:data-analyst"]}'
Secrets
Secrets are encrypted environment variables available to agents at runtime. Use them for API keys, tokens, and other credentials.
Store Secrets
teamday spaces set-secret <space-id> OPENAI_API_KEY=sk-abc123 SLACK_TOKEN=xoxb-456
Via API:
curl -X POST "https://us.teamday.ai/api/v1/spaces/<space-id>/secrets" \
-H "Authorization: Bearer $TEAMDAY_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"secrets": {
"OPENAI_API_KEY": "sk-abc123",
"SLACK_TOKEN": "xoxb-456"
}
}'
Secret names must be UPPER_SNAKE_CASE. Values are encrypted at rest.
List Secrets
teamday spaces secrets <space-id>
Returns key names only — values are never exposed.
Remove Secrets
teamday spaces remove-secret <space-id> OPENAI_API_KEY
Via API:
curl -X DELETE "https://us.teamday.ai/api/v1/spaces/<space-id>/secrets" \
-H "Authorization: Bearer $TEAMDAY_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"keys": ["OPENAI_API_KEY"]}'
How Agents Access Secrets
Secrets are injected as environment variables in the agent's sandbox. If an MCP or skill configuration references ${API_KEY}, it's resolved from the Space's secrets.
In .mcp.json:
{
"mcpServers": {
"my-tool": {
"command": "node",
"args": ["tool.js"],
"env": {
"API_KEY": "${API_KEY}"
}
}
}
}
Files and Filesystem
Each Space has a sandboxed filesystem at:
/sandbox/{orgId}/spaces/s-{spaceId}/
Agents use built-in tools to interact with files:
| Tool | Operation |
|---|---|
Read | Read file contents |
Write | Create or overwrite files |
Edit | Make targeted string replacements |
Glob | Find files by pattern |
Grep | Search file contents |
Bash | Run shell commands |
Browse Files (CLI)
teamday spaces ls <space-id> /
teamday spaces ls <space-id> /src/
CLAUDE.md
Place a CLAUDE.md file in the Space root to provide persistent instructions to all agents:
# Project Context
This is a Node.js API project using Express and PostgreSQL.
## Coding Standards
- Use TypeScript strict mode
- Write tests for all new endpoints
- Follow REST conventions
## Important Files
- src/routes/ — API routes
- src/models/ — Database models
- .env.example — Required environment variables
CLAUDE.md is loaded automatically at the start of every conversation. Use it for project-specific context that doesn't belong in the agent's system prompt.
Special Directories
| Path | Purpose |
|---|---|
CLAUDE.md | Persistent instructions for all agents |
.claude/agents/ | Subagent definitions (markdown files) |
.claude/skills/ | Skill definitions |
.mcp.json | MCP server configuration |
.git/ | Git repository (if connected) |
Git Integration
Connect a Space to a Git repository for version-controlled workspaces.
Clone a Repo
Create a Space with a Git URL:
teamday spaces create --name "Backend" --type git --git-url https://github.com/org/repo.git
Git Operations (CLI)
teamday spaces git <space-id> status
teamday spaces git <space-id> pull
In-Chat Git
Agents can use Git through the Bash tool:
git status
git add .
git commit -m "Add feature X"
git push
The web app also provides a Git panel for viewing diffs, staging changes, and committing.
Chat in a Space
Via Web App
Open a Space and select an agent from the chat panel. The agent automatically has access to all the Space's resources.
Via CLI
teamday spaces chat <space-id> --agent <agent-id>
Via API
curl -X POST "https://us.teamday.ai/api/v1/agents/<agent-id>/execute" \
-H "Authorization: Bearer $TEAMDAY_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"message": "Review the files in src/",
"spaceId": "<space-id>"
}'
View Space Details
Via CLI
teamday spaces get <space-id>
Shows the full profile including installed skills, MCPs, agents, and secret keys.
Via API
curl "https://us.teamday.ai/api/v1/spaces/<space-id>" \
-H "Authorization: Bearer $TEAMDAY_API_TOKEN"
Update a Space
Update metadata, cover image, or installed resources:
# Update name
teamday spaces get <space-id> # not yet available via CLI update
Via API:
curl -X PATCH "https://us.teamday.ai/api/v1/spaces/<space-id>" \
-H "Authorization: Bearer $TEAMDAY_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Marketing Hub v2",
"description": "Updated workspace",
"instructions": "Focus on SEO content",
"coverImage": "https://images.unsplash.com/photo-123"
}'
Disable Built-in Tools
Restrict which tools agents can use in this Space:
{
"disabledTools": ["Bash", "WebSearch"]
}
This prevents all agents in the Space from using the listed tools.
Delete a Space
teamday spaces delete <space-id>
Spaces are soft-deleted (archived), not permanently removed. Execution history is preserved.
Next Steps
- Space Setup — Detailed setup workflows
- Skills — Build and install reusable capabilities
- MCP Servers — Connect external tools
- Git Integration — Repository management