mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-21 08:58:12 +00:00
Compare commits
2 Commits
docs/conve
...
docs/stop-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0650d1947c | ||
|
|
0e07dd0b1a |
13
.github/workflows/docs-broken-links.yml
vendored
13
.github/workflows/docs-broken-links.yml
vendored
@@ -4,13 +4,13 @@ on:
|
||||
pull_request:
|
||||
paths:
|
||||
- "docs/**"
|
||||
- "docs/docs.json"
|
||||
- "docs.json"
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "docs/**"
|
||||
- "docs/docs.json"
|
||||
- "docs.json"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
@@ -25,12 +25,11 @@ jobs:
|
||||
with:
|
||||
node-version: "22"
|
||||
|
||||
- name: Install libsecret for Mintlify CLI
|
||||
run: sudo apt-get update && sudo apt-get install -y libsecret-1-0
|
||||
|
||||
- name: Install Mintlify CLI
|
||||
run: npm install -g mint@latest
|
||||
run: npm i -g mintlify
|
||||
|
||||
- name: Run broken link checker
|
||||
run: |
|
||||
# Auto-answer the prompt with yes command
|
||||
yes "" | mintlify broken-links || test $? -eq 141
|
||||
working-directory: ./docs
|
||||
run: mint broken-links
|
||||
|
||||
8
docs/ar/api-reference/stop.mdx
Normal file
8
docs/ar/api-reference/stop.mdx
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
title: "POST /stop/{kickoff_id}"
|
||||
description: "إيقاف تنفيذ الطاقم الجاري"
|
||||
openapi: "/enterprise-api.en.yaml POST /stop/{kickoff_id}"
|
||||
mode: "wide"
|
||||
---
|
||||
|
||||
|
||||
@@ -495,7 +495,8 @@
|
||||
"en/api-reference/inputs",
|
||||
"en/api-reference/kickoff",
|
||||
"en/api-reference/resume",
|
||||
"en/api-reference/status"
|
||||
"en/api-reference/status",
|
||||
"en/api-reference/stop"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -964,7 +965,8 @@
|
||||
"en/api-reference/inputs",
|
||||
"en/api-reference/kickoff",
|
||||
"en/api-reference/resume",
|
||||
"en/api-reference/status"
|
||||
"en/api-reference/status",
|
||||
"en/api-reference/stop"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -1433,7 +1435,8 @@
|
||||
"en/api-reference/inputs",
|
||||
"en/api-reference/kickoff",
|
||||
"en/api-reference/resume",
|
||||
"en/api-reference/status"
|
||||
"en/api-reference/status",
|
||||
"en/api-reference/stop"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -1902,7 +1905,8 @@
|
||||
"en/api-reference/inputs",
|
||||
"en/api-reference/kickoff",
|
||||
"en/api-reference/resume",
|
||||
"en/api-reference/status"
|
||||
"en/api-reference/status",
|
||||
"en/api-reference/stop"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -2372,7 +2376,8 @@
|
||||
"en/api-reference/inputs",
|
||||
"en/api-reference/kickoff",
|
||||
"en/api-reference/resume",
|
||||
"en/api-reference/status"
|
||||
"en/api-reference/status",
|
||||
"en/api-reference/stop"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -2840,7 +2845,8 @@
|
||||
"en/api-reference/inputs",
|
||||
"en/api-reference/kickoff",
|
||||
"en/api-reference/resume",
|
||||
"en/api-reference/status"
|
||||
"en/api-reference/status",
|
||||
"en/api-reference/stop"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -3311,7 +3317,8 @@
|
||||
"en/api-reference/inputs",
|
||||
"en/api-reference/kickoff",
|
||||
"en/api-reference/resume",
|
||||
"en/api-reference/status"
|
||||
"en/api-reference/status",
|
||||
"en/api-reference/stop"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -3796,7 +3803,8 @@
|
||||
"pt-BR/api-reference/inputs",
|
||||
"pt-BR/api-reference/kickoff",
|
||||
"pt-BR/api-reference/resume",
|
||||
"pt-BR/api-reference/status"
|
||||
"pt-BR/api-reference/status",
|
||||
"pt-BR/api-reference/stop"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -4250,7 +4258,8 @@
|
||||
"pt-BR/api-reference/inputs",
|
||||
"pt-BR/api-reference/kickoff",
|
||||
"pt-BR/api-reference/resume",
|
||||
"pt-BR/api-reference/status"
|
||||
"pt-BR/api-reference/status",
|
||||
"pt-BR/api-reference/stop"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -4704,7 +4713,8 @@
|
||||
"pt-BR/api-reference/inputs",
|
||||
"pt-BR/api-reference/kickoff",
|
||||
"pt-BR/api-reference/resume",
|
||||
"pt-BR/api-reference/status"
|
||||
"pt-BR/api-reference/status",
|
||||
"pt-BR/api-reference/stop"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -5158,7 +5168,8 @@
|
||||
"pt-BR/api-reference/inputs",
|
||||
"pt-BR/api-reference/kickoff",
|
||||
"pt-BR/api-reference/resume",
|
||||
"pt-BR/api-reference/status"
|
||||
"pt-BR/api-reference/status",
|
||||
"pt-BR/api-reference/stop"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -5611,7 +5622,8 @@
|
||||
"pt-BR/api-reference/inputs",
|
||||
"pt-BR/api-reference/kickoff",
|
||||
"pt-BR/api-reference/resume",
|
||||
"pt-BR/api-reference/status"
|
||||
"pt-BR/api-reference/status",
|
||||
"pt-BR/api-reference/stop"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -6064,7 +6076,8 @@
|
||||
"pt-BR/api-reference/inputs",
|
||||
"pt-BR/api-reference/kickoff",
|
||||
"pt-BR/api-reference/resume",
|
||||
"pt-BR/api-reference/status"
|
||||
"pt-BR/api-reference/status",
|
||||
"pt-BR/api-reference/stop"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -6518,7 +6531,8 @@
|
||||
"pt-BR/api-reference/inputs",
|
||||
"pt-BR/api-reference/kickoff",
|
||||
"pt-BR/api-reference/resume",
|
||||
"pt-BR/api-reference/status"
|
||||
"pt-BR/api-reference/status",
|
||||
"pt-BR/api-reference/stop"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -7015,7 +7029,8 @@
|
||||
"ko/api-reference/inputs",
|
||||
"ko/api-reference/kickoff",
|
||||
"ko/api-reference/resume",
|
||||
"ko/api-reference/status"
|
||||
"ko/api-reference/status",
|
||||
"ko/api-reference/stop"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -7481,7 +7496,8 @@
|
||||
"ko/api-reference/inputs",
|
||||
"ko/api-reference/kickoff",
|
||||
"ko/api-reference/resume",
|
||||
"ko/api-reference/status"
|
||||
"ko/api-reference/status",
|
||||
"ko/api-reference/stop"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -7947,7 +7963,8 @@
|
||||
"ko/api-reference/inputs",
|
||||
"ko/api-reference/kickoff",
|
||||
"ko/api-reference/resume",
|
||||
"ko/api-reference/status"
|
||||
"ko/api-reference/status",
|
||||
"ko/api-reference/stop"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -8413,7 +8430,8 @@
|
||||
"ko/api-reference/inputs",
|
||||
"ko/api-reference/kickoff",
|
||||
"ko/api-reference/resume",
|
||||
"ko/api-reference/status"
|
||||
"ko/api-reference/status",
|
||||
"ko/api-reference/stop"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -8878,7 +8896,8 @@
|
||||
"ko/api-reference/inputs",
|
||||
"ko/api-reference/kickoff",
|
||||
"ko/api-reference/resume",
|
||||
"ko/api-reference/status"
|
||||
"ko/api-reference/status",
|
||||
"ko/api-reference/stop"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -9343,7 +9362,8 @@
|
||||
"ko/api-reference/inputs",
|
||||
"ko/api-reference/kickoff",
|
||||
"ko/api-reference/resume",
|
||||
"ko/api-reference/status"
|
||||
"ko/api-reference/status",
|
||||
"ko/api-reference/stop"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -9809,7 +9829,8 @@
|
||||
"ko/api-reference/inputs",
|
||||
"ko/api-reference/kickoff",
|
||||
"ko/api-reference/resume",
|
||||
"ko/api-reference/status"
|
||||
"ko/api-reference/status",
|
||||
"ko/api-reference/stop"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -10306,7 +10327,8 @@
|
||||
"ar/api-reference/inputs",
|
||||
"ar/api-reference/kickoff",
|
||||
"ar/api-reference/resume",
|
||||
"ar/api-reference/status"
|
||||
"ar/api-reference/status",
|
||||
"ar/api-reference/stop"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -10772,7 +10794,8 @@
|
||||
"ar/api-reference/inputs",
|
||||
"ar/api-reference/kickoff",
|
||||
"ar/api-reference/resume",
|
||||
"ar/api-reference/status"
|
||||
"ar/api-reference/status",
|
||||
"ar/api-reference/stop"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -11238,7 +11261,8 @@
|
||||
"ar/api-reference/inputs",
|
||||
"ar/api-reference/kickoff",
|
||||
"ar/api-reference/resume",
|
||||
"ar/api-reference/status"
|
||||
"ar/api-reference/status",
|
||||
"ar/api-reference/stop"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -11704,7 +11728,8 @@
|
||||
"ar/api-reference/inputs",
|
||||
"ar/api-reference/kickoff",
|
||||
"ar/api-reference/resume",
|
||||
"ar/api-reference/status"
|
||||
"ar/api-reference/status",
|
||||
"ar/api-reference/stop"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -12169,7 +12194,8 @@
|
||||
"ar/api-reference/inputs",
|
||||
"ar/api-reference/kickoff",
|
||||
"ar/api-reference/resume",
|
||||
"ar/api-reference/status"
|
||||
"ar/api-reference/status",
|
||||
"ar/api-reference/stop"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -12634,7 +12660,8 @@
|
||||
"ar/api-reference/inputs",
|
||||
"ar/api-reference/kickoff",
|
||||
"ar/api-reference/resume",
|
||||
"ar/api-reference/status"
|
||||
"ar/api-reference/status",
|
||||
"ar/api-reference/stop"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -13100,7 +13127,8 @@
|
||||
"ar/api-reference/inputs",
|
||||
"ar/api-reference/kickoff",
|
||||
"ar/api-reference/resume",
|
||||
"ar/api-reference/status"
|
||||
"ar/api-reference/status",
|
||||
"ar/api-reference/stop"
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
8
docs/en/api-reference/stop.mdx
Normal file
8
docs/en/api-reference/stop.mdx
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
title: "POST /stop/{kickoff_id}"
|
||||
description: "Stop a running crew execution"
|
||||
openapi: "/enterprise-api.en.yaml POST /stop/{kickoff_id}"
|
||||
mode: "wide"
|
||||
---
|
||||
|
||||
|
||||
@@ -572,176 +572,6 @@ The `third_method` and `fourth_method` listen to the output of the `second_metho
|
||||
|
||||
When you run this Flow, the output will change based on the random boolean value generated by the `start_method`.
|
||||
|
||||
### Conversational Flows (User Input)
|
||||
|
||||
The `self.ask()` method pauses flow execution to request input from a user inline, then returns their response as a string. This enables conversational, interactive flows where the AI can gather information, ask clarifying questions, or request approvals during execution.
|
||||
|
||||
#### Basic Usage
|
||||
|
||||
```python Code
|
||||
from crewai.flow.flow import Flow, start, listen
|
||||
|
||||
class GreetingFlow(Flow):
|
||||
@start()
|
||||
def greet(self):
|
||||
name = self.ask("What's your name?")
|
||||
self.state["name"] = name
|
||||
|
||||
@listen(greet)
|
||||
def welcome(self):
|
||||
print(f"Welcome, {self.state['name']}!")
|
||||
|
||||
flow = GreetingFlow()
|
||||
flow.kickoff()
|
||||
```
|
||||
|
||||
By default, `self.ask()` uses a `ConsoleProvider` that prompts via Python's built-in `input()`.
|
||||
|
||||
#### Multiple Asks in One Method
|
||||
|
||||
You can call `self.ask()` multiple times within a single method to gather several inputs:
|
||||
|
||||
```python Code
|
||||
from crewai.flow.flow import Flow, start
|
||||
|
||||
class OnboardingFlow(Flow):
|
||||
@start()
|
||||
def collect_info(self):
|
||||
name = self.ask("What's your name?")
|
||||
role = self.ask("What's your role?")
|
||||
team = self.ask("Which team are you joining?")
|
||||
self.state["profile"] = {"name": name, "role": role, "team": team}
|
||||
print(f"Welcome {name}, {role} on {team}!")
|
||||
|
||||
flow = OnboardingFlow()
|
||||
flow.kickoff()
|
||||
```
|
||||
|
||||
#### Timeout Support
|
||||
|
||||
Pass `timeout=` (in seconds) to avoid blocking indefinitely. If the user doesn't respond in time, `self.ask()` returns `None`:
|
||||
|
||||
```python Code
|
||||
from crewai.flow.flow import Flow, start
|
||||
|
||||
class ApprovalFlow(Flow):
|
||||
@start()
|
||||
def request_approval(self):
|
||||
response = self.ask("Approve deployment? (yes/no)", timeout=120)
|
||||
|
||||
if response is None:
|
||||
print("No response received — timed out.")
|
||||
self.state["approved"] = False
|
||||
return
|
||||
|
||||
self.state["approved"] = response.strip().lower() == "yes"
|
||||
```
|
||||
|
||||
Use a `while` loop to retry on timeout:
|
||||
|
||||
```python Code
|
||||
from crewai.flow.flow import Flow, start
|
||||
|
||||
class RetryFlow(Flow):
|
||||
@start()
|
||||
def ask_with_retry(self):
|
||||
answer = None
|
||||
while answer is None:
|
||||
answer = self.ask("Please confirm (yes/no):", timeout=60)
|
||||
if answer is None:
|
||||
print("Timed out, asking again...")
|
||||
self.state["confirmed"] = answer.strip().lower() == "yes"
|
||||
```
|
||||
|
||||
#### Metadata Support
|
||||
|
||||
The `metadata` parameter enables bidirectional context passing between the flow and the input provider. Send context to the provider, and receive structured context back:
|
||||
|
||||
```python Code
|
||||
from crewai.flow.flow import Flow, start
|
||||
|
||||
class ContextualFlow(Flow):
|
||||
@start()
|
||||
def gather_feedback(self):
|
||||
response = self.ask(
|
||||
"Rate this output (1-5):",
|
||||
metadata={
|
||||
"step": "quality_review",
|
||||
"output_id": "abc-123",
|
||||
"options": ["1", "2", "3", "4", "5"],
|
||||
},
|
||||
)
|
||||
self.state["rating"] = int(response) if response else None
|
||||
```
|
||||
|
||||
When a custom provider returns an `InputResponse`, it can include its own metadata (e.g., user identity, timestamp, channel info) that your flow can process.
|
||||
|
||||
#### Custom InputProvider
|
||||
|
||||
For production use cases (Slack bots, web UIs, webhooks), implement the `InputProvider` protocol:
|
||||
|
||||
```python Code
|
||||
from crewai.flow.flow import Flow, start
|
||||
from crewai.flow.input_provider import InputProvider, InputResponse
|
||||
import requests
|
||||
|
||||
class SlackInputProvider(InputProvider):
|
||||
def __init__(self, channel_id: str, bot_token: str):
|
||||
self.channel_id = channel_id
|
||||
self.bot_token = bot_token
|
||||
|
||||
def request_input(self, message, flow, metadata=None):
|
||||
# Post the question to Slack
|
||||
requests.post(
|
||||
"https://slack.com/api/chat.postMessage",
|
||||
headers={"Authorization": f"Bearer {self.bot_token}"},
|
||||
json={"channel": self.channel_id, "text": message},
|
||||
)
|
||||
# Wait for and return the user's reply (simplified)
|
||||
reply = self.poll_for_reply()
|
||||
return InputResponse(
|
||||
value=reply["text"],
|
||||
metadata={"user": reply["user"], "ts": reply["ts"]},
|
||||
)
|
||||
|
||||
def poll_for_reply(self):
|
||||
# Your implementation to wait for a Slack reply
|
||||
...
|
||||
|
||||
# Use the custom provider
|
||||
flow = Flow(input_provider=SlackInputProvider(
|
||||
channel_id="C01ABC123",
|
||||
bot_token="xoxb-...",
|
||||
))
|
||||
flow.kickoff()
|
||||
```
|
||||
|
||||
The `request_input` method can return:
|
||||
- A **string** — used directly as the user's response
|
||||
- An **`InputResponse`** — includes `value` (the response string) and optional `metadata`
|
||||
- **`None`** — treated as a timeout / no response
|
||||
|
||||
#### Auto-Checkpoint Behavior
|
||||
|
||||
<Note>
|
||||
When persistence is configured, the flow state is automatically saved **before** each `self.ask()` call. If the process restarts while waiting for input, the flow can resume from the checkpoint without losing progress.
|
||||
</Note>
|
||||
|
||||
#### `self.ask()` vs `@human_feedback`
|
||||
|
||||
| | `self.ask()` | `@human_feedback` |
|
||||
|---|---|---|
|
||||
| **Purpose** | Inline user input during execution | Approval gates and review feedback |
|
||||
| **Returns** | `str \| None` | `HumanFeedbackResult` with structured fields |
|
||||
| **Timeout** | Built-in `timeout=` parameter | Not built-in |
|
||||
| **Provider** | Pluggable `InputProvider` protocol | Console-based |
|
||||
| **Use when** | Gathering data, clarifications, confirmations | Review/approval workflows with structured feedback |
|
||||
| **Decorator** | None — call `self.ask()` anywhere | `@human_feedback` on the method |
|
||||
|
||||
<Note>
|
||||
Both features coexist — you can use `self.ask()` and `@human_feedback` in the same flow. Use `self.ask()` for inline data gathering and `@human_feedback` for structured review gates.
|
||||
</Note>
|
||||
|
||||
### Human in the Loop (human feedback)
|
||||
|
||||
<Note>
|
||||
|
||||
@@ -146,6 +146,36 @@ curl -X GET \
|
||||
https://your-crew-url.crewai.com/status/abcd1234-5678-90ef-ghij-klmnopqrstuv
|
||||
```
|
||||
|
||||
## Stopping a Running Execution
|
||||
|
||||
You can stop or cancel a running crew or flow execution at any time using the stop endpoint. This is useful when you need to abort a long-running execution or cancel one that is no longer needed.
|
||||
|
||||
### Stop an Execution
|
||||
|
||||
Send a POST request with the `kickoff_id` of the execution you want to stop:
|
||||
|
||||
```bash
|
||||
curl -X POST \
|
||||
-H "Authorization: Bearer YOUR_CREW_TOKEN" \
|
||||
https://your-crew-url.crewai.com/stop/abcd1234-5678-90ef-ghij-klmnopqrstuv
|
||||
```
|
||||
|
||||
**Success Response:**
|
||||
|
||||
```json
|
||||
{"status": "stopped", "kickoffId": "abcd1234-5678-90ef-ghij-klmnopqrstuv"}
|
||||
```
|
||||
|
||||
**Error Response** (when the execution has already finished):
|
||||
|
||||
```json
|
||||
{"detail": "Cannot stop execution. Current state: SUCCESS"}
|
||||
```
|
||||
|
||||
<Note>
|
||||
You cannot stop executions that have already completed (`SUCCESS`), failed (`FAILURE`), or been revoked (`REVOKED`). The API returns a `400` status code in those cases.
|
||||
</Note>
|
||||
|
||||
## Handling Executions
|
||||
|
||||
### Long-Running Executions
|
||||
|
||||
@@ -36,6 +36,7 @@ info:
|
||||
1. **Discover inputs** using `GET /inputs`
|
||||
2. **Start execution** using `POST /kickoff`
|
||||
3. **Monitor progress** using `GET /{kickoff_id}/status`
|
||||
4. **Stop execution** (if needed) using `POST /stop/{kickoff_id}`
|
||||
version: 1.0.0
|
||||
contact:
|
||||
name: CrewAI Support
|
||||
@@ -284,6 +285,56 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServerError"
|
||||
|
||||
/stop/{kickoff_id}:
|
||||
post:
|
||||
summary: Stop Crew Execution
|
||||
description: |
|
||||
**📋 Reference Example Only** - *This shows the request format. To test with your actual crew, copy the cURL example and replace the URL + token with your real values.*
|
||||
|
||||
Stops or cancels a running crew or flow execution. The execution must be in an active state
|
||||
(not SUCCESS, FAILURE, or REVOKED).
|
||||
operationId: stopCrewExecution
|
||||
parameters:
|
||||
- name: kickoff_id
|
||||
in: path
|
||||
required: true
|
||||
description: The kickoff ID of the execution to stop
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
example: "abcd1234-5678-90ef-ghij-klmnopqrstuv"
|
||||
responses:
|
||||
"200":
|
||||
description: Successfully stopped the execution
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/StopExecutionResponse"
|
||||
example:
|
||||
status: "stopped"
|
||||
kickoffId: "abcd1234-5678-90ef-ghij-klmnopqrstuv"
|
||||
"400":
|
||||
description: Execution is already in a terminal state (SUCCESS, FAILURE, or REVOKED)
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
example:
|
||||
detail: "Cannot stop execution. Current state: SUCCESS"
|
||||
"401":
|
||||
$ref: "#/components/responses/UnauthorizedError"
|
||||
"404":
|
||||
description: Kickoff ID not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
example:
|
||||
error: "Execution not found"
|
||||
message: "No execution found with ID: abcd1234-5678-90ef-ghij-klmnopqrstuv"
|
||||
"500":
|
||||
$ref: "#/components/responses/ServerError"
|
||||
|
||||
/resume:
|
||||
post:
|
||||
summary: Resume Crew Execution with Human Feedback
|
||||
@@ -508,6 +559,19 @@ components:
|
||||
description: Time taken to execute this task in seconds
|
||||
example: 45.2
|
||||
|
||||
StopExecutionResponse:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
type: string
|
||||
enum: ["stopped"]
|
||||
description: Indicates the execution was successfully stopped
|
||||
example: "stopped"
|
||||
kickoffId:
|
||||
type: string
|
||||
description: The kickoff ID of the stopped execution
|
||||
example: "abcd1234-5678-90ef-ghij-klmnopqrstuv"
|
||||
|
||||
Error:
|
||||
type: object
|
||||
properties:
|
||||
|
||||
@@ -36,6 +36,7 @@ info:
|
||||
1. **Discover inputs** using `GET /inputs`
|
||||
2. **Start execution** using `POST /kickoff`
|
||||
3. **Monitor progress** using `GET /{kickoff_id}/status`
|
||||
4. **Stop execution** (if needed) using `POST /stop/{kickoff_id}`
|
||||
version: 1.0.0
|
||||
contact:
|
||||
name: CrewAI Support
|
||||
@@ -284,6 +285,56 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServerError"
|
||||
|
||||
/stop/{kickoff_id}:
|
||||
post:
|
||||
summary: Stop Crew Execution
|
||||
description: |
|
||||
**📋 Reference Example Only** - *This shows the request format. To test with your actual crew, copy the cURL example and replace the URL + token with your real values.*
|
||||
|
||||
Stops or cancels a running crew or flow execution. The execution must be in an active state
|
||||
(not SUCCESS, FAILURE, or REVOKED).
|
||||
operationId: stopCrewExecution
|
||||
parameters:
|
||||
- name: kickoff_id
|
||||
in: path
|
||||
required: true
|
||||
description: The kickoff ID of the execution to stop
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
example: "abcd1234-5678-90ef-ghij-klmnopqrstuv"
|
||||
responses:
|
||||
"200":
|
||||
description: Successfully stopped the execution
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/StopExecutionResponse"
|
||||
example:
|
||||
status: "stopped"
|
||||
kickoffId: "abcd1234-5678-90ef-ghij-klmnopqrstuv"
|
||||
"400":
|
||||
description: Execution is already in a terminal state (SUCCESS, FAILURE, or REVOKED)
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
example:
|
||||
detail: "Cannot stop execution. Current state: SUCCESS"
|
||||
"401":
|
||||
$ref: "#/components/responses/UnauthorizedError"
|
||||
"404":
|
||||
description: Kickoff ID not found
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
example:
|
||||
error: "Execution not found"
|
||||
message: "No execution found with ID: abcd1234-5678-90ef-ghij-klmnopqrstuv"
|
||||
"500":
|
||||
$ref: "#/components/responses/ServerError"
|
||||
|
||||
/resume:
|
||||
post:
|
||||
summary: Resume Crew Execution with Human Feedback
|
||||
@@ -508,6 +559,19 @@ components:
|
||||
description: Time taken to execute this task in seconds
|
||||
example: 45.2
|
||||
|
||||
StopExecutionResponse:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
type: string
|
||||
enum: ["stopped"]
|
||||
description: Indicates the execution was successfully stopped
|
||||
example: "stopped"
|
||||
kickoffId:
|
||||
type: string
|
||||
description: The kickoff ID of the stopped execution
|
||||
example: "abcd1234-5678-90ef-ghij-klmnopqrstuv"
|
||||
|
||||
Error:
|
||||
type: object
|
||||
properties:
|
||||
|
||||
@@ -120,6 +120,46 @@ paths:
|
||||
'500':
|
||||
$ref: '#/components/responses/ServerError'
|
||||
|
||||
/stop/{kickoff_id}:
|
||||
post:
|
||||
summary: 실행 중지
|
||||
description: |
|
||||
**📋 참조 예제만 제공** - *요청 형식을 보여줍니다. 실제 호출은 cURL 예제를 복사해 URL과 토큰을 교체하세요.*
|
||||
|
||||
실행 중인 crew 또는 flow 실행을 중지하거나 취소합니다. 실행이 활성 상태여야 합니다
|
||||
(SUCCESS, FAILURE, REVOKED 상태가 아닌 경우).
|
||||
operationId: stopCrewExecution
|
||||
parameters:
|
||||
- name: kickoff_id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
responses:
|
||||
'200':
|
||||
description: 실행을 성공적으로 중지
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/StopExecutionResponse'
|
||||
'400':
|
||||
description: 실행이 이미 종료 상태 (SUCCESS, FAILURE, REVOKED)
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
'401':
|
||||
$ref: '#/components/responses/UnauthorizedError'
|
||||
'404':
|
||||
description: Kickoff ID를 찾을 수 없음
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/Error'
|
||||
'500':
|
||||
$ref: '#/components/responses/ServerError'
|
||||
|
||||
/resume:
|
||||
post:
|
||||
summary: Resume Crew Execution with Human Feedback
|
||||
@@ -314,6 +354,15 @@ components:
|
||||
execution_time:
|
||||
type: number
|
||||
|
||||
StopExecutionResponse:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
type: string
|
||||
enum: ["stopped"]
|
||||
kickoffId:
|
||||
type: string
|
||||
|
||||
Error:
|
||||
type: object
|
||||
properties:
|
||||
|
||||
@@ -36,6 +36,7 @@ info:
|
||||
1. **Descubra os inputs** usando `GET /inputs`
|
||||
2. **Inicie a execução** usando `POST /kickoff`
|
||||
3. **Monitore o progresso** usando `GET /{kickoff_id}/status`
|
||||
4. **Pare a execução** (se necessário) usando `POST /stop/{kickoff_id}`
|
||||
version: 1.0.0
|
||||
contact:
|
||||
name: CrewAI Suporte
|
||||
@@ -156,6 +157,46 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/ServerError"
|
||||
|
||||
/stop/{kickoff_id}:
|
||||
post:
|
||||
summary: Parar Execução da Crew
|
||||
description: |
|
||||
**📋 Exemplo de Referência** - *Mostra o formato da requisição. Para testar com sua crew real, copie o cURL e substitua URL + token.*
|
||||
|
||||
Para ou cancela uma execução de crew ou flow em andamento. A execução deve estar em um estado ativo
|
||||
(não SUCCESS, FAILURE ou REVOKED).
|
||||
operationId: stopCrewExecution
|
||||
parameters:
|
||||
- name: kickoff_id
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
format: uuid
|
||||
responses:
|
||||
"200":
|
||||
description: Execução parada com sucesso
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/StopExecutionResponse"
|
||||
"400":
|
||||
description: Execução já em estado terminal (SUCCESS, FAILURE ou REVOKED)
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
"401":
|
||||
$ref: "#/components/responses/UnauthorizedError"
|
||||
"404":
|
||||
description: Kickoff ID não encontrado
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
"500":
|
||||
$ref: "#/components/responses/ServerError"
|
||||
|
||||
/resume:
|
||||
post:
|
||||
summary: Resume Crew Execution with Human Feedback
|
||||
@@ -351,6 +392,15 @@ components:
|
||||
execution_time:
|
||||
type: number
|
||||
|
||||
StopExecutionResponse:
|
||||
type: object
|
||||
properties:
|
||||
status:
|
||||
type: string
|
||||
enum: ["stopped"]
|
||||
kickoffId:
|
||||
type: string
|
||||
|
||||
Error:
|
||||
type: object
|
||||
properties:
|
||||
|
||||
8
docs/ko/api-reference/stop.mdx
Normal file
8
docs/ko/api-reference/stop.mdx
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
title: "POST /stop/{kickoff_id}"
|
||||
description: "실행 중인 크루 실행 중지"
|
||||
openapi: "/enterprise-api.ko.yaml POST /stop/{kickoff_id}"
|
||||
mode: "wide"
|
||||
---
|
||||
|
||||
|
||||
8
docs/pt-BR/api-reference/stop.mdx
Normal file
8
docs/pt-BR/api-reference/stop.mdx
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
title: "POST /stop/{kickoff_id}"
|
||||
description: "Parar uma execução de crew em andamento"
|
||||
openapi: "/enterprise-api.pt-BR.yaml POST /stop/{kickoff_id}"
|
||||
mode: "wide"
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user