# Getting Started with TeamDay

Set up your TeamDay account, create your first AI agent, and start chatting in minutes.

# Getting Started with TeamDay

This guide walks you through signing up, creating your first AI agent, and having your first conversation. You'll be up and running in a few minutes.

---

## Sign Up

1. Visit [teamday.ai](https://teamday.ai) and click **Sign Up**
2. Authenticate with **Google**, **GitHub**, or **Email**
3. An organization is created for you automatically

Once signed in, you land on the org home page where you can create agents, open Spaces, and start chatting.

---

## Core Concepts

Before building, here's how TeamDay is organized:

| Concept | What It Is |
|---------|-----------|
| **Agent** | An AI employee — a specialized team member with a name, role, system prompt, model, and equipment (skills, MCPs, subagents). |
| **Space** | A workspace (project directory) where agents run. Contains files, installed tools, skills, and secrets. |
| **Skill** | A reusable capability that teaches agents how to do specific tasks (e.g., generate images, write reports). |
| **MCP Server** | A tool integration that connects agents to external services (Google Analytics, Ahrefs, Slack, etc.). |
| **Mission** | A scheduled task — run an agent on a cron schedule, once at a future time, or continuously. |

---

## Onboarding Flow

The recommended path to get started:

1. **Sign up** and create your organization
2. **Create an agent** — your first AI team member
3. **Chat at org level** — test the agent from your org home page
4. **Create a Space** — set up a workspace for a project
5. **Add the agent to the Space** — give it access to the Space's files and resources

---

## Create Your First Agent

### In the Web App

1. From the org home page, click **+ Create Agent**
2. Set the basics:
   - **Name**: "My Assistant"
   - **Role**: "General Assistant"
   - **System Prompt**: "You are a helpful assistant. Be concise and friendly."
3. Start chatting immediately

### Via CLI

```bash
teamday agents create \
  --name "My Assistant" \
  --role "General Assistant" \
  --system-prompt "You are a helpful assistant. Be concise and friendly."
```

### Via API

```bash
curl -X POST "https://cc.teamday.ai/api/v1/agents" \
  -H "Authorization: Bearer $TEAMDAY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My Assistant",
    "role": "General Assistant",
    "systemPrompt": "You are a helpful assistant. Be concise and friendly."
  }'
```

---

## Chat With Your Agent

Agents can be chatted with at two levels:

### Organization-Level Chat

Chat with an agent directly from the org home page. The agent uses only its own equipment — skills, MCPs, and subagents attached to it. No Space context is involved.

This is great for quick conversations, general questions, and tasks that don't require access to project files.

### Space-Level Chat

Chat with an agent inside a Space. The agent uses its own equipment **plus** the Space's installed resources (skills, MCPs, secrets, files). This is the union of both — everything the agent has, plus everything the Space provides.

Use Space-level chat when the agent needs to work with files, run commands, or access Space-specific integrations.

### Built-in Tools

Agents in TeamDay are powered by Claude and have access to a full set of tools:

- **Read, Write, Edit** — work with files in the Space
- **Bash** — run shell commands
- **WebSearch, WebFetch** — search the web and fetch pages
- **Glob, Grep** — find and search files

These tools let agents do real work — not just answer questions.

### Via CLI

Interactive multi-turn chat:

```bash
teamday agents chat <agent-id>
```

Single message execution:

```bash
teamday agents exec <agent-id> "Summarize the README in this project"
```

Add a Space context so the agent can access files:

```bash
teamday agents exec <agent-id> "Review the code in src/" --space <space-id>
```

---

## Create a Space

Spaces are project workspaces where agents do their work with files, commands, and integrations.

1. Click **+ New Space** from the dashboard
2. Give it a name (e.g., "My First Project")
3. Choose a type:
   - **Empty** — blank workspace
   - **Git** — clone from a GitHub repository
4. Click **Create**

Your Space starts with a sandbox directory where agents can read and write files, run commands, and use installed tools.

**Via CLI:**

```bash
teamday spaces create --name "My First Project"
```

---

## Equip Your Agent

Agents have four types of equipment, managed via the agent's detail panel:

| Equipment | What It Does |
|-----------|-------------|
| **Tools** | Built-in Claude tools (Read, Write, Edit, Bash, Glob, Grep, WebSearch, WebFetch) — available by default |
| **Skills** | Reusable capabilities (e.g., research, data analysis, image generation) |
| **MCPs** | External integrations (Google Analytics, Ahrefs, databases, etc.) |
| **Subagents** | Other agents this agent can delegate work to |

### Attach Skills

```bash
teamday agents add-skill <agent-id> core:research-assistant core:data-analyst
```

Or attach them through the agent's detail panel in the web app.

### Connect MCP Servers

MCP (Model Context Protocol) servers connect agents to external tools and services:

```bash
teamday agents add-mcp <agent-id> google-search
```

Popular integrations include Google Analytics, Ahrefs, Slack, and GitHub. See [MCP Servers](https://docs.teamday.ai/guides/mcp-servers/what-are-mcp-servers) for the full list.

### Store Secrets

If your MCPs or skills need API keys, store them as encrypted Space secrets:

```bash
teamday spaces set-secret <space-id> OPENAI_API_KEY=sk-abc123
```

---

## Visibility vs Attachment

These are two separate concepts:

- **Visibility** controls who can **see and discover** an item: `private`, `organization`, `public`, or `unlisted`.
- **Attachment** controls where an item is **active**: attached to a specific agent or Space.

Setting an agent's visibility to `organization` means all org members can see it — but it does **not** mean the agent is automatically included in every Space or chat. Items must be explicitly attached to an agent or Space to be used.

---

## Set Up Authentication

For API and CLI access, you need credentials.

### Option 1: OAuth Login (CLI)

```bash
teamday auth login
```

Opens your browser for secure authentication. Tokens are managed automatically.

### Option 2: Personal Access Token (API / CI)

1. Go to **Settings** in the web app
2. Create a new **Personal Access Token**
3. Copy and save it immediately (shown only once)

```bash
# Use with CLI
teamday auth set-key "td_your_token_here"

# Or as environment variable
export TEAMDAY_API_TOKEN="td_your_token_here"
```

See [API Keys & Authentication](https://docs.teamday.ai/guides/api-keys) for the full guide.

### Claude API Credentials

TeamDay agents are powered by Claude. By default, the platform provides Claude API access. You can also bring your own credentials for direct billing:

```bash
# Check what's configured
teamday keys status

# Set your Claude OAuth token (from claude.ai subscription)
teamday keys set oauth sk-ant-oat01-your-token

# Or set an Anthropic API key
teamday keys set api-key sk-ant-api03-your-key
```

TeamDay uses a priority system: your personal credentials are used first, then organization credentials, then the platform default.

---

## Next Steps

| Guide | What You'll Learn |
|-------|------------------|
| [Create Your First Agent](https://docs.teamday.ai/guides/first-agent) | In-depth agent creation with equipment, models, and system prompts |
| [Spaces & Workspaces](https://docs.teamday.ai/guides/spaces) | Configure project directories, files, and Git repos |
| [Skills](https://docs.teamday.ai/guides/skills) | Build and install reusable agent capabilities |
| [MCP Servers](https://docs.teamday.ai/guides/mcp-servers/what-are-mcp-servers) | Connect to external tools and services |
| [Missions](https://docs.teamday.ai/guides/missions-user-guide) | Schedule agents to run tasks automatically |
| [CLI Tool](https://docs.teamday.ai/guides/cli-tool) | Full command-line reference |

---

## Get Help

- **Support:** support at teamday.ai
- **Community:** [Discord](https://discord.com/invite/DbUyE6b4t5)
- **API Reference:** [/docs/api](https://docs.teamday.ai/api)
