Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions .github/workflows/notify-downstream.yml

This file was deleted.

4 changes: 2 additions & 2 deletions docs/en/concepts/tasks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ crew = Crew(
## Task Attributes

| Attribute | Parameters | Type | Description |
| :------------------------------------- | :---------------------- | :-------------------------- | :-------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| :------------------------------------- | :---------------------- | :-------------------------- | :-------------------------------------------------------------------------------------------------------------- |
| **Description** | `description` | `str` | A clear, concise statement of what the task entails. |
| **Expected Output** | `expected_output` | `str` | A detailed description of what the task's completion looks like. |
| **Name** _(optional)_ | `name` | `Optional[str]` | A name identifier for the task. |
Expand All @@ -63,7 +63,7 @@ crew = Crew(
| **Output Pydantic** _(optional)_ | `output_pydantic` | `Optional[Type[BaseModel]]` | A Pydantic model for task output. |
| **Callback** _(optional)_ | `callback` | `Optional[Any]` | Function/object to be executed after task completion. |
| **Guardrail** _(optional)_ | `guardrail` | `Optional[Callable]` | Function to validate task output before proceeding to next task. |
| **Guardrails** _(optional)_ | `guardrails` | `Optional[List[Callable] | List[str]]` | List of guardrails to validate task output before proceeding to next task. |
| **Guardrails** _(optional)_ | `guardrails` | `Optional[List[Callable]]` | List of guardrails to validate task output before proceeding to next task. |
| **Guardrail Max Retries** _(optional)_ | `guardrail_max_retries` | `Optional[int]` | Maximum number of retries when guardrail validation fails. Defaults to 3. |

<Note type="warning" title="Deprecated: max_retries">
Expand Down
23 changes: 23 additions & 0 deletions docs/en/tools/database-data/nl2sqltool.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,29 @@ Along with that provides the ability for the Agent to update the database based

**Attention**: Make sure that the Agent has access to a Read-Replica or that is okay for the Agent to run insert/update queries on the database.

## Security Model

`NL2SQLTool` is an execution-capable tool. It runs model-generated SQL directly against the configured database connection.

This means risk depends on your deployment choices:

- Which credentials you provide in `db_uri`
- Whether untrusted input can influence prompts
- Whether you add tool-call guardrails before execution

If you route untrusted input to agents using this tool, treat it as a high-risk integration.

## Hardening Recommendations

Use all of the following in production:

- Use a read-only database user whenever possible
- Prefer a read replica for analytics/retrieval workloads
- Grant least privilege (no superuser/admin roles, no file/system-level capabilities)
- Apply database-side resource limits (statement timeout, lock timeout, cost/row limits)
- Add `before_tool_call` hooks to enforce allowed query patterns
- Enable query logging and alerting for destructive statements

## Requirements

- SqlAlchemy
Expand Down
23 changes: 23 additions & 0 deletions lib/crewai-tools/src/crewai_tools/tools/nl2sql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,29 @@ This enables multiple workflows like having an Agent to access the database fetc

**Attention**: Make sure that the Agent has access to a Read-Replica or that is okay for the Agent to run insert/update queries on the database.

## Security Model

`NL2SQLTool` is an execution-capable tool. It runs model-generated SQL directly against the configured database connection.

Risk depends on deployment choices:

- Which credentials are used in `db_uri`
- Whether untrusted input can influence prompts
- Whether tool-call guardrails are enforced before execution

If untrusted input can reach this tool, treat the integration as high risk.

## Hardening Recommendations

Use all of the following in production:

- Use a read-only database user whenever possible
- Prefer a read replica for analytics/retrieval workloads
- Grant least privilege (no superuser/admin roles, no file/system-level capabilities)
- Apply database-side resource limits (statement timeout, lock timeout, cost/row limits)
- Add `before_tool_call` hooks to enforce allowed query patterns
- Enable query logging and alerting for destructive statements

## Requirements

- SqlAlchemy
Expand Down
Loading