Missions - User Guide
Schedule AI agents to run work automatically — daily reports, weekly audits, cron jobs, and manual mission tasks.
Missions
Missions are scheduled AI tasks. Set up a mission, assign it to an agent, and it runs automatically on your schedule.
Use missions for recurring work: daily reports, weekly SEO audits, content publishing, data monitoring, and more. Missions appear in the org sidebar and are global — not tied to a specific space.
Core Concepts
| Concept | Description |
|---|---|
| Mission | A named recurring or manually started work stream |
| Description | What the mission is for and what good output looks like |
| Schedule | When to run: manual or cron |
| Agent | Optional — runs the mission with this agent's role, model, skills, and MCP server access |
| Workspace | Optional — gives the mission access to workspace files, MCP servers, secrets, and context |
| Task | A concrete mission item that can be started as work |
Schedule Types
| Type | Description | Example |
|---|---|---|
| Manual | No cron schedule. Start mission tasks when needed | One-time setup task |
| Cron | Recurring server-side schedule | 0 9 * * MON (Mondays at 9am) |
Cron Examples
| Cron Expression | Description |
|---|---|
0 9 * * * | Every day at 9:00 AM |
0 9 * * MON | Every Monday at 9:00 AM |
0 9 * * 1-5 | Weekdays at 9:00 AM |
0 */6 * * * | Every 6 hours |
0 9 1 * * | First of every month at 9:00 AM |
Execution Model
Missions run via a job queue powered by BullMQ with Redis:
- 3 concurrent workers process missions in parallel
- Automatic retry: 2 attempts with exponential backoff on failure
- Stalled job detection: jobs that stop responding are recovered automatically
- Status flow:
pending->running->completed/failed
Mission results create chat entries visible in the space (if a space is assigned). Mission runs use the mission's assigned workspace when one is set.
Create a Mission
Via Web App
- Navigate to the Missions section in the sidebar
- Click + New Mission
- Configure:
- Title: "Weekly SEO Report"
- Goal: "Analyze this week's search performance. Compare to last week. Send the summary."
- Schedule: Cron —
0 9 * * MON - Agent: Select "Sarah" (optional)
- Space: Select your SEO workspace (optional)
- Max Turns: 100 (optional)
- Team: auto (optional — controls subagent delegation)
- Save
Via CLI
teamday missions create \
--title "Weekly SEO Report" \
--description "Analyze this week's search performance, compare to last week, and summarize the findings." \
--schedule-cron "0 9 * * MON" \
--schedule-timezone "Europe/Bratislava" \
--agent-id <agent-id> \
--workspace-id <workspace-id> \
--task-title "Prepare this week's SEO report"Discover the current CLI contract:
teamday missions create --help
teamday missions start --helpVia API
curl -X POST "https://app.teamday.ai/api/missions" \
-H "Authorization: Bearer $TEAMDAY_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Weekly SEO Report",
"description": "Analyze this week search performance, compare to last week, and summarize the findings.",
"workspace_id": "workspace-abc123",
"agent_id": "agent-sarah-id",
"schedule_cron": "0 9 * * MON",
"schedule_timezone": "Europe/Bratislava",
"initial_task": {
"title": "Prepare this week's SEO report"
}
}'Response:
{
"mission": {
"id": "mission-xyz789",
"title": "Weekly SEO Report",
"status": "planning",
"schedule_cron": "0 9 * * MON",
"schedule_timezone": "Europe/Bratislava"
}
}Mission Examples
Daily Data Summary
{
"title": "Daily Analytics Summary",
"description": "Pull yesterday's Google Analytics data. Report total visitors, top 5 pages, and bounce-rate change. Save to reports/daily/.",
"schedule_cron": "0 8 * * *",
"schedule_timezone": "Europe/Bratislava"
}Weekly Content Audit
{
"title": "Weekly Content Audit",
"description": "Check all blog posts published this week for SEO compliance. Verify meta descriptions, image alt text, and internal links. Report any issues.",
"schedule_cron": "0 17 * * FRI",
"schedule_timezone": "Europe/Bratislava"
}One-Time Setup
{
"title": "Initial SEO Baseline",
"description": "Run a comprehensive SEO audit of example.com. Document current rankings, backlinks, and technical issues. Save the baseline report to reports/."
}Managing Missions
Update a Mission
Pause, change the schedule, or update the description:
curl -X PATCH "https://app.teamday.ai/api/missions/mission-xyz789" \
-H "Authorization: Bearer $TEAMDAY_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"status": "paused",
"schedule_cron": "0 9 * * 1-5",
"schedule_timezone": "Europe/Bratislava"
}'Mission Statuses
| Status | Description |
|---|---|
pending | Created, waiting for first scheduled run |
running | Currently executing |
completed | Finished successfully (one-time missions) |
failed | Execution failed (will retry if attempts remain) |
paused | Temporarily stopped by user |
Session Continuity
Missions support session continuity via the resumeSession flag. When enabled, each run resumes from the previous session's context using the stored lastSessionId, maintaining conversation history across runs.
This is useful for missions that build on previous results — like weekly reports that compare to last week, or monitoring tasks that track changes over time.
Agents and Missions
Binding an agent to a mission means:
- The mission runs with the agent's system prompt (
systemPrompt) - It uses the agent's model preference
- It has access to the agent's skills and MCP server references
If no agent is bound, the mission runs with default settings.
Best Practice
Create dedicated agents for mission types:
teamday agents create \
--name "Report Bot" \
--role "Automated Reporting" \
--system-prompt "You generate daily and weekly reports. Be concise. Use tables. Save reports to the reports/ directory with dated filenames."Then bind it to multiple missions:
{"title": "Daily Sales Report", "agent_id": "report-bot-id", "schedule_cron": "0 8 * * *"}
{"title": "Weekly Performance Review", "agent_id": "report-bot-id", "schedule_cron": "0 9 * * MON"}Writing Good Mission Descriptions
The mission description and task title are the instruction frame the agent receives. Write them like you'd brief a human colleague:
Vague (bad):
Check the website.Specific (good):
Check example.com for broken links, missing meta descriptions, and pages with no H1 tag.
Save the results to reports/site-audit-{date}.md.
If critical issues are found, create a summary at the top.Key tips:
- State the objective clearly
- Specify output format and location
- Include thresholds or criteria when relevant
- Mention what to do with the results
Next Steps
- Missions API Guide — Full API reference for mission management
- Spaces & Workspaces — Set up the workspace for mission execution
- MCP Plugins — Connect external tools for mission use