---
title: "Create a delegated task in a workspace"
method: POST
path: "/api/workspaces/{wid}/tasks"
tags: ["Agent"]
---

# Create a delegated task in a workspace

`POST /api/workspaces/{wid}/tasks`

## Path parameters

- `wid` string, required

## Request body

- AgentTaskCreateRequest
  - `delegation_chain` string[]
  - `max_budget_usd` number
  - `max_turns` integer
  - `prompt` string, required
  - `requester_id` string
  - `skill` string
  - `system_context` string
  - `target_id` string, required
  - `timeout_seconds` integer

## Response `201`

Created

- AgentTaskCreateResponse
  - `session_id` string
  - `status` string, required
  - `task_id` string, required

## Other responses

- `400` — bad request
- `401` — unauthorized
- `403` — forbidden
- `404` — target agent not found
- `500` — internal error

## Changes

> 20 revisions in range; 1 could not be searched.

- **2026-05-22** `5599b083b4ea` — 1 info
  - endpoint added
- **2026-05-22** `1ba39f384b63` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/agentserver/apis/agentserver-api/changes/api/workspaces/:wid/tasks/post.md)

---

[API](https://skmtc.dev/agentserver/apis/agentserver-api.md) · [All operations](https://skmtc.dev/agentserver/apis/agentserver-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/agentserver/agentserver-api/revisions/e8c329825b4e/schema)
