Compare commits

...

386 Commits

Author SHA1 Message Date
João Moura
3932d3fea6 [docs-freeze] docs: snapshot and changelog for v1.15.10 (#6756) 2026-07-31 14:57:21 +00:00
João Moura
f262ac214e feat: bump versions to 1.15.10 (#6753) 2026-07-31 14:45:28 +00:00
João Moura
ebe0082aca feat(tracing): collect skill usage events (#6727)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
* feat(tracing): collect skill usage events

PR #6652 added SkillUsedEvent but deliberately shipped no listener wiring,
so the event reached no collector. The trace listener subscribed to the five
setup events -- discovery, load, activation, failure -- and none of them can
answer the question skills observability is for: activation is idempotent and
fires once at setup, so an agent using a skill across twenty turns produces
exactly one event.

SkillUsedEvent is the only runtime signal and the only one that re-fires per
execution. Subscribing to it lets a trace attribute skill usage to an agent
and a task.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(tests): scope the trace-listener handlers, assert the forwarded event

CrewAIEventsBus is a singleton, so constructing one in the fixture still
registered against the process-wide bus. _register_action_event_handlers
attached every action handler with no cleanup, leaving them live after the
patch ended -- firing against a listener built with __new__, which has no
batch_manager, in whatever test ran next. scoped_handlers clears them.

Also assert the event object itself is forwarded, not just its type: the
collector serializes the event, so dropping or replacing it would lose every
attribution field while still passing a type-only check.

Both raised in review on #6727.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* test: assert the forwarded skill event by identity

Comparing field values would still pass if a handler forwarded a
reconstructed copy rather than the event itself. Bind the event and assert
`forwarded is event`.

Raised in review on #6727.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-30 18:17:13 +00:00
Gui Vieira
3266932f00 [COR-636] Remove migrated AMP documentation (#6730) 2026-07-30 13:14:34 -03:00
Rip&Tear
ceed4a3ff7 Update security reporting guidelines (#6728) 2026-07-30 21:46:28 +08:00
João Moura
112762a7fa [docs-freeze] docs: snapshot and changelog for v1.15.9 (#6726)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2026-07-30 05:45:17 +00:00
João Moura
bfe8df4471 feat: bump versions to 1.15.9 (#6725) 2026-07-29 22:40:32 -07:00
João Moura
453676c61a feat(tools): surface tool failures instead of reporting them as success (#6712)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
* feat(tools): surface tool failures instead of reporting them as success

A tool can finish without raising and still fail to do what it was asked.
Slack answers HTTP 200 with `{"ok": false, "error": "channel_not_found"}`;
an MCP server sets `isError`; a CrewAI AMP action returns
`API request failed: ...`. In every case the call "worked", so the error
text reached the agent as an ordinary result, the agent narrated the
problem in prose, and the run was recorded as a success.

Concretely: five failed `slackbot_send_message` calls each rendered as
"Tool Execution Completed", the task passed, and the crew passed -- with
the only evidence being a sentence in the final answer. Nothing
downstream could tell the difference, and an agent that keeps going on a
step that silently did nothing builds the rest of its work on it.

Give that outcome a type and a reaction:

- `ToolFailure` -- what a tool returns instead of an error string. The
  agent still reads prose via `as_agent_message()`, so model behavior is
  unchanged; the framework now knows the call failed.
- `ToolFailurePolicy` -- `ignore` (previous behavior), `warn` (default:
  record + emit, keep going), `raise` (abort with
  `ToolExecutionFailedError`). Resolved most-specific-first: tool, task,
  agent, crew.
- `ToolFailureDetectedEvent` -- emitted before a `raise` aborts, so
  subscribers always observe the failure. `ToolUsageFinishedEvent` also
  carries a `failure` field so a trace UI can mark the call failed
  without correlating two events.
- `tool_failures` on `TaskOutput`, `CrewOutput` and `LiteAgentOutput`,
  plus `has_tool_failures`, so consumers never parse a string.

Detection is strictly declarative -- no string sniffing, so a tool that
legitimately returns text about an error is never misread as failing.
Failures come from a returned `ToolFailure`, a raised exception, MCP
`isError`, a spent `max_usage_count`, or an unknown tool.

Wired into all four tool-execution paths (the ReAct path and the three
native function-calling implementations). Sources updated to report
structurally: `MCPClient.call_tool_result()` preserves `isError` that
`call_tool()` dropped, and `CrewAIPlatformActionTool` returns a
`ToolFailure` for non-2xx and for caught exceptions.

Two latent bugs fixed along the way: `ToolUsage` assumed every agent has
a `fingerprint` (LiteAgent does not), and policy resolution now tolerates
malformed values rather than letting telemetry take down a tool call.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ETacm2dMASfpMAYUiDu5YG

* fix(tools): address review round 1 on tool-failure signalling

Five real defects from Bugbot, none of them cosmetic.

Tool-scoped policy never applied (high). `resolve_tool_failure_policy`
read `tool_failure_policy` off the object handed to it, but every
execution path passes the `CrewStructuredTool` wrapper, which never
carried the attribute -- and `BaseTool` never declared it in the first
place. A tool-scoped `raise`/`ignore` was silently ignored while the
docs and a unit test claimed otherwise; the test passed only because it
called the resolver directly with an authored tool. Declared the field on
`BaseTool`, propagated it through `to_structured_tool()` and
`CrewStructuredTool`, and made resolution fall back through
`_original_tool` so either shape works.

A failed call still printed the green "Completed" panel, then the red
one. That is the terminal version of the exact bug this PR is about.
Suppressed the success panel when the call reported failure.

A raised tool printed twice: `ToolUsageErrorEvent` already renders a red
panel, and the new failure panel repeated it. The event is still emitted
-- policy and traces need it -- but the duplicate console output is gone.
Both decisions now live in named predicates on `ConsoleFormatter` rather
than inline in the listener closure, so they are directly testable.

Unknown tools were reported on the ReAct path but silently ignored on all
three native paths, so the same miss was loud or silent depending on
executor style. Native paths now record `UNKNOWN_TOOL` too. This also
surfaced a live `NameError`: ruff had pruned `ToolFailureReason` from
`agent_utils` as unused, so the new branch would have crashed at runtime.

`LiteAgentOutput` had `tool_failures` but not `has_tool_failures`, which
the PR promised on all three output types -- an `AttributeError` for any
caller sharing one check across result types.

Testing: 16 further tests, 45 total. Two console tests were passing
vacuously because `emit()` dispatches sync handlers on a thread pool, so
the assertions raced the handler; they now assert on the predicates
directly, and the native-path test drains the bus with `flush()` and
checks the synchronously-written record. Full suite still matches
baseline exactly at 377 pre-existing failures.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ETacm2dMASfpMAYUiDu5YG

* chore: update tool specifications

* fix(tools): address review round 2 and fix CI type failure

CI caught a type error I should have: widening `agent` to accept a
`LiteAgent` (so a standalone LiteAgent resolves its own policy) left the
declared signatures behind. Widened `execute_tool_and_check_finality`,
its async twin, and `ToolCallHookContext` to `Agent | BaseAgent |
LiteAgent | None`, which is what those actually receive now.

Seven CodeRabbit findings, all verified against the code first:

`raise` was being downgraded by three enclosing handlers. With
`max_execution_time` set, `_execute_with_timeout` wrapped every exception
in `RuntimeError`, so `_check_execution_error` no longer recognized the
passthrough and sent the task through the retry loop instead of aborting.
`StepExecutor.execute` turned it into `StepResult(success=False)` and let
the plan continue. `LiteAgent.kickoff` ran it through
`handle_unknown_error` and printed "This is likely a bug - please report
it" for what is a deliberate, configured stop.

Failure records were dropped on two paths. `reset_tool_failures()` only
ran in `_prepare_task_execution`, so `Agent.kickoff()` / `kickoff_async()`
— which enter through `_prepare_kickoff` — accumulated records across
runs. And a guardrail retry calls `execute_task` again, which resets the
agent, so a tool that failed on a blocked attempt vanished from the final
output entirely: a run could report zero failures having demonstrably
failed one. Failures now accumulate across guardrail attempts.

Writing the tests for that surfaced a further miss of my own:
`Agent.kickoff()` builds its `LiteAgentOutput` in `agent/core.py` via
`AgentExecutor`, not through `LiteAgent`, so `tool_failures` was always
empty there regardless of the recording fix. Wired up, and the LiteAgent
path now reads from whichever agent the executor was handed
(`original_agent` under kickoff, `self` standalone) rather than assuming.

`last_tool_failures` returns a copy, so a caller cannot mutate the
agent's record or watch it shift mid-run.

Testing: 7 further tests, 52 total, covering the timeout wrapper, the
retry limit, kickoff reset, the kickoff output path, copy semantics and
guardrail accumulation. Full suite matches baseline exactly at 377
pre-existing failures; mypy clean on every changed file.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ETacm2dMASfpMAYUiDu5YG

* fix(tools): make crew-scoped policy real and close the last raise leak

Two findings, and the first was a documented feature that never worked.

`resolve_tool_failure_policy` consulted a crew, and the docs advertised
crew as a scope, but `Crew` had no `tool_failure_policy` field at all --
and even with one it was unreachable, because `BaseAgent` defaulted the
policy to `WARN` rather than `None`, so resolution always stopped at the
agent. Crew-level configuration was silently ignored.

Fixed by making "inherit" the default everywhere instead of baking `warn`
into one layer: `Crew` gains the field, and `BaseAgent`/`LiteAgent`
default to `None` like `Task` and `BaseTool` already did. The resolver
owns the single fallback, so the chain is genuinely
tool > task > agent > crew > warn and the effective default with nothing
configured is still `warn`. Reading `agent.tool_failure_policy` now
returns `None` (meaning "inherit") rather than `WARN`.

The other: `StepExecutor` re-raised `ToolExecutionFailedError` from its
outer handler, but the nested handler around the native-to-text tooling
fallback still caught it and returned `StepResult(success=False)`. An
agent whose LLM lacked native tool calling would therefore not abort
under `raise`. That is the third distinct place this exception was being
downgraded; it now re-raises there too.

Testing: 8 further tests, 60 total, including the full precedence chain
walked one level at a time and crew-scoped `raise`/`ignore` driven
end-to-end through `kickoff()` rather than only through the resolver --
the gap that let the original crew bug pass review. Full suite matches
baseline exactly at 377 pre-existing failures; mypy clean on every
changed file.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ETacm2dMASfpMAYUiDu5YG

* docs: trim comments and docstrings on tool-failure signalling

Prose only -- no behavior change. Cut the module docstring, the longer
class and method docstrings, the multi-line inline comments, and the
verbose Field descriptions down to what actually earns its place. Net 87
lines lighter.

Kept the "why" in every case where the reason is non-obvious (why the
event fires before a raise, why the policy reads through the tool wrapper,
why the bus needs draining in tests) and dropped the restatements of what
the code already says.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ETacm2dMASfpMAYUiDu5YG

* fix(tools): make ignore truly silent, stop caching failures, close 4 gaps

Six findings from the latest review round, all verified against the code
before touching it.

`ignore` was not silent. `ToolUsageFinishedEvent.failure` was set before
the policy ran, so traces still saw a failed call under a policy documented
as surfacing nothing. Worse, the console then showed *no* panel at all:
green was suppressed because `failure` was present, red was skipped because
`ignore` never emits `ToolFailureDetectedEvent`. New `reportable_failure()`
resolves the policy before the finished event and drops the flag under
`ignore`; wired into all four execution paths.

Failures were being cached. `CacheHandler.add` stored a `ToolFailure` like
any other result, so a transient error became permanent for the rest of the
run and every later hit re-reported a call that never re-ran. The cache now
refuses to store declared failures -- fixed at the single choke point rather
than at each of the four call sites.

A spent `max_usage_count` was invisible on the shared native path.
`BaseTool._claim_usage` returned a bare string that only the executors
recognising that exact message treated as a failure. It now returns a
`ToolFailure` with `USAGE_LIMIT`, so every path records it.

A guardrail returning a whole `TaskOutput` replaced the output without
carrying accumulated failures over, so earlier attempts vanished from
`CrewOutput.tool_failures`. New `merge_tool_failures()` combines and
deduplicates, and the retry-rebuild path uses it too.

A hook-blocked call inherited a cached failure and attributed it to a call
that never ran. Now cleared. Not reachable through the built-in cache once
failures stop being cached, so the test injects a custom cache handler that
does retain them -- verified to fail without the guard.

Also removed a `datetime` import left unused by the earlier console-test
rewrite.

Testing: 13 further tests, 73 total. Full suite matches baseline exactly at
377 pre-existing failures; the usage-limit suites that `_claim_usage`
touches pass unchanged; mypy clean on every changed file.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ETacm2dMASfpMAYUiDu5YG

* fix(tools): let raise through the parallel native path, guard all handlers

Chasing down CodeRabbit's note about callers of
execute_single_native_tool_call turned up a fifth place this exception was
being downgraded: the experimental executor's parallel branch wrapped
future.result() in a broad except and folded the abort into a fake tool
result, so the remaining parallel calls carried on. The sequential path and
crew_agent_executor's parallel branch were already fine.

Five separate handlers have swallowed this during review, so added a guard
test asserting the passthrough at every site rather than trusting the next
one gets spotted.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ETacm2dMASfpMAYUiDu5YG

* fix(tools): keep a failed tool out of the final answer, finish crew scope

Three more findings, all confirmed against the code.

A failed `result_as_answer` tool still became the task's output. The native
paths already excluded raised errors and hook blocks from short-circuiting,
but not declared failures -- so an error message silently became the answer,
which is the exact shape of bug this PR exists to prevent. Fixed on all
paths, and there were three independent override points, not one:
`ToolResult.result_as_answer` in tool_utils, the `execution_result`
finality checks in both executors, and `process_tool_results()`, which
reads `agent.tools_results` back separately. The first two fixes alone left
the behavior unchanged; only the third made the test pass.

`ToolUsage` never received a crew, so a crew-level `ignore` half-applied:
recording and `ToolFailureDetectedEvent` stayed quiet, but the flag was
still attached to `ToolUsageFinishedEvent`. It now takes and stores `crew`.

`CrewAgentExecutor.invoke`/`ainvoke` routed a deliberate stop through
`handle_unknown_error`, printing "An unknown error occurred" on verbose
runs. LiteAgent already special-cased this; both now do.

Testing: 5 further tests, 79 total, including that a *successful*
`result_as_answer` tool still short-circuits. Full suite matches baseline
exactly at 377 pre-existing failures; mypy clean on every changed file.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ETacm2dMASfpMAYUiDu5YG

* fix(tools): report malformed tool args, correlate the failure event

Two findings from the latest round.

Malformed native tool arguments returned early with a plain error dict and
never reported a failure, so `ToolFailureReason.INVALID_INPUT` was declared
but unreferenced -- a bad tool call was absent from records, events and
`raise` aborts. `parse_tool_call_args` now carries an INVALID_INPUT failure
on the error dict and both executors report it before returning.

`ToolFailureDetectedEvent` never set `agent_id`, so a trace could not tie it
to a specific agent instance. Fixing that exposed the same gap running the
other way: `ToolUsage`'s own started/finished/error events never set
`agent_id` either, so on the ReAct path the paired finished event had
nothing to correlate against. Both now set it.

Set explicitly rather than via `from_agent`, which would also overwrite
`agent_role` and lose the `_original_role` preference those events already
apply -- a behavior change that has nothing to do with correlation.

Testing: 5 further tests, 84 total, asserting the ids match between the
failure event and its paired finished event. One existing test pinned the
exact key set of the parse-error dict and was updated for the new key. Full
suite matches baseline at 377 pre-existing failures; the one apparent
addition was the known `test_trace_enable_disable` order-flake, confirmed by
re-running rather than assumed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ETacm2dMASfpMAYUiDu5YG

* fix(tools): scope failure accumulation per execution, drop deprecated executor

Two review requests from @lorenzejay.

Accumulation no longer lives as mutable state on the shared agent. A
ContextVar collector is opened around each execution -- task, kickoff, and
each guardrail retry -- and the output reads that collector directly instead
of copying the agent's list. ContextVars are copied per asyncio task and per
thread, so concurrent executions cannot see each other's records, and
nesting is safe for retries. `last_tool_failures` prefers the active
collector and falls back to the last completed execution, so the accessor is
correct during a run too. The per-execution reset that caused the erasure is
gone.

Reproducing this took some digging and the finding is worth recording: crew
tasks *cannot* hit it, because `AgentExecutor` refuses concurrent reuse of
one instance and raises. `agent.kickoff()` has no such guard, and there the
bug reproduces exactly as reported -- two concurrent kickoffs each returned
two records. The regression test forces the overlap with a barrier so it is
deterministic rather than timing-dependent, and I verified it reports [2, 2]
against the old behavior and [1, 1] now.

Removed the tool-failure integration from `CrewAgentExecutor` entirely; that
file is back to its state on main. Note the shared ReAct helper it calls
still records failures, since that is common code rather than new behavior in
the deprecated file -- so a `raise` policy will be swallowed by that
executor's generic handler. Flagged on the PR rather than papered over.

Testing: 89 total. Two tests I wrote for this were vacuous on the first
attempt -- they passed against the simulated pre-fix code -- so each
concurrency test was checked against the old behavior before being kept.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ETacm2dMASfpMAYUiDu5YG

* fix(tools): report malformed calls everywhere, drop the unused block reason

Four findings.

`execute_single_native_tool_call` swallowed a JSON decode error into an empty
args dict and ran the tool with no input at all -- worse than not reporting
it. It now routes through `parse_tool_call_args` like the executors do, so
the StepExecutor/planning path reports INVALID_INPUT and returns instead of
executing. That also removes a duplicated inline parse.

The ReAct path returned a `ToolUsageError` message as an ordinary result
without reporting it, so a malformed call there was invisible while the
equivalent native failure was recorded. Now reported as INVALID_INPUT too.

`Agent.kickoff` opened a collector but no longer reset the agent-level list,
so `last_tool_failures` grew across kickoffs. Reset restored, matching task
execution.

`ToolFailureReason.BLOCKED_BY_HOOK` was declared and never produced. Rather
than start reporting hook blocks as failures, the member is removed: a block
is a deliberate decision by the hook author, and treating it as a failure
would make `raise` abort on an intentional veto. Added a guard test that every
remaining reason is actually produced somewhere, so a dead member cannot
reappear -- the same smell that flagged INVALID_INPUT last round.

Also switched the deprecation guard test to a single import style.

Testing: 6 further tests, 95 total, including that the tool does not run when
its args fail to parse. Full suite matches baseline at 377 pre-existing
failures; mypy clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ETacm2dMASfpMAYUiDu5YG

* fix(tools): merge failures across kickoff guardrail retries, cancel siblings

Kickoff guardrail retries discarded the blocked attempt's failures. Each
retry calls `_execute_and_build_output`, which opens a fresh collector and
builds a new output, so a run could report zero failures having demonstrably
failed one -- the same bug already fixed on the task guardrail path, which
merges. Now merged there too. Verified the test fails without the fix.

Under `raise`, one parallel native tool aborting left its siblings running:
the pool waited for them and pending ones still started. It now shuts the
pool down with `cancel_futures=True` so a not-yet-started sibling never runs.
Threads already in flight cannot be interrupted in Python, so a concurrent
tool may still complete before the abort surfaces; that is noted at the call
site rather than left implied.

Also satisfied CodeQL by materialising the enum in the guard test's loop.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ETacm2dMASfpMAYUiDu5YG

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com>
2026-07-29 19:30:14 -07:00
Lucas Gomide
d52d0a1628 feat: emit FlowFailedEvent when a flow execution fails (#6718)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
* feat: emit FlowFailedEvent when a flow execution fails

A failed flow never emitted a terminal lifecycle event, so the
`flow_started` scope stayed open and consumers such as tracing closed the
root span with a generic orphaned message instead of the real error.
`kickoff_async` and the resume path now emit `FlowFailedEvent`, paired
with `flow_started` and carrying the exception, after draining pending
handlers and background memory writes. The resume path also emits the
`MethodExecutionStartedEvent` it was missing for the method being resumed,
so its finished or failed event pairs with its own scope instead of
popping the flow's.

* fix: skip FlowFailedEvent when the run never opened a scope

The `kickoff_async` try block starts before `FlowStartedEvent` is emitted,
so an abort in the execution-start hooks, in input handling or in state
restore emitted a `flow_failed` with no opener, which pops an unrelated
scope and warns about an empty scope stack. The failure event is now
gated on the flow scope actually being open, either from this kickoff's
`flow_started` or from a restored deferred session scope.
2026-07-29 14:44:55 -04:00
Lorenze Jay
f15844b219 Lorenze/imp/skills progressive disclosure (#6675)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* skills progressive disclosure

* skills progressive disclosure

* improving progressive disclosure

* addressed comment

* fix test

---------

Co-authored-by: João Moura <joaomdmoura@gmail.com>
2026-07-28 09:33:43 -07:00
João Moura
e9caf1e1b8 [docs-freeze] docs: snapshot and changelog for v1.15.8 (#6703) 2026-07-28 15:05:44 +00:00
João Moura
133baf39b8 feat: bump versions to 1.15.8 (#6702) 2026-07-28 14:59:36 +00:00
João Moura
2e95bfb4e8 fix(tools): sandbox FileWriterTool writes and fix file tool rough edges (#6692)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* fix(tools): sandbox FileWriterTool writes and fix file tool rough edges

FileReadTool confined reads to the working directory, but FileWriterTool
only checked that `filename` stayed inside `directory` — and `directory`
itself is an LLM-supplied schema field. An agent could therefore write
anywhere the process had permission to, including ~/.ssh and site-packages,
while the reader refused to read back what the writer had just written.
FileWriterTool was the only filesystem tool in the package that did not go
through validate_file_path; files_compressor_tool validates even its
output path.

Writes are now confined to base_dir (the working directory by default):
the resolved directory must sit inside base_dir, and the resolved file
must sit inside that directory. The pre-existing filename containment
check is kept as-is and still applies even when the unsafe-paths escape
hatch is on, so no existing guarantee is weakened.

Both tools gain a base_dir field so a developer can widen the sandbox
deliberately instead of reaching for the process-wide
CREWAI_TOOLS_ALLOW_UNSAFE_PATHS kill switch. FileReadTool also stops
rejecting a file_path given to its own constructor: that is
developer-declared intent, and declaring one file does not expose its
siblings.

Also fixed:

- FileReadTool scanned the whole file when reading a line window; it now
  stops via islice once the requested lines are collected.
- FileWriterTool._run(**kwargs) made the documented positional call
  signature raise TypeError and turned a missing overwrite into
  "error accessing key". It now takes named parameters in the documented
  (filename, content, directory) order.
- A directory naming an existing file reported "already exists and
  overwrite option was not passed" even with overwrite=True; it now
  explains the real problem.
- Subdirectories inside filename are created, matching what passing
  directory already did.
- Both tools now write and decode UTF-8 by default instead of the
  platform locale encoding, with an encoding field to override. The docs
  already claimed UTF-8 and recommended the writer to Windows users.
- The writer's schema fields had no descriptions for the LLM.
- Docs claimed FileReadTool parses JSON into a dict (it never has),
  shipped a snippet that raised TypeError, and did not mention the path
  sandbox. The writer README also began with a stray "Here's the
  rewritten README" preamble.

BREAKING CHANGE: FileWriterTool no longer writes outside the working
directory. Pass base_dir to authorize a different tree.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* chore: update tool specifications

* fix(tools): make the declared FileReadTool file reachable by agents

Addresses review feedback on #6692.

The constructor-path exemption did not actually work the way an agent
calls the tool. The description only advertises a redacted label (the
basename, when the file sits outside the sandbox), but resolution
required the exact absolute path, so the model's call was sandboxed and
the declared file was never read. Worse, file_path was a required schema
field, so the long-documented "call with no arguments to read the default
file" raised a validation error instead:

    FileReadTool(file_path="/outside/declared.txt")
    .run()                          -> ValueError: validation failed
    .run(file_path="declared.txt")  -> Error: File not found
    .run(file_path="/outside/declared.txt") -> works, but the model was
                                               never told this path

file_path is now optional in the schema, so omitting it reads the default,
and the declared file is addressable by the label the description shows
the model as well as by its real path. Declaring one file still does not
expose its siblings.

The declared path is also pinned to its real path at construction, so a
later chdir cannot silently repoint it at a different file — previously a
relative constructor path re-resolved against the new working directory
on every call.

Also guards the writer's filepath resolution, which could raise
ValueError out of _run for a filename containing a null byte, breaking
the contract of always returning a descriptive string. The directory and
read paths were already guarded.

Adds docstrings to strtobool and both _run methods, corrects an Arabic
tanween spelling and a kaf-as-descriptor calque in the localized read
docs, and regenerates tool.specs.json for the schema change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(tools): anchor the declared read path to base_dir, not the cwd

Addresses the second round of review feedback on #6692.

The previous commit pinned a relative constructor file_path with
os.path.realpath, which anchors to the working directory, while both
format_path_for_display and validate_file_path anchor a relative path to
base_dir. With the two roots disagreeing, the same relative string meant
two different files — and the tool served the cwd one under a label that
looks like it belongs to the sandbox:

    FileReadTool(file_path="data.txt", base_dir="/allowed")   # cwd=/work
    label advertised to the model -> "data.txt"
    run(file_path="data.txt")     -> contents of /work/data.txt

That reads a file from outside base_dir, so it was a sandbox escape
introduced by the exemption itself, not just a wrong-file bug.

Resolution now goes through a single _resolve_against_base helper that
anchors relative paths exactly the way the sandbox does, so the pinned
path, the advertised label and the containment check all agree. Covered
by test_relative_declared_path_anchors_to_base_dir.

Also softens "always readable" to "always allowed past the containment
check" in the docstring, README and docs, since bypassing containment
does not guarantee the read succeeds — it can still fail on a missing
file, a directory, or permissions.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(tools): tell the LLM about the path sandbox in tool descriptions

Addresses the low-confidence notes from the Copilot review on #6692.

Both tools' descriptions were pre-sandbox wording, so the model learned
about containment only by attempting a path and reading the error back.
Both now state that access is confined to the tool's allowed directory
and that a path resolving outside it is rejected.

The wording deliberately says "the tool's allowed directory" rather than
"the working directory", because the root is base_dir when one is set,
and naming the absolute root would leak it into the prompt — the same
reason paths are redacted in errors.

Not changed: the notes also suggested advertising `encoding`. That is a
constructor-only field the model cannot set, so describing it to the LLM
would be misleading.

Also fixes a test docstring that contradicted its own assertion — the
public run() path does raise on schema validation failure, which is what
the test asserts.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(tools): anchor base_dir at construction so the sandbox cannot move

Addresses the third review round on #6692.

Both remaining findings came from the same habit: storing an unanchored
string and re-resolving it later.

A relative base_dir was kept verbatim and re-resolved against getcwd() on
every call, while the declared file was pinned once at construction. After
a chdir the sandbox root moved but the declared default did not, so one
tool applied two different roots. base_dir is now resolved once — in the
reader's __init__, and via a field_validator on the writer so it also
applies on the model_validate path.

That also covers the serialization concern. model_dump drops the private
pin, and __init__ re-runs on restore, so a relative file_path was
re-anchored against whatever the working directory happened to be at load
time. With base_dir anchored, restore rebuilds the identical pin.

The residual case is a relative file_path with no base_dir, where the
sandbox root is the working directory too — so both move together and the
tool stays self-consistent. Covered by
test_declared_path_survives_a_serialization_round_trip and
test_relative_base_dir_is_anchored_at_construction on both tools.

Also corrects the writer's 'directory' description, README and docs: the
default resolves inside the tool's allowed directory, which is base_dir
when one is set, not always the working directory.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-07-28 02:20:26 -07:00
João Moura
97981ed31b feat(tools): add WaitTool for pausing on long-running jobs (#6690)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
* feat(tools): add WaitTool for pausing on long-running jobs

Agents that kick off out-of-band work (a sandbox build, a deployment, an
async API job) have no way to let clock time pass: they either poll in a
tight loop or give up before the work finishes.

WaitTool pauses for a given number of seconds, with an optional reason
echoed back for traces. A single call waits at most max_seconds (default
300, configurable). Longer requests are clamped to the cap and the result
says so, so the model calls again rather than failing. Sync and async
execution are both implemented; stdlib only, no new dependencies.

The tool description spells out when to reach for it (builds, deploys,
batch jobs, async polling, backoff) and when not to, so models pick it up
for the right reason.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(tools): enforce non-negative wait on positional calls, fix doc snippets

BaseTool.run() skips args_schema validation when called with positional
arguments, so tool.run(-5) reached time.sleep(-5) and failed with an
unrelated error. _resolve_duration now enforces the seconds >= 0 contract
itself, covered for both run() and arun().

Docs and README examples are now self-contained: check_build_status_tool
is defined with the @tool decorator instead of referenced out of nowhere,
and the async example awaits inside asyncio.run() rather than at top level.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* docs: point the wait tool card at the edge path

Unprefixed links resolve against the default docs version (v1.15.7),
where the wait tool page does not exist, so the card 404'd in the broken
link check. Prefixing with /edge matches how other edge pages link.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(tools): never cache waits and keep the advertised cap accurate

Two issues from review, both confirmed against the code.

Waits inherited the default cache_function, which always allows caching.
With crew cache enabled, a repeat call with the same arguments returned
"Waited N seconds." straight from the cache without sleeping, turning a
poll-wait-check loop into a busy loop. WaitTool now declares a
cache_function that always refuses.

The description advertising the cap was only rebuilt when max_seconds
reached __init__ without an explicit description. Passing both (as a
platform building from tool.specs.json init params would), calling
model_validate, or assigning max_seconds left the text claiming 300
seconds while clamping to something else. A model_validator now derives
the description from max_seconds on construction, validation, and
assignment, and leaves a caller-supplied description untouched.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(tools): reject NaN waits and pluralize single-second results

_resolve_duration now rejects NaN with its own message instead of letting
time.sleep raise "Invalid value NaN (not a number)" from a positional
call. Infinity keeps clamping to the cap like any other oversized wait.

Result and description text no longer says "1 seconds". Tests use the
public WaitTool().description as the baseline rather than reaching for
module-private helpers.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-27 17:12:27 -07:00
Thiago Moretto
e2c8d7ca88 fix: mark E2B_API_KEY as a required env var for E2B tools (#6688)
E2B_API_KEY was declared with required=False on the shared E2B tool
base (E2BExecTool, E2BFileTool, E2BPythonTool), even though none of
the three tools can create or attach to a sandbox without it.
E2B_DOMAIN stays optional since it genuinely defaults to e2b.dev.

Regenerated lib/crewai-tools/tool.specs.json via
generate_tool_specs.py to reflect the change.
2026-07-27 18:31:51 +00:00
Lucas Gomide
ca5ef810be ci: check doc links only on edge and latest versions (#6633)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
`mintlify broken-links` walks every frozen version snapshot under
`docs/` (currently 22 of them), pushing docs PR checks past 14 minutes
and growing with each release. Prune the immutable snapshots — keeping
`edge` and the default (latest) version, which unprefixed links resolve
against — before running the checker, cutting the run to ~30 seconds.
`workflow_dispatch` still checks the full tree, and the deprecated
`mintlify` CLI is swapped for `mint`, which drops the `yes` prompt hack.
2026-07-27 08:22:01 -04:00
Ossama Alami
daa7019898 docs(llms): refresh model availability guidance (#6676)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* docs(llms): refresh model availability guidance

* docs: clarify structured output support

* docs: address LLM guide review feedback

* docs: refresh streaming model examples
2026-07-26 16:13:36 -07:00
João Moura
1870b444e7 [docs-freeze] docs: snapshot and changelog for v1.15.7 (#6673) 2026-07-26 11:19:47 -07:00
João Moura
38ca5edce2 feat: bump versions to 1.15.7 (#6672) 2026-07-26 18:07:46 +00:00
Lorenze Jay
213d9485fe docs: snapshot and changelog for v1.15.7a1 (#6665)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
2026-07-26 14:04:16 -03:00
Lorenze Jay
c459d01c35 feat: bump versions to 1.15.7a1 (#6661) 2026-07-26 13:47:11 -03:00
João Moura
cc0759854d fix(skills): resolve registry skills through the runtime's CrewAI+ client (#6658)
* fix(skills): resolve registry skills through the installed AMP client

Skill downloads built their own `PlusAPI` and authenticated it from
`CREWAI_USER_PAT`, the platform integration token, or the saved CLI login.
Managed runtimes have no user credential to offer: they install a client of
their own, which `load_agent_from_repository` already resolves through, so
Agent Repository lookups worked while the skill downloads beside them failed
with 401.

Skills now resolve their client the same way, via `resolve_plus_client()` next
to the hook it reads. A client that can't fetch skills falls back to
environment credentials and warns, so older runtimes behave as they do today.
`resolve_plus_response()` shares the sync/async bridging both lookups need,
since `PlusAPI` is synchronous while managed clients are not.

Version pinning, which the same bug was hiding:

- Registry refs accept `@org/name@version`, and `@org/name@v1.2.0` since people
  write it both ways. `parse_skill_ref()` returns a `SkillRef(org, name,
  version)`; `parse_registry_ref()` keeps its `(org, name)` shape and drops the
  pin, so existing callers are unaffected
- Agent Repository agents record a version per skill, which was parsed off the
  response and dropped. Those pins now travel with the refs, so publishing a
  new version of a skill no longer changes every agent that uses it
- A pinned ref only accepts a project-local copy declaring that version in its
  `metadata.version` frontmatter, and the cache reports a miss when the version
  it recorded differs — so a pin re-resolves rather than loading another
  version. Unpinned refs keep hitting the cache as before
- An unknown pin fails instead of quietly falling back to the newest version

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(skills): reject a blank version pin instead of floating to latest

A blank `version` passed to `download_skill` read as "unpinned" and quietly
resolved the latest version, which is not what a caller supplying one asked
for — and it disagreed with `parse_skill_ref`, which already rejects empty
pins. Not reachable through `resolve_registry_ref` or the Agent Repository
auto-pinning, both of which only ever pass a non-empty version.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(skills): carry the caller's context into the worker thread

When resolve_plus_response bridges an async client from inside a running loop
it runs the coroutine on a worker thread, which starts with empty ContextVars.
A client reading runtime state there — the platform integration token, flow
context — would see defaults rather than the caller's values, which is hard to
diagnose from the resulting auth or routing failure.

Copy the context across, matching how the parallel-summarization bridge in this
module already does it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-26 13:27:29 -03:00
alex-clawd
bd2cb0f23e fix(openai): recover from the GPT-5.6 tools + reasoning_effort 400 (#6660)
An ordinary agent with a tool fails on the whole GPT-5.6 family:

    Agent(role=..., goal=..., backstory=...,
          llm=LLM(model="openai/gpt-5.6-sol"), tools=[multiply])

    Function tools with reasoning_effort are not supported for gpt-5.6-sol in
    /v1/chat/completions. To use function tools, use /v1/responses or set
    reasoning_effort to 'none'.

Nothing sets reasoning_effort -- not the user, not CrewAI. The family applies a
server-side default and then refuses it once tools are present. Confirmed with
raw HTTP, no CrewAI involved, on a payload with no reasoning_effort key at all:

    gpt-5.6-sol  tools, no reasoning_effort key   -> 400
    gpt-5.6-sol  tools, reasoning_effort="none"   -> OK
    gpt-5.5      tools, no reasoning_effort key   -> OK
    gpt-5.4      tools, no reasoning_effort key   -> OK
    gpt-5.2      tools, no reasoning_effort key   -> OK

So this is GPT-5.6 only, and it needs an explicit "none" -- dropping the key is
what the rejected request already looked like.

Recovered from the error rather than a model list: catch the 400, resend with
reasoning_effort="none", once. No model names, so a family OpenAI restricts later
works without a release here. Detection matches the structured `param` field plus
the message, so the unrelated "Unsupported value" 400 that o1/o3 return for
"none" isn't mistaken for this one, and the retry can't loop.

Verified against main with real agents (no reasoning_effort anywhere):

    model          no tools   tools        tools + reasoning=True
    gpt-5.6-sol    ok / ok    400 / ok     hang / ok
    gpt-5.6-terra  ok / ok    400 / ok        - / ok
    gpt-5.6-luna   ok / ok    400 / ok        - / ok
    gpt-5.5        ok         ok              -
    gpt-5.2        ok         ok           ok / ok
    gpt-4o         ok         ok              -

On main, tools + Agent(reasoning=True) produced no output and no error and was
killed at 420s; gpt-5.2 with the same config finishes in ~40s. Both the 400 and
that hang are fixed.

Tests: 15 cases, including agent definitions with tools, with tools plus
reasoning=True, and without tools. tests/llms + tests/agents -> 961 passed
(1 pre-existing unrelated failure from a local OLLAMA_API_KEY env leak).
Ruff + mypy clean.
2026-07-26 12:48:17 -03:00
alex-clawd
c52d0d9530 fix(openai): make tool calling work on the Responses API path (#6657)
* fix(openai): make tool calling work on the Responses API path

An agent with tools on api="responses" never produced an answer. It returned the
raw tool-call list instead:

    [{'id': 'call_...', 'name': 'multiply', 'arguments': '{"a":17,"b":23}'}]

Three defects in the chain, all on the Responses side only:

1. `is_tool_call_list()` knew the OpenAI-nested, Anthropic, Bedrock and Gemini
   shapes but not the Responses one ({"id", "name", "arguments"} -- no nested
   "function", no "input"). The list wasn't recognized as tool calls, so the
   executor handed it back verbatim as the final answer.

2. `extract_tool_call_info()` read "arguments" only from a nested "function"
   object, falling back to "input". For the Responses shape both missed and the
   arguments silently became {}, so the tool would have run with no input.

3. With those fixed the tool ran, then the follow-up request 400'd:

       Invalid type for 'input[1].content': expected one of an array of objects
       or string, but got null instead.

   Tool calling is expressed differently by the two APIs. Chat Completions uses an
   assistant message carrying `tool_calls` with content: None, then role: "tool"
   results. The Responses API uses flat function_call / function_call_output items
   keyed by call_id. Those messages were passed through untranslated.

`_to_responses_input()` now converts them. Messages without tool calls pass
through unchanged, so nothing else moves.

Verified end to end against the live API:

    api="responses" + tools           -> 391   (was raw tool-call JSON)
    chained multi-step tool calls     -> 400   (17*23, then +9)
    completions path (control)        -> 391   (unchanged)

The generated `input` payload was also posted to /v1/responses directly and
accepted, and the pre-fix chat-shaped payload confirmed as a 400.

This is why api="responses" never worked for agents: the provider side has had a
full Responses implementation since #4258/c4c9208, but the executor never learned
the shape it emits. Fixing it also unblocks routing gpt-5.4+ tool calls to the
Responses API instead of dropping reasoning_effort.

Tests: 12 cases covering recognition, extraction (including that the Chat
Completions and Bedrock shapes are unaffected), translation of assistant/tool
messages, parallel calls, assistant text alongside tool calls, non-string tool
output, and the full prepared `input` list.

* fix(openai): prefer Responses "call_id" over the item's own "id"

Per CodeRabbit review. A raw Responses function_call item carries both keys with
different values, confirmed against the live API:

    keys    ['arguments', 'call_id', 'id', 'name', 'status', 'type']
    id      fc_0adeb715c5d740c7006a65ccb72b948199872ad8b5a5c53108
    call_id call_dEoHFrYnOgWYvk17FymdcDZ5

function_call_output must reference call_id. Reading the item's own "id" would
produce a tool result the model can't correlate back to its invocation.

Our own _extract_function_calls_from_response already maps item.call_id into "id",
so the normal path was correct and the existing tests passed. But
extract_tool_call_info is a shared helper reached from every provider's tool loop,
and a raw Responses item is a plausible thing to hand it -- silently picking the
wrong identifier is a bad trap to leave in place for one line of guard.

Tests: raw item extraction asserting call_id is chosen over id, and a round-trip
check that the id extracted from a call is the one sent back with its result.
997 passed across tests/llms, test_agent_utils and tests/agents (1 pre-existing
unrelated failure from a local OLLAMA_API_KEY env leak). Real two-agent chained-tool
run still returns the correct answer.

---------

Co-authored-by: João Moura <joaomdmoura@gmail.com>
2026-07-26 06:18:20 -03:00
alex-clawd
b64c92c87b fix(openai): route responses-only models instead of failing with 404 (#6656)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
The pro tier is not served by /v1/chat/completions. Probing the live endpoints:

    model         /v1/chat/completions   /v1/responses
    gpt-5-pro     404                    OK
    gpt-5.5-pro   404                    OK
    gpt-5.4-pro   404                    OK
    gpt-5.2-pro   404                    OK
    o1-pro        404                    OK
    o3-pro        404                    OK

Since api defaults to "completions", LLM(model="openai/gpt-5-pro") fails with
"Model ... not found", which is misleading -- the model exists, the endpoint is
wrong. OpenAI's own 404 text ("This is not a chat model") doesn't make the fix
obvious either.

These requests now route to the Responses API automatically, which is verified to
work for every model above. An explicit api= setting is always honoured.

Model matching normalizes the configured string first, so "openai/gpt-5-pro" and
"gpt-5-pro-2025-10-06" both resolve to "gpt-5-pro". It's an exact list rather
than a "-pro" substring, so a custom deployment named "gpt-4-pro-custom" isn't
swept up.

The chat-completions 404 handler also gained an actionable message: when the
response says responses-only, or the model is a known pro model, the error names
api="responses" instead of just reporting "not found".

Tests: 29 cases covering name normalization, detection, routing (including that
call() reaches the Responses handler), and both 404 message paths.
2026-07-26 06:03:09 -03:00
alex-clawd
80fa0295c4 Emit skill usage events at runtime for observability (#6652)
* feat: emit skill usage events at runtime

* test: cover skill events via execute_task paths
2026-07-26 05:04:19 -03:00
alex-clawd
728183e420 fix(deps): bump bedrock-agentcore to patch CVE-2026-16796 (#6654)
bedrock-agentcore 1.7.0 has GHSA-j6g5-3hh3-pgw8 (CVE-2026-16796, high):
argument-delimiter injection in CodeInterpreter.install_packages(). It fails
the pip-audit vulnerability scan on every PR in the repo.

The patch is 1.18.1, which requires boto3>=1.43.31. The old <1.8.0 cap plus
aiobotocore~=3.5.0 (botocore<1.42.92) made that unsatisfiable, so the AWS
stack moves together:

- bedrock-agentcore >=1.7.0,<1.8.0 -> >=1.18.1,<2.0.0
- boto3 ~=1.42.90 -> ~=1.43.46  (aws + bedrock extras)
- aiobotocore ~=3.5.0 -> ~=3.8.0 (aws + bedrock extras)

aiobotocore 3.8.0 allows botocore <1.43.47 and boto3 1.43.46 pins botocore
1.43.46, so the ranges overlap.

Verified: uv lock resolves, pip-audit reports no vulnerabilities (3 existing
ignores, none new), 48 bedrock tests pass, and both bedrock toolkits import
cleanly. BrowserClient.{start,stop,generate_ws_headers} and
CodeInterpreter.{start,stop,invoke} are unchanged in 1.18.1.
2026-07-26 04:55:05 -03:00
Lorenze Jay
b3aaaab023 [docs-freeze] docs: snapshot and changelog for v1.15.6 (#6632)
Some checks failed
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2026-07-24 20:30:21 +00:00
Lorenze Jay
a4cbeacca5 feat: bump versions to 1.15.6 (#6631) 2026-07-24 20:21:58 +00:00
alex-clawd
c528e8bdee fix: detect Anthropic preview tool-use blocks (#6629)
* fix: detect anthropic preview tool-use blocks

* fix: preserve typed Anthropic tool-use blocks

* fix: bump gitpython for vulnerability scan

* docs: clarify gitpython advisory ranges

---------

Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com>
2026-07-24 15:32:38 -03:00
alex-clawd
c06043f7e8 fix: preserve strict tool schema property names (#6628) 2026-07-24 09:49:05 -07:00
Rip&Tear
b14d36bfe4 chore: bump json-repair to 0.60.1, drop fixed vuln ignores in scan (#6612)
Some checks failed
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
* chore: bump json-repair to 0.60.1 and un-ignore fixed vulns in scan

- json-repair 0.25.3 -> 0.60.1 (fixes GHSA-xf7x-x43h-rpqh)
- pyOpenSSL already at 26.2.0 in lock (covers CVE-2026-27448, CVE-2026-27459)
- remove the corresponding --ignore-vuln flags from vulnerability-scan.yml

* fix: adapt _safe_repair_json to json-repair 0.60 semantics

json-repair >= 0.60 returns an empty string for plain-text input and
wraps brace-enclosed junk in a single-element list instead of the old
""/{} sentinel values. Treat both as unrepairable so the original
tool input is preserved.

* chore: fix CI - bump gitpython/pyasn1, drop stale type ignores

- gitpython 3.1.50 -> 3.1.52 (GHSA-2f96-g7mh-g2hx, GHSA-v396-v7q4-x2qj,
  GHSA-956x-8gvw-wg5v; fixed in 3.1.51)
- pyasn1 0.6.3 -> 0.6.4 (GHSA-8ppf-4f7h-5ppj, GHSA-hm4w-wwcw-mr6r)
- json-repair 0.60 ships type stubs; remove now-unused
  type: ignore[import-untyped] comments flagged by mypy
2026-07-22 16:47:33 -07:00
Lucas Gomide
3bb87532da fix: dispatch execution_end hook on failed crew and flow executions (#6607)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* fix: dispatch execution_end hook on failed crew and flow executions

The `execution_end` interception point only fired after a successful
kickoff, so consumers never learned about failed runs. Crew kickoff
paths (`kickoff`/`akickoff`) and the flow runtime (`kickoff_async`,
`resume_async`) now dispatch it on the failure path too, with new
additive `status` ("completed"/"failed") and `error` fields on
`ExecutionEndContext`. Pairing flags guarantee exactly-once dispatch,
keep the start/end pairing invariant, and the original exception
propagates unchanged.

* fix: track execution_end pairing per invocation for reentrant flows

Reentrant kickoffs on the same Flow instance are supported (usage
aggregation already accommodates them), but the instance-level pairing
booleans let an inner kickoff's completion mark the outer execution as
ended, skipping the outer failure's `execution_end`. The pairing state
now lives in each `kickoff_async` invocation's locals, and the resume
path passes a per-invocation holder into `_resume_async_body`. Crew
keeps its instance flags since crew kickoffs are not reentrant on the
same instance (`kickoff_for_each` copies the crew).
2026-07-21 15:25:06 -04:00
iris-clawd
6d496f799b fix: handle async get_agent in load_agent_from_repository (#6608)
* fix: handle async get_agent in load_agent_from_repository

The enterprise PlusClient.get_agent() is async, but
load_agent_from_repository() calls it synchronously. When the enterprise
client is hooked in, client.get_agent() returns a coroutine instead of a
response, causing "'coroutine' object has no attribute 'status_code'".

This adds an inspect.isawaitable() check after the call: if the response
is a coroutine, it is properly awaited via asyncio.run() (or via a
thread-pool executor if an event loop is already running).

Co-authored-by: Joe Moura <joao@crewai.com>

* fix: resolve mypy type-checker errors for async awaitable handling

* fix: remove unused type: ignore comment

---------

Co-authored-by: Joe Moura <joao@crewai.com>
2026-07-21 15:21:41 -03:00
Lorenze Jay
40279e3152 fix dep resolution (#6605)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
2026-07-21 08:37:08 -03:00
Vinicius Brasil
ce739e28c7 [docs-freeze] docs: snapshot and changelog for v1.15.5 (#6602)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2026-07-20 12:33:16 -04:00
Vinicius Brasil
4c7e483936 feat: bump versions to 1.15.5 (#6601) 2026-07-20 16:20:33 +00:00
Vinicius Brasil
fa255387a3 Authenticate skill registry downloads (#6600)
Registry downloads initialized PlusAPI without credentials, so uncached skills failed outside CLI-authenticated flows and were blocked entirely in non-interactive environments.

Use CREWAI_USER_PAT first, then the platform integration token, then the saved login token, and pass CREWAI_ORGANIZATION_UUID. Remove the non-interactive cache-only restriction so runtime downloads work.
2026-07-20 12:43:03 -03:00
Vinicius Brasil
69c0308f2c [docs-freeze] docs: snapshot and changelog for v1.15.4 (#6583)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2026-07-17 14:33:07 +00:00
Vinicius Brasil
e0bd967484 feat: bump versions to 1.15.4 (#6582) 2026-07-17 14:27:15 +00:00
João Moura
f0704ebb22 feat(skills)!: promote Skills Repository out of experimental (#6579)
* feat(skills)!: promote Skills Repository out of experimental

The registry-backed Skills Repository (crewai skill create/publish/
install/list, @org/name refs, global cache) is now mainline:

- CLI: `crewai skill ...` is a top-level group; the CREWAI_EXPERIMENTAL
  gate and the now-empty `crewai experimental` group are removed.
- Runtime: registry.py, cache.py, and events.py move from
  crewai.experimental.skills into crewai.skills next to the loader;
  the require_experimental_skills() gate is gone.
  crewai.experimental.skills remains as a deprecated re-export shim.
- Docs: concepts/skills now leads with the CLI workflow and documents
  the create -> publish -> install lifecycle.

Linear: n/a (requested promotion)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* feat(skills): org-scoped publish only + docs in all languages

Skills are always scoped to the publishing organization, like tools:
drop the --public/--private flags from `crewai skill publish` and
always send is_public=False to the registry. CLI tests assert the flag
is rejected and the API never receives a public publish.

Translate the new CLI-first Quick Start and the create -> publish ->
install lifecycle section into ar, pt-BR, and ko concepts/skills docs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(skills): address review comments on the promotion PR

- Back-compat shim now aliases the old submodules in sys.modules so
  `crewai.experimental.skills.registry/cache/events` imports (and patch
  targets) resolve to the real crewai.skills modules, not just the
  package-root re-exports.
- `crewai skill publish` actually enforces the git-state check that
  --force claims to skip: unsynced repos block publishing (mirroring
  tool publish); standalone skill dirs outside any git repo publish
  without a check.
- Explicit UTF-8 encoding on SKILL.md and cache-metadata reads/writes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(skills): fail closed when git state cannot be validated on publish

Follow deploy's pattern: construct git.Repository(fetch=False) and only
treat "not a Git repository" as skippable — any other git error
(fetch/auth/misconfiguration) now blocks publish with a --force escape
hatch instead of silently bypassing the sync check.

Also single-style imports in the shim test (CodeQL) with the dotted
shim import covered via importlib.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(skills): fetch before sync check on publish; bump mcp past advisories

Publish now refreshes remote-tracking refs (repository.fetch()) before
is_synced(), so ahead/behind is judged against the actual remote rather
than stale local refs; a failing fetch blocks publish with the --force
escape hatch. Adds a fail-closed test for fetch errors.

Raise mcp to >=1.28.1,<2 (locks 1.28.1): the ~=1.26.0 pin blocked
GHSA-hvrp-rf83-w775 / GHSA-jpw9-pfvf-9f58 (fixed 1.27.2) and
GHSA-vj7q-gjh5-988w (fixed 1.28.1), which were failing pip-audit on
this PR.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Vinicius Brasil <vini@hey.com>
2026-07-17 14:21:15 +00:00
Vinicius Brasil
4e23bf6d45 Update dependencies with security fixes (#6580)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
* Pillow 12.1.1 → 12.3.0 (CVE-2026-55798, CVE-2026-54059, CVE-2026-54060,
  CVE-2026-55379, CVE-2026-55380, CVE-2026-59197, CVE-2026-59203)
* mcp 1.26.0 → 1.28.1 (CVE-2026-59950)
* couchbase 4.3.5 → 4.6.0
2026-07-17 09:12:45 -03:00
Jesse Miller
df2e68fe0a docs: add Flows in Studio documentation (#6575)
Some checks failed
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* docs: add Flows in Studio documentation

Documents the new Flows build mode in Studio: why deterministic
workflows with agentic steps matter, the three core node types
(Single Agent, Crews, Router), and Agent Repository publish/pull
sync across organizations.

Includes a rollout banner for the week of July 20th, English source
plus pt-BR, Korean, and Arabic translations, and nav entries for
both edge and v1.15.2 (Crew Studio group renamed to Studio).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* docs: limit Flows in Studio docs to edge version

Versioned snapshots are updated by a separate script, so remove the
v1.15.2 copies and revert its nav changes; the page now lives only
under edge.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-16 20:05:59 +00:00
Vinicius Brasil
475ce6cb6a [docs-freeze] docs: snapshot and changelog for v1.15.3 (#6577) 2026-07-16 19:42:53 +00:00
Vinicius Brasil
cbb8c982f8 feat: bump versions to 1.15.3 (#6576) 2026-07-16 19:26:14 +00:00
Vinicius Brasil
a2b0af6bc8 docs: snapshot and changelog for v1.15.3a2 (#6574) 2026-07-16 18:55:47 +00:00
Vinicius Brasil
a1021de7f3 feat: bump versions to 1.15.3a2 (#6573) 2026-07-16 15:43:38 -03:00
Lucas Gomide
9a49af098b fix: sync kickoff-completed event with OUTPUT hook result (#6571)
* fix: sync kickoff-completed event with OUTPUT hook result

`CrewKickoffCompletedEvent` still carried the pre-hook `TaskOutput`, so
AMP/OTEL consumers never saw `OUTPUT` mutations even though the returned
`CrewOutput` was updated. Sync `final_task_output.raw` from the post-hook
payload before emit, matching `FlowFinishedEvent`.

* style: drop OUTPUT sync comment and rename crew output test
2026-07-16 14:37:56 -04:00
Vinicius Brasil
5dba2ef623 Bump setuptools to 0.83.0 to fix PYSEC-2026-3447 (#6570) 2026-07-16 15:08:28 -03:00
Vinicius Brasil
c5ac2d93b4 docs: snapshot and changelog for v1.15.3a1 (#6567) 2026-07-16 14:22:06 -03:00
Vinicius Brasil
79da292d79 feat: bump versions to 1.15.3a1 (#6566) 2026-07-16 13:56:31 -03:00
Vinicius Brasil
999bee8344 Add organization ID param to PlusAPI client (#6561)
This commit adds the organization ID parameter to the PlusAPI client, in
addition to the settings file. This allows for settings the organization
programmatically.
2026-07-16 12:12:29 -03:00
Vinicius Brasil
985cf52028 Fix null repository agent attributes (#6560)
Repository responses can include null optional fields such as
`reasoning`. Treat them as omitted so Agent defaults apply instead of
failing validation.
2026-07-16 10:13:45 -03:00
Lucas Gomide
da9902da4f docs: group execution hooks and document all hook contexts (#6548)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* docs: group execution hooks and document all hook contexts

The hooks pages sat flat in the learn nav and only documented the LLM
and tool call contexts, with examples built on the legacy decorators.
Groups them under a collapsible "Execution Hooks" section, adds
`step-hooks` and `execution-boundary-hooks` pages covering every hook
context from source, reworks the LLM and tool pages to lead with `@on`
while keeping the decorators, and links the orphaned
`before-and-after-kickoff-hooks` page into the group.

* docs: prefix hook cross-links with /en so they resolve in edge

The new edge-only hooks pages linked each other with versionless paths
like `/learn/step-hooks`, which mintlify resolves against the frozen
default version where those pages do not exist, breaking the CI link
check. Uses the `/en/learn/...` form the other edge pages already use.

* docs: use /edge prefix for links to edge-only hooks pages

The `/en/learn/...` form still resolves against the default frozen
version, where `step-hooks` and `execution-boundary-hooks` do not exist
yet, so the link checker kept failing. Links now use the explicit
`/edge/en/learn/...` form, matching how `consuming-streams.mdx` linked
to edge-only streaming pages before they were frozen.
2026-07-15 08:17:52 -04:00
Lucas Gomide
0e5d0ecfb9 feat: add step interception points and rework execution hooks docs around @on (#6518)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* feat: add pre_step and post_step interception points on task execution

Introduces `StepContext` and the two step points in the dispatcher, and
wires them around agent execution in `task.py` (sync and async paths):
`pre_step` fires after `TaskStartedEvent` with the task context as
payload, `post_step` fires before `TaskCompletedEvent` with the
`TaskOutput`, and hook replacements are rebound in both directions.

* feat: wire pre_step and post_step on flow method execution

Dispatches the step points around each flow method with
kind="flow_method": `pre_step` receives the dumped call params and maps
returned edits back onto args/kwargs, `post_step` can rewrite the method
result before it is recorded. Conformance tests cover per-method firing
and output rewriting.

* docs: rework execution hooks page around the @on api

Replaces the standalone interception hooks catalog with a single
`execution-hooks.mdx` page that teaches `@on` as the primary way to
write hooks, covering the full ten-point catalog across task, flow, and
LLM execution. The legacy per-point decorators stay documented in a
closing section, and the `docs.json` navigation drops the removed page.
2026-07-14 14:47:18 -04:00
Lucas Gomide
a194f3867a feat: wire execution-boundary interception points (#6517)
* feat: wire execution-boundary interception points

Adds the typed interception contexts (`crewai/hooks/contexts.py`) and wires
the `execution_start`, `input`, `output`, and `execution_end` points for both
crews and flows through the dispatcher. `prepare_kickoff` and
`Flow.kickoff_async` fire `execution_start`/`input` so a hook can rewrite
resolved inputs before the run, while `Crew._create_crew_output` and the flow
tail fire `output`/`execution_end` so the final result can be observed or
replaced. Closes the eight critical-path points without touching the legacy
hooks.

* fix: correct execution-boundary hook ordering and input aliasing

Reworks the crew and flow boundary seams flagged in review. `OUTPUT` and
`EXECUTION_END` now run before the completion event (`CrewKickoffCompletedEvent`
and `FlowFinishedEvent`) so a `HookAborted` no longer leaves a spurious
completed signal and a returned payload replacement is honored on the emitted
and returned result. Boundary contexts alias `inputs` to the same object as
`payload` instead of a fresh dict from `or`, so in-place edits survive
read-back. Flows re-publish the resolved inputs into `flow_inputs` baggage
after the `INPUT` hook so trigger-payload injection observes hook rewrites, and
a resumed flow now dispatches `OUTPUT`/`EXECUTION_END` on its completion path.

* chore: drop redundant seam comments from execution-boundary wiring

Removes two inline comments narrating the OUTPUT/EXECUTION_END dispatch
ordering in `crew.py` and the flow runtime, plus a stray sentence about
enterprise adapters in the conformance-suite docstring. Comment-only
cleanup, no behavior change.

* fix: keep crew output typed across boundary hook dispatch

`_create_crew_output` reassigned `crew_output` from the hook contexts'
`payload`, which is typed `Any`, so mypy flagged `no-any-return` at the
function's return. Cast the payload back to `CrewOutput` after each
dispatch and split the `ExecutionEndContext` construction to satisfy
`ruff format`'s line-length limit.
2026-07-14 10:43:18 -04:00
Lucas Gomide
7d21283630 feat: add generic interception-hook dispatcher (#6516)
* feat: add generic interception-hook dispatcher

Introduces `crewai/hooks/dispatch.py` as a single engine behind every
interception point: a hook receives a typed context, may mutate or replace
its `payload`, or raise `HookAborted(reason, source)` to stop the operation.
The full `InterceptionPoint` catalog is frozen from day zero, with global and
contextvar-scoped registries, an `@on` decorator, a no-op fast path, and a
`HookDispatchedEvent` for telemetry. The four existing `before/after_llm_call`
and `before/after_tool_call` hooks become adapters over the dispatcher, so the
legacy dialect and `return False` semantics keep working unchanged while
gaining the new contract.

* fix: harden interception dispatcher against review findings

Corrects several dispatcher edge cases surfaced in review. `_default_reducer`
now reports a modification only when a `payload` is actually applied, the
`agents=` filter falls back to `agent_role` for contexts without an `agent`
object, and `unregister` resolves the filter wrapper stashed by `on` so a
filtered hook can be removed. The tool-hook runners honor the executing
agent's `verbose` flag instead of silently swallowing hook errors, and the
ReAct tool path now runs `POST_TOOL_CALL` on blocked calls to match the
native paths. Also adds abort-telemetry coverage and replaces the flaky
absolute no-op timing budget with a relative one.

* fix: honor scoped hooks on direct llm calls and register @on crew methods

Direct agent-less LLM calls short-circuited on the empty global hook list,
so hooks registered only for the current `scoped_hooks()` context never
ran; the direct-call helpers now defer to `dispatch`, which resolves
scoped hooks behind its own no-op fast path. `CrewBase` likewise only
scanned the legacy `is_*_hook` markers, so `@on(InterceptionPoint.X)`
methods were silently dropped — it now registers them on the dispatcher
with filters applied and `self` bound. Also tightens result typing across
the tool-call seams so `mypy` stays green.

* refactor: scope InterceptionPoint to the points this layer wires

The dispatcher only fires the model- and tool-call boundaries, so
`InterceptionPoint` now lists just those four rather than the full future
catalog. New points are introduced alongside the seams that dispatch them,
keeping every layer free of enum members with no live consumer. The
dispatcher unit tests that borrowed unused points as generic examples are
remapped onto the four kept points.

* test: pin per-hook fail-open at the LLM and tool seams

The dispatcher swallows a hook's exception per hook rather than around the
whole loop, so one buggy hook no longer silently skips every hook registered
after it. These seam-level tests pin that behavior through
`_setup_before_llm_call_hooks` and `run_before/after_tool_call_hooks`, and
confirm an intentional `return False` block still short-circuits later hooks.

* fix: run execution-scoped hooks on the agent executor model seams

`_setup_before/after_llm_call_hooks` only ran the executor's snapshot
hook lists, so hooks registered via `scoped_hooks()` never fired on
`PRE/POST_MODEL_CALL` during normal agent execution, while the tool
seams (which go through `dispatch`) merged them. The seams now append
the current scope's hooks after the snapshot via `get_scoped_hooks`,
matching dispatch's global-then-scoped ordering, and a scoped-only
registration no longer short-circuits the seam.
2026-07-14 10:27:34 -04:00
Lucas Gomide
6452608724 fix: after_llm_call hooks no longer break native tool execution (#6531)
* fix: don't clobber native tool-call responses in after-LLM hooks

Registering any `after_llm_call` hook broke native tool execution: the
executor invokes `_setup_after_llm_call_hooks` on the intermediate
response that carries the model's tool calls, the non-str payload was
stringified for the response-rewrite pass, and the executor then treated
that string as a final answer instead of executing the tools. Structured
payloads (neither `str` nor `BaseModel`) now pass through untouched,
mirroring the isinstance guard `_invoke_after_llm_call_hooks` already
applies on the direct-call path; hooks still fire on the follow-up
textual response.

Fixes #6529

* style: shorten the tool-call guard comment
2026-07-14 09:49:21 -04:00
Lucas Gomide
5f4ac9f407 chore: resolve pip-audit failures for click, pillow, and json-repair (#6542)
The vulnerability scan started failing when PYSEC-2026-2132 (click) and
PYSEC-2026-2253..2257 (pillow) were published on Jul 12. Both have fixed
releases within our constraints, so `uv.lock` upgrades click to 8.4.2 and
pillow to 12.3.0. A newer json-repair advisory (GHSA-xf7x-x43h-rpqh) also
surfaced; its fix is outside the `json-repair~=0.25.2` pin and 0.25.x lacks
the vulnerable `schema_repair` module, so it joins the ignore list in
`vulnerability-scan.yml` with a justification.
2026-07-14 08:34:56 -04:00
Vinicius Brasil
9d72e269e4 Remove redundant CEL text helper (#6528)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
This commit removes the redundant CEL text helper, in favor of the
easier interpolation syntax.
2026-07-13 14:29:36 -04:00
João Moura
fb8e93be25 fix(flow): don't double-append the turn reply when a handler trims history (#6510)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
handle_turn() (and stream_turn) decided "did the handler append its
reply?" by snapshotting the assistant-message count before kickoff and
appending the stringified result when the count came back unchanged. A
handler that appends its reply and then trims state.messages to a cap —
a normal bounded-context pattern — left the count unchanged, so the
fallback appended the reply a second time on every turn once trimming
engaged, and the duplicates then crowded real turns out of the capped
window.

Replace the count heuristic with an explicit per-turn flag:
append_assistant_message() sets _assistant_reply_appended, handle_turn
and stream_turn clear it before kickoff and only fall back when no
assistant message was appended during the turn. The now-unused
_assistant_message_count() helper is removed.

Fixes EPD-181.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-10 20:01:07 -07:00
João Moura
4fdb7f2bfb fix(tools)!: make tool-result caching opt-in instead of on by default (#6509)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
* fix(tools)!: make tool-result caching opt-in instead of on by default

Tool-result caching defaulted to on (Crew.cache=True, and standalone
agents self-wired a CacheHandler at construction), so an LLM calling
the same tool with identical arguments twice in one run silently got
the first result back without the tool executing. For live-data tools
that is a confidently stale answer; for state-mutating tools the second
action is silently dropped.

Caching is now opt-in with the machinery unchanged:
- Crew.cache defaults to False; Crew(cache=True) restores today's
  behavior exactly (agents still default to participating when a crew
  offers its handler, and Agent(cache=False) still opts an agent out).
- Standalone agents no longer self-wire a cache; Agent(cache=True) or
  an explicit cache_handler opts in. Previously even Crew(cache=False)
  agents cached via this self-wired handler.
- Per-tool cache_function write gating is unchanged once opted in.

Existing tests that exercised the caching machinery now opt in
explicitly; new regression tests cover the default (both identical
calls execute), crew-level opt-in dedup, and agent-level wiring.

Fixes EPD-180.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(agent): don't let copy() turn the cache default into an explicit opt-in

Agent.copy() rebuilds from model_dump(), which includes the field
default cache=True, so the copy's model_fields_set contained "cache"
and _setup_agent_executor wired a CacheHandler the source agent never
opted into (Bugbot review finding). Drop "cache" from the dump when it
was not explicitly set on the source; explicit opt-ins still survive
copying.

Also sync the Crew and BaseAgent class docstrings with the new opt-in
cache semantics (CodeRabbit review findings).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(agent): preserve cache_handler-only opt-in across Agent.copy()

copy() excludes cache_handler from the rebuilt agent, so an agent that
opted into tool-result caching solely via an explicit cache_handler
lost caching after copy() (Bugbot review finding). Carry the consent as
cache=True on the copy when the source has a handler wired and hasn't
explicitly disabled caching — the copy wires its own fresh handler,
matching pre-change copy semantics (copies never shared the source's
handler instance).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(crew): offer the crew cache handler to the hierarchical manager

The hierarchical manager agent is created in _create_manager_agent,
outside the validation-time agents loop that offers the crew's cache
handler — and managers no longer self-wire a handler — so
Crew(cache=True) hierarchical runs never cached the manager's
delegation tool calls (Bugbot review finding). Offer the shared crew
handler when the crew opted in; a user-provided manager with
cache=False stays excluded via the existing set_cache_handler gate.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(agent): only construction-time cache opt-ins survive Agent.copy()

The previous copy() fix treated any wired cache_handler as consent, but
agents that merely received the crew's shared handler at kickoff
(set_cache_handler from Crew(cache=True)) never opted in themselves —
their copies must not become standalone cachers (Bugbot review
finding). Record the opt-in signal in _setup_agent_executor, which runs
at construction before any crew wiring can happen, and have copy()
consult that flag instead of inspecting cache_handler after the fact.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-10 17:37:36 -07:00
João Moura
bfa652a7be fix(tools): stop rewriting the authored tool description at construction (#6508)
* fix(tools): stop rewriting the authored tool description at construction

BaseTool.model_post_init silently replaced the public description field
with the LLM-facing composite ("Tool Name: ...\nTool Arguments: ...\n
Tool Description: <authored>"), breaking equality assertions on authored
text and hiding the extra prompt tokens from token-careful authors.

The authored description now survives construction as written. The
composite is composed on demand via a new formatted_description property
on BaseTool and CrewStructuredTool (shared format_description_for_llm
helper), and every prompt path that relied on the baked-in composite —
render_text_description_and_args, ToolUsage._render, and tool-usage
error messages — now renders through it, so the text the LLM sees is
unchanged.

The helper strips any pre-existing composite block before composing, so
tools deserialized from old checkpoints and adapters that still bake the
composite into the field (e.g. the crewai-tools MCP adapter) don't get
double-wrapped. BaseTool._generate_description remains as a no-op hook
because subclasses override it and model_post_init still calls it.

Fixes EPD-179.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(tools): harden composite-description handling after review

- Anchor the pre-baked-composite check to the actual three-line block
  shape instead of a naive substring match, so authored prose that
  merely mentions "Tool Description:" is never truncated (CodeRabbit /
  Bugbot review finding). Shared as
  strip_composite_description_prefix() and reused by the function-
  calling schema builder, which had the same naive split.
- Make render_text_description_and_args tolerate duck-typed tools
  without a real formatted_description string (fixes CI: step-executor
  tests pass Mock tools whose auto-created attribute is not a str).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com>
2026-07-10 20:33:57 -03:00
João Moura
b65c8487d2 fix(output): expose token usage under both names on agent and crew results (#6507)
Agent.kickoff() returned LiteAgentOutput with a plain dict at
.usage_metrics and no token_usage attribute, while Crew.kickoff()
returned CrewOutput with a UsageMetrics object at .token_usage and no
usage_metrics attribute — so a usage accessor written for one path
raised AttributeError on the other, and every consumer had to
duck-type both shapes.

Give both result types both surfaces, each name with one consistent
shape everywhere: .token_usage is a UsageMetrics object and
.usage_metrics is a plain dict, on both LiteAgentOutput and CrewOutput.
Added as read-only properties, so existing fields, serialization, and
constructors are unchanged.

Fixes EPD-178.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-10 20:29:34 -03:00
João Moura
a8b3ecb723 fix(agent): report per-call usage metrics on kickoff results (#6506)
* fix(agent): report per-call usage metrics on kickoff results

Agent.kickoff() populated result.usage_metrics from the LLM instance's
lifetime token accumulator, so counts grew across calls and pooled
across agents sharing one LLM object — a second agent's first turn
appeared to cost the whole preceding session.

Snapshot the accumulator when a kickoff starts and report the delta on
the result (guardrail retries included), via the new
UsageMetrics.delta_since(). The LLM instance's cumulative counters are
untouched: get_token_usage_summary() keeps lifetime totals for
crew-level aggregation, and its docstring now states that scope
explicitly. Applies to both Agent and the deprecated LiteAgent, sync
and async paths.

Fixes EPD-177.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* refactor(agent): drop lite_agent.py diff, add guardrail-retry usage test

Per review: LiteAgent's kickoff path is no longer used, so the per-call
usage snapshot only needs to live in agent/core.py — revert the
lite_agent.py changes entirely. This also removes the duplicated
_current_usage_summary helper and the instance-attr baseline CodeRabbit
flagged.

Add the requested guardrail-retry regression test: a guardrail that
rejects the first attempt and accepts the second must yield
usage_metrics covering both attempts (2x a single-attempt kickoff).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-10 14:17:45 -07:00
João Moura
7967b19057 fix(flow): stop replaying previous turn's intent when route_turn() returns falsy (#6505)
In conversational flows, a falsy return from an overridden route_turn()
fell back to the sticky state.last_intent from a previous turn, silently
re-running the prior turn's handler for an unhandled input.

The fallback exists for the legacy default_intents path, where
receive_user_message() classifies the intent fresh each turn. Track that
per-turn classification in _turn_classified_intent (cleared on every turn
reset) and route on it instead, so a falsy route_turn() now falls through
to the built-in answer_from_history/converse defaults and never reuses
stale routing state.

Fixes EPD-176.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com>
2026-07-10 11:44:57 -07:00
João Moura
85c467dfe2 feat(cli): run declarative flows on the TUI (headless terminal fallback) (#6484)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
* feat(cli): run declarative flows on the TUI with a headless terminal fallback

Declarative flows now run on the CrewRunApp TUI when interactive, matching
declarative crews and conversational flows. Headless contexts — CREWAI_DMN
(deploy), piped output, CI, any non-TTY — fall back to the direct-terminal
kickoff, gated by is_interactive() (folds in the CREWAI_DMN check and requires
a real TTY).

The TUI shows per-method progress: a new STEPS panel driven by flow method
events (FlowStarted / MethodExecutionStarted/Finished/Failed), each labeled
with its declarative call type (crew/agent/expression/…) read from the flow
definition. Crews/agents inside a method keep streaming in the main panel via
the existing crew/task/LLM handlers.

- crew_run_tui.py: _run_flow_worker (flow.kickoff in a thread worker; reuses
  _on_crew_done/_on_crew_failed + _stringify_output), _is_flow_run gate so crew
  rendering is byte-identical, flow-event subscriptions building _flow_steps,
  and the STEPS sidebar + flow-aware header.
- run_declarative_flow.py: is_interactive() branch → _run_declarative_flow_tui
  (EventListener, method-type map from flow._definition, crew-parity exit codes
  and deploy chaining) or the existing terminal path.

Deviation from the approved plan: gate on is_interactive() rather than
is_dmn_mode_enabled() alone, so non-TTY runs (CI/pipes/CliRunner) never launch
a TUI — this also keeps existing headless flow tests green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RBYGqJHC2TMC6fonFziuuh

* fix(cli): force flow events on for the TUI so STEPS renders under suppress_flow_events

Review follow-up: the STEPS panel and header are driven by flow method events
(FlowStarted / MethodExecution*), but the declarative runtime skips emitting
those when the flow declared config.suppress_flow_events. Interactive TUI runs
would then keep STEPS on "waiting…" and the header on "Starting flow…" while
nested crews still execute.

_run_declarative_flow_tui now forces flow.suppress_flow_events = False for the
interactive run (mirroring how the conversational path mutates the flow for the
TUI). The headless/terminal path never reaches this and keeps the flow's
declared setting. Regression test: test_run_declarative_flow_tui_enables_flow_events.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RBYGqJHC2TMC6fonFziuuh

* fix(cli): clear flow header's current method when a method ends

Review follow-up: the flow header keys off _current_method, which was set on
MethodExecutionStarted but never cleared on Finished/Failed. Between steps (or
after a failed method before kickoff exits) the header kept spinning the old
method name while the STEPS sidebar already showed it done/failed.

_clear_current_method now drops the header's active method when it ends,
falling back to another still-active step (methods can overlap) or none. The
header's idle fallback shows "Working…" once a step has run and "Starting
flow…" only before the first method.

Tests: test_current_method_clears_and_falls_back_across_overlap, plus a
_current_method assertion in test_flow_method_events_build_steps.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RBYGqJHC2TMC6fonFziuuh

* fix: suppress flow console panels in TUI mode; clear header agent on method change

Two review follow-ups:

1) Method panels break Textual TUI (Cursor): forcing suppress_flow_events off
   so the STEPS panel receives events also un-gated the EventListener's Rich
   flow/method panels (ConsoleFormatter.print_panel prints is_flow=True panels
   regardless of verbose), which interleave with Textual and corrupt the TUI.
   print_panel now skips is_flow panels when is_tui_mode() is set (the same
   context the TUI worker already establishes and the tracing listeners already
   honor). Non-TUI/headless flow runs are unaffected. Test:
   test_console_formatter_tui_mode.

2) Flow header showed a stale agent (CodeRabbit): _current_agent persisted
   across methods. It's now cleared when a method starts and when the active
   method changes, so the header never shows the previous method's agent until
   a new agent event arrives. Test: test_flow_method_transitions_clear_current_agent.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RBYGqJHC2TMC6fonFziuuh

* fix(cli): keep flow name over nested crews; show paused flow methods

Two review follow-ups on the flow TUI:

1) Crew kickoff renamed the flow (Cursor): CrewKickoffStartedEvent overwrote
   _crew_name / the app title with a nested `call: crew` step's crew name, so
   the post-run summary could be labeled with a child crew. The rename is now
   gated on `not _is_flow_run`, preserving the flow's name; crew runs still
   adopt the crew name. Tests: test_crew_kickoff_does_not_rename_flow_run,
   test_crew_kickoff_renames_in_crew_mode.

2) Paused methods showed active (Cursor): the TUI didn't handle
   MethodExecutionPausedEvent, so a @human_feedback pause left the STEPS
   spinner running (flow status panels are suppressed in TUI mode). It now
   marks the step "paused" (⏸, teal) and the header shows "waiting for
   feedback" instead of a spinner. Test: test_method_paused_marks_step_paused.

Note: interactively *providing* human feedback from the flow TUI is a separate
follow-up; this only makes the pause visible instead of a silent stuck spinner.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RBYGqJHC2TMC6fonFziuuh

* fix(cli): run human-feedback declarative flows on the terminal, not the TUI

Two review follow-ups, both rooted in @human_feedback methods:

- Paused flow marked complete (Cursor): async human feedback makes kickoff
  RETURN a HumanFeedbackPending marker (not raise), which _run_flow_worker
  would stringify and report as a successful completion with exit 0.
- Sync feedback breaks TUI (Cursor): default (sync) @human_feedback collects
  input via the flow runtime's Rich console.print + blocking input(), which
  interleaves with Textual and leaves the user unable to review output or
  submit feedback.

run_declarative_flow now routes any flow whose declarative definition declares
human feedback (_flow_uses_human_feedback) to the terminal path, where blocking
input and Rich prompts work natively — regardless of interactivity. Non-feedback
flows still get the TUI. Tests: test_flow_uses_human_feedback_detection,
test_human_feedback_flow_uses_terminal_even_when_interactive.

Fully interactive human feedback inside the TUI remains a separate follow-up.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RBYGqJHC2TMC6fonFziuuh

* refactor(cli): address review — Flow typing, debug logging, flow-vs-crew naming

Review follow-ups from @lucasgomide:

- Type flow helpers as Flow[Any] (via TYPE_CHECKING import) instead of Any and
  drop the defensive getattr chains — _definition is a typed PrivateAttr and
  name/suppress_flow_events are typed fields, so attribute access is safe.
- Replace the silent `except Exception: pass` blocks with logger.debug(...,
  exc_info=True) so unexpected failures are diagnosable in the field
  (_flow_method_types, _flow_uses_human_feedback, suppress_flow_events toggle).
- Flow-vs-crew naming: the flow worker now uses group="flow" (was the
  misleading "crew"), and the shared completion/failure handlers report the
  run with an entity-aware noun ("flow" vs "crew") via _run_noun.

Deferred (separate PR): the os._exit(130) hard-kill on user quit is kept as-is
to match the existing crew convention (run_crew._run_json_crew).

Tests: test_flow_done_uses_flow_wording_for_unfinished_tool; existing crew
wording tests unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RBYGqJHC2TMC6fonFziuuh

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-10 11:42:12 -03:00
Lorenze Jay
7baf8f9ba1 improving custom OpenAI urls (#6490)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* Support legacy OpenAI base URL env var

* Add custom OpenAI-compatible endpoint support

* Refactor OpenAI completion module test to restore original module state

- Added logic to save and restore the original OpenAI completion module during the test to prevent issues with class re-imports affecting subsequent tests.
- Ensured that the test checks for the presence of the module and its attributes only after the module is properly reloaded.
- Improved test reliability by avoiding potential failures due to module state changes across tests.

* addressing comments
2026-07-09 15:30:16 -07:00
Lucas Gomide
860817cbcd Drain memory writes before kickoff and flow completion events (#6497)
* fix: drain memory writes before kickoff and flow completion events

Background memory saves from the final task could still be in flight
when `CrewKickoffCompletedEvent`/`FlowFinishedEvent` fired, so telemetry
listeners tore down before `MemorySaveCompletedEvent` arrived and the
save span surfaced as "Span orphaned" errors in traces despite the
record persisting. `Crew` now drains all pending saves — including
per-agent `agent.memory` pools, which the old `finally`-only drain
missed entirely — before emitting the completion event, with the same
ordering applied to both `FlowFinishedEvent` emit paths in the flow
runtime.

* fix: address review findings on the memory drain paths

Bugbot and CodeRabbit flagged gaps in the drain coverage: the
hierarchical `manager_agent` memory pool was never drained,
`Crew.akickoff` lacked the exception-path safety net that sync
`kickoff` has, and `finalize_session_traces` emitted the deferred
session-end `FlowFinishedEvent` without draining first. Also offloads
the pre-emit drains in the flow runtime to `asyncio.to_thread` so the
blocking wait doesn't stall other coroutines sharing the event loop.

* fix: flush event bus after memory drain in flow completion paths

Bugbot flagged that flow paths went straight from the memory drain to
`FlowFinishedEvent`, while crew kickoff flushes the bus in between.
Save completion events emitted during the drain could still have
pending async handlers when flow-finished triggered trace teardown.
Adds a `crewai_event_bus.flush()` after the drain at both flow runtime
emit sites and in `finalize_session_traces`, mirroring
`Crew._create_crew_output`.
2026-07-09 15:01:14 -04:00
Lorenze Jay
289686ab49 [docs-freeze] docs: snapshot and changelog for v1.15.2 (#6479)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
2026-07-07 19:05:05 -07:00
Lorenze Jay
589baa3e7f feat: bump versions to 1.15.2 (#6477) 2026-07-07 18:59:59 -07:00
João Moura
835b93d8c8 fix(cli): key model-catalog cache by exact API key, shorten TTL, skip Ollama (#6468)
Follow-ups to #6462's caching:

1. Key the catalog cache by the exact API key (via a short, non-reversible
   sha256 digest — never the key itself), not just key-present vs absent.
   Switching to a different key for the same provider now misses the previous
   account's entry and refetches, instead of showing the old account's models.

2. Never cache local providers (Ollama). /api/tags is fast and installed
   models change out-of-band, so caching could keep offering a model the user
   just deleted until the entry expired. _is_cacheable() gates both cache read
   and write; the picker now re-probes every call and reflects what's installed.

3. Shorten the dynamic catalog TTL from 6h to 5m — a stale list (new/removed
   models, account changes) is worse than a ~1s refetch, and the cache only
   needs to spare repeated fetches within a wizard session.

Tests: distinct-key cache entries, digest never stores the raw key, Ollama not
cached (reflects deletions / never written), and dynamic TTL expiry.


Claude-Session: https://claude.ai/code/session_01RBYGqJHC2TMC6fonFziuuh

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 18:47:19 -07:00
João Moura
3246cb30f5 fix(cli): unify crewai run flow input resolution and prompt from the state schema (#6466)
* fix(cli): unify `crewai run` flow input resolution; prompt from state schema

`crewai run` resolved the configured [tool.crewai] flow, but `--inputs` was
hard-gated behind `--definition` and routed through a separate branch — the two
ways of pointing at the same flow didn't share resolution, and required inputs
were never detected, prompted, or validated (a missing field only blew up at
runtime).

Now inputs and definition come from one place:

- Remove the "--inputs requires --definition" gate (cli.py, run_crew.py,
  run_declarative_flow.py). `--inputs` alone resolves the configured flow,
  exactly like a bare `crewai run`; `--definition` is purely an override. The
  project-env re-exec forwards `--inputs` instead of rejecting it.
- Read the flow's state schema from the runtime Flow instance
  (`type(flow.state).model_json_schema()`), which is reliable for both inline
  `json_schema` and ref-imported `pydantic` state (the static definition's
  json_schema is None for the common ref case).
- Plain `crewai run` detects required state fields (minus those satisfied by
  state defaults) and prompts for them interactively, showing each field's
  description; skipped in non-interactive / CREWAI_DMN mode.
- Validate against the schema before kickoff: pointed
  "Missing required input 'x' — <description>" errors, and warn on unknown keys
  with a did-you-mean suggestion (catches typos like `prospect_emai`).

`--inputs` on a non-flow project now errors clearly ("only supported for
declarative flows") instead of the old confusing gate.

Tests: schema-driven prompt/validate/override paths, unknown-key warning,
defaults-satisfy-required, type validation, and re-exec input forwarding.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RBYGqJHC2TMC6fonFziuuh

* fix(cli): forward reserved `id` input to flow kickoff; ruff format

- Cursor: the schema filter treated an `id` key in --inputs as unknown and
  dropped it, regressing kickoff's persistence-restore support (inputs["id"]).
  Let `id` pass through untouched (test: reserved_id_input_is_forwarded).
- Apply ruff format to run_declarative_flow.py (fixes the lint-run
  `ruff format --check` step).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RBYGqJHC2TMC6fonFziuuh

* fix(cli): don't block persistence-restore resume on schema validation

Cursor (High): `crewai run --inputs '{"id":"…"}'` is a persistence resume —
kickoff hydrates full state from storage, so schema-required fields may come
from the restored state rather than --inputs. The new required-field
prompt/validation was erroring/prompting before kickoff, breaking resume. When
`id` is present in --inputs, forward the inputs unchanged and skip the
prompt/validation. Test: test_id_only_input_skips_required_validation.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RBYGqJHC2TMC6fonFziuuh

* fix(cli): load project .env in the declarative-flow runner

The declarative-flow path never loaded .env — flow projects (type = "flow")
missed API keys/config that crew projects pick up. The JSON-crew path loads
Path.cwd()/.env with override=True (run_crew._run_json_crew); mirror that at
the top of run_declarative_flow() so flow projects behave the same regardless
of where crewai is installed. Test: run_declarative_flow_loads_project_env.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RBYGqJHC2TMC6fonFziuuh

* feat(cli): unify runtime-input prompting across declarative flows and crews

Declarative (JSON) crews now resolve inputs the same way declarative flows
do, via a shared crewai_cli.input_prompt module (prompt_for_inputs,
parse_inputs_json, closest_name, is_interactive):

- accept --inputs (previously rejected for crews), forwarded to the crew
  subprocess via CREWAI_JSON_CREW_INPUTS and validated before spinning up uv
- layer --inputs over the crew's declared `inputs` defaults
- prompt for missing {placeholder}s with the same UX as flows, and error
  cleanly with a pointed per-name message when non-interactive
- warn on unknown keys with a "did you mean" suggestion

Unlike flows — whose state schema is authoritative, so unknown keys are
dropped — the crew placeholder scan is heuristic (agent/task text fields
only), so unrecognized keys are warned about but kept, to avoid discarding a
value a field the scan doesn't cover may rely on.

--inputs remains rejected for classic (Python/YAML) crews, which take their
inputs from main.py. run_declarative_flow's private input helpers move to the
shared module with no behavior change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RBYGqJHC2TMC6fonFziuuh

* test(crewai): update mirrored CLI test after run_crew input refactor

lib/crewai/tests/cli/test_run_crew.py imports crewai_cli internals and is
collected by the lib/crewai test job (Run Tests). It still imported
_prompt_for_missing_inputs, which was replaced by _resolve_crew_inputs, so
the module failed to import — erroring pytest at collection and cancelling
the rest of the matrix via fail-fast.

Point it at _resolve_crew_inputs and patch the prompt in the shared
crewai_cli.input_prompt module where prompting now lives.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RBYGqJHC2TMC6fonFziuuh

* fix(cli): filter unknown --inputs keys even on flow persistence restore

Review follow-up: the `id` (persistence-restore) branch of
_resolve_flow_inputs returned the raw payload, so typo keys passed alongside
`id` skipped the unknown-key warning/drop and reached kickoff — which can
fail strict (extra="forbid") flow state models. The restore path now still
warns on and drops unknown keys (keeping `id` and known state fields); it
only skips the required-field prompt and pre-kickoff validation, which
persistence hydrates. Regression test: test_id_restore_still_drops_unknown_keys.

Also drop the duplicate module import in test_input_prompt.py (both `import`
and `from ... import` of crewai_cli.input_prompt) flagged by the code-quality
bot; monkeypatching now uses the string target form.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RBYGqJHC2TMC6fonFziuuh

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-07 22:17:09 -03:00
Renato Nitta
fc41c42773 docs: update language from Rules to Policies to match the new dashboard changes (#6471)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
* docs: rename ACP rules to policies across edge and v1.15.1 locales with redirects

* docs: point ACP policies pages at the new policy screenshots

* docs: address review — revert frozen v1.15.1 edits and fix redirect ordering

* docs: prefix edge policies cross-links so they resolve until the next version cut

* docs: move policies redirects above all wildcard redirects
2026-07-07 15:43:51 -03:00
Renato Nitta
792b58f46b fix: resolve pip-audit failures (onnx 1.22.0, nltk PYSEC-2026-597) (#6472)
* fix: upgrade onnx to 1.22.0 and ignore unfixed nltk advisory in pip-audit

* fix: sync pip-audit ignore list in pre-commit config with the workflow
2026-07-07 14:09:19 -03:00
Lorenze Jay
799ab0f548 ensure we are writing version for flows (#6467)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2026-07-06 18:47:27 -07:00
João Moura
2b56dab813 feat(cli): pull latest LLM models dynamically in the crew wizard (#6462)
* feat(cli): pull latest LLM models dynamically in the crew wizard

The JSON-crew creation wizard hardcoded a short model list per provider,
which goes stale as vendors ship new models every few weeks. Add a
three-tier resolver that prefers live data and falls back to a curated list.

- New `model_catalog.get_provider_models(provider, fallback)`:
  1. Vendor API (openai/anthropic/gemini/groq/cerebras/ollama) when the
     provider key is already in the environment — the only reliably-fresh
     source (real release dates / display names).
  2. Curated hardcoded fallback — hand-verified, used when no key is set.
  3. LiteLLM feed — only for providers with no curated list; it lags real
     releases, so it must never preempt the curated fallback.
- Rank by date/version parsed from model ids, humanize labels, 6h cache,
  short timeouts, silent fallback on any error.
- Wire it into `create_json_crew._select_model()` (picker only).
- Refresh the curated fallback against each vendor's official model docs
  (Anthropic Fable 5 / Opus 4.8 / Sonnet 5; OpenAI GPT-5.5(+pro); Gemini
  3.5 Flash / 3.1 Pro preview / 3 Flash preview; Groq Llama 4 / GPT-OSS).
- Tests for ranking, chat filtering, caching, and the tier order (17 tests).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RBYGqJHC2TMC6fonFziuuh

* fix(cli): address model_catalog review findings

- Key the Ollama catalog cache by its base URL so a changed OLLAMA_API_BASE /
  API_BASE no longer serves the previous host's models for up to the TTL.
- Negatively cache the curated fallback after a failed/empty fetch (short
  _NEGATIVE_TTL) so the picker doesn't repeat a timeout-prone vendor/LiteLLM
  request on every call — most impactful for a down local Ollama server.
- Guard _read_catalog_cache / _write_catalog_cache against a non-dict cache
  root (corrupt JSON array no longer raises AttributeError).
- Replace the two empty `except OSError: pass` blocks with
  contextlib.suppress(OSError) plus an explanatory comment (CodeQL empty-except).
- Tests: negative cache, base-keyed Ollama cache, corrupt-cache no-crash (20 total).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RBYGqJHC2TMC6fonFziuuh

* fix(cli): guard null litellm_provider and paginate Gemini models

- _from_litellm: coerce a present-but-null `litellm_provider` before string
  ops so it's skipped instead of raising AttributeError (keeps the documented
  "never raises" contract).
- _fetch_gemini: walk models.list pages via nextPageToken (bounded to 10) —
  the API is paginated and not guaranteed newest-first, so a single page could
  drop models the ranking should consider.
- Tests for both (22 total).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RBYGqJHC2TMC6fonFziuuh

* ci: ignore nltk PYSEC-2026-597 in pip-audit (no fix, not reachable)

pip-audit newly flags nltk 3.9.4 for PYSEC-2026-597 (CVE-2026-12243), a path
traversal via percent-encoded `..%2f` in nltk.data.load()/find(). It affects
all nltk versions <=3.9.4 with no patched release, so it can't be resolved by a
version bump — same situation as the already-ignored PYSEC-2026-97.

nltk is a transitive dependency (unstructured[local-inference, all-docs] in
crewai-tools) used for text tokenization; we never pass untrusted resource
URLs/paths to nltk.data, so the traversal is not reachable. Add it to the
curated --ignore-vuln list with a justification, matching the existing pattern.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RBYGqJHC2TMC6fonFziuuh

* fix(cli): address second Cursor review round on model_catalog

- Cache ignores new API keys: include API-key presence in the cache key
  (`<provider>#key|#nokey`), so a key added after a no-key/negative-cached
  lookup triggers a fresh live fetch instead of serving the stale fallback.
- Bad LiteLLM cache crashes picker: `_from_litellm` now requires a dict from
  `_load_litellm_data` (a non-mapping JSON root is skipped, not `.items()`'d).
- Stale LiteLLM refetch loop: memoize the feed load once per process
  (`_litellm_memo` + `_reset_litellm_memo` test hook) so repeated uncurated-
  provider lookups don't each re-attempt a timed download when offline.
- Tests: new-key bypass, corrupt-litellm-cache no-crash, one-fetch-per-process
  (25 total).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RBYGqJHC2TMC6fonFziuuh

* fix(cli): keep partial Gemini results on later-page fetch error

_fetch_gemini paginates; a network/HTTP error on page 2+ previously raised out
through _from_vendor, discarding models already parsed from earlier pages and
forcing the curated fallback. Catch per-page fetch errors and return the
partial set instead (a first-page failure still yields an empty list -> fallback).
Test: test_vendor_gemini_keeps_partial_on_later_page_error (26 total).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RBYGqJHC2TMC6fonFziuuh

* fix(cli): don't let an invalid fresh LiteLLM cache block download

_fetch_litellm_data treated any truthy JSON root in a fresh provider_cache.json
as the feed and returned it, so a non-mapping root (e.g. a JSON array) was
memoized and the tier never re-downloaded until the file aged out — leaving
uncurated providers with an empty picker despite a recoverable cache. Only
short-circuit on a usable dict; otherwise fall through to the download.
Test renamed to test_invalid_litellm_cache_falls_through_to_download (asserts
recovery via refetch).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RBYGqJHC2TMC6fonFziuuh

* fix(cli): honor OLLAMA_HOST and treat empty vendor list as authoritative

- Ollama host mismatch: _ollama_base now also reads OLLAMA_HOST (the Ollama
  runtime convention) after OLLAMA_API_BASE/API_BASE, normalizing a scheme-less
  value (e.g. "127.0.0.1:11434" -> "http://127.0.0.1:11434"), so users who set
  only OLLAMA_HOST see models from the server the crew will actually use.
- Empty vendor list: a successful vendor fetch returning no models is now
  authoritative instead of collapsing to the curated fallback. A reachable
  Ollama with nothing installed yields an empty list (the picker prompts for
  manual entry) rather than offering hardcoded models that aren't installed; a
  failed fetch still falls back. _from_vendor now returns [] on success-empty
  and None only when the tier is unavailable.
- Tests: ollama empty->manual, ollama down->fallback, OLLAMA_HOST resolution
  (29 total).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RBYGqJHC2TMC6fonFziuuh

* fix(cli): Gemini first-page failure falls back instead of showing empty

Interaction from the prior two fixes: _fetch_gemini swallowed a first-page
error and returned [], which _from_vendor reported as a successful-empty result
and get_provider_models treated as authoritative — skipping the curated Gemini
fallback and jumping to manual entry. Now a first-page failure (nothing gathered
yet) re-raises so _from_vendor returns None and the curated list is used; a
later-page failure still keeps the partial results.
Test: test_vendor_gemini_first_page_error_uses_fallback (30 total).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RBYGqJHC2TMC6fonFziuuh

* fix(cli): Gemini GOOGLE_API_KEY + Ollama recovery not blocked by cache

- Gemini ignores GOOGLE_API_KEY: _PROVIDER_KEY_ENV now maps each provider to a
  tuple of accepted env vars; Gemini accepts GEMINI_API_KEY or GOOGLE_API_KEY
  (matching crewai's own Gemini provider). A new _provider_api_key() resolver
  is used by both _from_vendor and the cache key, so a GOOGLE_API_KEY user gets
  the live models API instead of the stale curated fallback.
- Ollama recovery blocked by cache: skip the negative (fallback) cache for
  Ollama. It's a local, fast-failing server, so re-probing each call is cheap
  and lets the picker pick up real installed models as soon as the server comes
  up, instead of serving suggestions for the negative-cache TTL.
- Tests: GOOGLE_API_KEY live fetch, Ollama down->recover (32 total).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RBYGqJHC2TMC6fonFziuuh

* style(cli): ruff format model_catalog.py

Add the blank line ruff format expects after _provider_api_key; no behavior
change. Fixes the lint-run `ruff format --check lib/` step.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RBYGqJHC2TMC6fonFziuuh

* fix(cli): don't treat 'search' substring as a non-chat model marker

The 'search' entry in _NON_CHAT_MARKERS matched anywhere in a model id, dropping
legitimate completion models like gpt-4o-search-preview and anything containing
'research' (e.g. o3-deep-research, since 'search' is a substring). Remove it;
the remaining markers (embedding/audio/image/moderation/etc.) still filter
genuine non-chat models. Test: test_search_substring_not_treated_as_non_chat (33).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RBYGqJHC2TMC6fonFziuuh

* Revert "ci: ignore nltk PYSEC-2026-597 in pip-audit"

Do not suppress an unpatched security advisory to make CI green. Remove
PYSEC-2026-597 from the pip-audit ignore list; leave the scan failing so it
keeps surfacing the nltk path traversal (CVE-2026-12243). This PR should not be
merged until nltk ships a fix (or the vulnerable transitive dep is otherwise
resolved).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RBYGqJHC2TMC6fonFziuuh

* fix(cli): exclude fine-tuned models and checkpoints from the picker

With a live OPENAI_API_KEY, /v1/models returns the user's fine-tunes and
training checkpoints (ft:..., ...:ckpt-step-N). Their recent `created`
timestamps ranked them above the base models and filled every slot, so the
picker showed a wall of `ft:gpt-4o-mini-...:crewai::...` with mangled labels and
no foundation models at all. Skip fine-tunes/checkpoints in the OpenAI-shaped
fetcher so clean base models surface; a user who wants a fine-tune can still
enter it via the picker's "Other" option. Test:
test_openai_excludes_fine_tunes_and_checkpoints (34 total).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RBYGqJHC2TMC6fonFziuuh

* fix(cli): cleaner model labels + filter Ollama non-chat models

Anthropic/Gemini already use vendor display names; OpenAI/Groq/Cerebras/Ollama
fall to _humanize for anything outside the curated map, which produced mediocre
labels ("GPT Oss 120b", "qwen3 32b", "Deepseek r1", "llama3.3:70b").

Improve _humanize:
- split on ':' too (Ollama tags: llama3.3:70b -> "Llama3.3 70B")
- uppercase size suffixes (70b -> 70B), acronyms OSS/IT, brand casing
  (DeepSeek, ChatGPT, QwQ)
- capitalize the leading letter of fused family+version tokens (qwen3 -> Qwen3)
  while preserving OpenAI o-series lowercase (o3, o1-mini)

Also fix _fetch_ollama: /api/tags lists everything installed, so filter
non-chat (embedding) and fine-tune entries the same way the other tiers do.

Tests: expanded test_humanize + test_ollama_excludes_embedding_models (35 total).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RBYGqJHC2TMC6fonFziuuh

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com>
2026-07-06 20:49:52 -03:00
Lorenze Jay
e55e710df0 Implement message setup and feedback handling in AgentExecutor (#6465)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
* Implement message setup and feedback handling in AgentExecutor

- Added  method to streamline message preparation for agent execution, allowing for integration with human input providers.
- Introduced  and  methods to manage the state during feedback processing.
- Enhanced  and  methods to re-run the executor flow using existing feedback messages.
- Updated tests to verify the new message setup and feedback handling functionality, ensuring compatibility with human input providers.

* dont commit runner

* Remove xfail marker from test_crew_train_success as training feedback migration to AgentExecutor is complete.

* fix runtype errors

* fix test

* revert

* mypy fix

* handled reset iterations
2026-07-06 15:28:37 -07:00
Mani
56edf1f95f Added client name header (#6413)
- added client_name header to the 4 tavily tools to classify incoming requests as 'crewai' requests.

- This is for internal analysis

Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com>
2026-07-06 14:20:59 -07:00
Vinicius Brasil
2b90117e88 Add repository agents to flow definitions (#6437)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
Inline agent and crew actions can now use repository-backed agents
without duplicating role, goal, and backstory in each definition.

Examples:
* `agent.with.from_repository: support_specialist`
* `crew.with.agents.researcher.from_repository: researcher`

`PlusAPI.get_agent` now uses the shared synchronous request path so
project loaders can fetch repository agents without nested event loops.
2026-07-02 14:28:01 -07:00
Vinicius Brasil
24901cd4f6 Support templated Flow action inputs (#6426)
Flow action inputs now support `${...}` inside strings, not only
strings that are fully wrapped in one expression. This lets authored
flows use simple prompt-like values such as:

* `query: "News about ${state.topic}"`
* `input: "Ticket ${text(state, "ticket.id", "unknown")}"`
* `sources: ["${state.primary_source}", "archive-${state.topic}"]`

Whole-expression values still preserve their runtime type, so
`${state.limit}` remains a number and `${state.domains}` remains a list.
Mixed literal and expression strings render as text.

This removes the need to build labeled strings with CEL concatenation,
which was hard to read, easy to quote incorrectly in YAML, and a poor
fit for the Flow authoring skill examples.
2026-07-02 08:57:50 -07:00
Lorenze Jay
559a9c65c4 docs: snapshot and changelog for v1.15.2a2 (#6422)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2026-07-01 15:14:56 -07:00
Lorenze Jay
6244738d2a feat: bump versions to 1.15.2a2 (#6421) 2026-07-01 14:55:27 -07:00
Tiago Freire
8b197a7ca8 fix: include aiobotocore in the bedrock extra (#6419)
### Overview

`BedrockCompletion.acall()` (the async completion path used when a crew is kicked off asynchronously) requires `aiobotocore` to build its async client. The `bedrock` extra, however, only declared `boto3`. Crews configured with an AWS Bedrock model work fine under a synchronous `kickoff()`, since that path only needs `boto3`, but raise `NotImplementedError: Async support for AWS Bedrock requires aiobotocore` as soon as they're kicked off asynchronously, since `aiobotocore` was never installed.

The fix adds `aiobotocore` to the `bedrock` extra, so `crewai[bedrock]` installs both the sync (`boto3`) and async (`aiobotocore`) dependencies the native Bedrock provider needs. The lockfile is regenerated to match. The exception message is also corrected — it previously pointed to a `bedrock-async` extra that never existed in `pyproject.toml`.

### Changes

- `lib/crewai/pyproject.toml`: add `aiobotocore~=3.5.0` to the `bedrock` extra
- `uv.lock`: regenerated to reflect the updated `bedrock` extra
- `lib/crewai/src/crewai/llms/providers/bedrock/completion.py`: fix the install hint in the `NotImplementedError` message to reference the real `bedrock` extra instead of the nonexistent `bedrock-async`
2026-07-01 17:30:59 -04:00
Vinicius Brasil
f630c471cf Document flow agent options (#6420)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
* Document flow agent options

Document and type inline Flow agent options so authored flows can set:
* `llm.model`, `llm.max_tokens`, and `llm.max_completion_tokens`
* `planning_config.max_attempts`
* `allow_delegation`
* `max_iter`
* `max_rpm`
* `max_execution_time` in seconds

Also tell the flow skill to omit optional fields unless needed.

* Potential fix for pull request finding 'Unused import'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-07-01 14:08:44 -07:00
Vinicius Brasil
31a4a4e162 Squeeze AGENTS.md file (#6416) 2026-07-01 11:14:36 -07:00
Vinicius Brasil
1452ee2021 Add text helper to flow skill example (#6406)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2026-06-30 21:18:58 -07:00
Vinicius Brasil
629f5d537b Reject self-listening flow methods (#6405)
A method that listens to its own name can re-trigger itself or collide
with router events. Rejecting that definition keeps declarative and
Python-authored flows aligned before kickoff.
2026-06-30 19:42:01 -07:00
Vinicius Brasil
ba2dafdeda Add text helper for flow CEL prompts (#6404)
CEL string concatenation currently fails when prompt builders read
missing or null fields. This commit adds `text(root, "path", "default")`
custom CEL helper so prompt text can safely read nested state/output
values.
2026-06-30 16:45:39 -07:00
Lorenze Jay
b37505bcf9 Add streaming docs to the navigation (#6403) 2026-06-30 16:00:38 -07:00
Lorenze Jay
694881c7bf docs: snapshot and changelog for v1.15.2a1 (#6398)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
2026-06-30 13:17:53 -07:00
Lorenze Jay
958d8270db feat: bump versions to 1.15.2a1 (#6397) 2026-06-30 11:43:14 -07:00
Daniel Barreto
ba855bae2b feat: repoint template commands to crewAIInc-fde org (#6394)
Point `crewai template list`/`template add` at the crewAIInc-fde GitHub
org so the FDE template_* repos are listed and installed instead of the
crewAIInc ones.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com>
2026-06-30 11:32:54 -07:00
Vinicius Brasil
c157199065 Support inline skill definitions (#6396)
* Support inline skill definitions

This commit adds inline skill loading without a need for a file. It also
DRYs the skill loading feature.

* Address code review suggestions
2026-06-30 11:22:05 -07:00
Lorenze Jay
8eed457e70 Define stream frame protocol for flows (#6391)
* Define stream frame protocol for flows

* Add direct LLM streaming helpers

* Unify flow streaming frame items

* Update flow streaming integration properties

* Drop stream frame debug runner example

* Address streaming contract review feedback

* Replay cached stream frame projections

* Remove stream frame version field

* Fix streaming contract docs link

* Preserve LLM instance state for stream events

* Address streaming review cleanup
2026-06-30 10:53:48 -07:00
Vinicius Brasil
04fec31f1e Type tool and app in CrewDefinition (#6395)
* Type tool and app in CrewDefinition

This commit fixes a bug in the CrewDefinition class where the tool and
app were not being added.

* Type mcps= parameter
2026-06-30 10:24:21 -07:00
Vinicius Brasil
1556dbea3e Add generated Flow Definition authoring skill (#6393)
* Add generated Flow Definition authoring skill

Generate a portable skill from the Flow Definition schema so agents can
author valid declarative flows with the same reference CrewAI uses to
validate them. New declarative flow projects now write this skill.

```python
from crewai.flow.flow_definition import FlowDefinition
skill = FlowDefinition.skill(skips=(), examples_format="yaml")
```

* `examples_format` accepts `"yaml"` or `"json"`.
* Supported skips: `conversational`, `non_linear_flows`, `each`, `hitl`, `persistence`, `config`, `expression_action`, `script_action`, `tool_action`

The generated skill includes authoring rules, a routed crew example, and
an API reference extracted from the Flow, action, state, agent, crew,
and task Pydantic schemas.

* Fix declarative flow scaffold without framework import

* Fix skipped expression action guidance

* Fix markdown links in skill
2026-06-30 09:13:33 -07:00
Lucas Gomide
e8dced8a2d docs: document Cost Limit rule type in Agent Control Plane (#6387)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2026-06-29 14:56:13 -03:00
Lucas Gomide
2b87098279 fix: cut docs version nav from Edge so new pages aren't dropped (#6349)
* fix: freeze docs version nav from Edge instead of previous release

The docs cut copied every Edge file into the new `docs/v<X.Y.Z>/`
snapshot but built that version's `docs.json` navigation by cloning the
previous frozen release and only rewriting path prefixes. Pages added to
Edge since the last release were therefore copied to disk yet never
linked in the version selector, which is why the v1.15.0 cut shipped
without the Datadog guide. `_build_new_entry` now clones the Edge nav
entry and rewrites `edge/<locale>/` to `v<new>/<locale>/`, so promoting
Edge to Latest carries every current page and nav restructuring.

* docs: link the v1.15.0 Datadog guide dropped during the cut

The v1.15.0 freeze copied `enterprise/guides/datadog` into the snapshot
for every locale but never linked it in `docs.json`, because the cut
cloned the v1.14.7 nav instead of Edge. This backfills the missing nav
reference in the `en`, `pt-BR`, `ko`, and `ar` v1.15.0 blocks so the
already-shipped page is reachable from the version selector. Pairs with
the `_build_new_entry` fix that prevents future cuts from dropping pages.

* docs: link the v1.15.1 Datadog guide dropped during the cut

The v1.15.1 cut ran before the freeze-from-Edge fix landed, so it
inherited the same bug as v1.15.0: `enterprise/guides/datadog` was
copied into the snapshot for every locale but never linked in
`docs.json`. This backfills the missing nav reference in the `en`,
`pt-BR`, `ko`, and `ar` v1.15.1 blocks so the page is reachable from the
version selector.
2026-06-29 10:03:26 -04:00
Lucas Gomide
4379c45804 docs: drop CREWAI_LOG_FORMAT references from Datadog guide (#6307)
JSON-formatted stdout is now the only supported log shape in CrewAI
Enterprise — the `CREWAI_LOG_FORMAT=json` opt-in env var is gone and
no longer needs to be configured in AMP. Removes the "Enabling JSON
output" section, the env-var setup step, the troubleshooting check,
and the `legacy text mode` comparison across the four locale copies
(`en`, `ko`, `pt-BR`, `ar`) of `docs/edge/<lang>/enterprise/guides/datadog.mdx`.
2026-06-29 09:04:49 -04:00
João Moura
6491f5a663 [docs-freeze] docs: snapshot and changelog for v1.15.1 (#6367)
Some checks failed
Mark stale issues and pull requests / stale (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
2026-06-27 03:50:32 -03:00
João Moura
340f6ad5b8 feat: bump versions to 1.15.1 (#6366) 2026-06-27 03:48:21 -03:00
João Moura
04adff1e0e Fix deployment page link id resolution (#6365) 2026-06-27 03:19:46 -03:00
Vinicius Brasil
e1ddb32e56 Initialize Git repositories for generated projects (#6364)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
2026-06-26 16:29:49 -07:00
Ossama Alami
05ab1ece8e docs(readme): improve open source positioning (#6363) 2026-06-26 16:06:16 -07:00
Lorenze Jay
e716f3de8b docs: snapshot and changelog for v1.15.1a1 (#6362) 2026-06-26 15:16:43 -07:00
Lorenze Jay
1e2c965a75 feat: bump versions to 1.15.1a1 (#6361) 2026-06-26 15:12:37 -07:00
Vinicius Brasil
a149a30bc0 Fix JSON crew template rendering (#6359)
JSON crews were not using existing CLI templates.
2026-06-26 13:48:48 -07:00
João Moura
8eaae40acf Track TUI button telemetry (#6346)
* feat(cli): track TUI button telemetry

* fix(cli): use feature usage telemetry for TUI buttons

---------

Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com>
2026-06-26 12:28:47 -07:00
Vinicius Brasil
596150188b Require explicit CrewAI project definitions (#6358)
* Require explicit CrewAI project definitions

JSON crews and declarative flows now resolve from `[tool.crewai]`
metadata instead of implicit filename discovery. This makes project type
selection deterministic, prevents stray `crew.json(c)` files from changing
CLI behavior, and centralizes definition path validation for run, install,
deploy validation, plotting, and memory reset paths.

`[tool.crewai].definition` must be a project-local file path. Absolute
paths, `~`, missing files, directories, and paths escaping the project root
are rejected so deploy and runtime commands use the same contract.

Breaking changes and migration paths:

* JSON crew projects are no longer discovered from `crew.json` or
  `crew.jsonc` alone. Add explicit metadata:

  ```toml
  [tool.crewai]
  type = "crew"
  definition = "crew.jsonc"
  ```

* Declarative flow projects must use a valid project-local definition path:

  ```toml
  [tool.crewai]
  type = "flow"
  definition = "flows/research.yaml"
  ```

* `Flow.from_definition(definition)` is removed. Use:

  ```python
  Flow.from_declaration(contents=definition)
  ```

* `FlowDefinition.to_json()` and `FlowDefinition.to_yaml()` are removed.
  Use `FlowDefinition.to_dict()` and serialize with the caller's JSON or
  YAML library.

* `FlowDefinition.from_dict()` is removed. Use:

  ```python
  FlowDefinition.from_declaration(contents=data)
  ```

* `FlowDefinition.json_schema()` is removed. Use Pydantic's schema API only
  where schema generation is intentionally needed:

  ```python
  FlowDefinition.model_json_schema(by_alias=True)
  ```

* `crewai_cli.run_crew.find_crew_json_file()` and `_has_json_crew()` are
  removed. Use `configured_project_json_crew()` or the shared
  `crewai_core.project.configured_project_definition("crew")` helper.

* `crewai reset-memories` now only loads JSON crews declared through
  `[tool.crewai].definition`, and invalid declared JSON crew definitions
  fail instead of silently falling back to classic crew discovery.

* Address code review comments
2026-06-26 12:07:03 -07:00
João Moura
e10c17fcf6 Open deployment page after CLI deploy (#6343)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
* Open deployment page after CLI deploy

* Format deploy browser URL helper

* Handle browser launch failures

* Prefer nested deployment identifiers
2026-06-26 14:34:07 -03:00
João Moura
f364a7d988 Fix JSON crew version pin (#6342)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* Fix JSON crew version pin

* Use bounded CrewAI dependency range
2026-06-26 05:19:14 -03:00
João Moura
2771c02f45 docs: improve coding agent setup CTA (#6344)
* docs: improve coding agent setup CTA

* docs: move home CTA to published index

* docs: address CTA review feedback
2026-06-26 05:10:55 -03:00
Rip&Tear
5d4851eac7 Fix SSRF redirect bypass in scraping fetches (#6331)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
* Validate redirects for scraping URL fetches

* Prevent credential forwarding across redirects
2026-06-25 17:42:49 -07:00
Lorenze Jay
b6fbe078d6 [docs-freeze] docs: snapshot and changelog for v1.15.0 (#6340) 2026-06-25 16:17:40 -07:00
Lorenze Jay
54e28c155e feat: bump versions to 1.15.0 (#6339) 2026-06-25 16:10:48 -07:00
Lorenze Jay
9b31226494 Track conversational flow turn usage in telemetry (#6324)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
* Track conversational flow turn usage in telemetry

* adjusted name to flow:conversation_turn

* only mark on turn completed event

* ensure tui also emits these events
2026-06-25 11:02:07 -07:00
Rip&Tear
654abcb40d fix: enforce owner-only permissions on credential files (#6242)
* fix: enforce owner-only permissions on credential files

Credentials stored at rest were left world-readable on multi-user hosts:

- TokenManager._get_secure_storage_path() documented its credential dir as
  mode 0o700 but created it via mkdir() with default perms (0o755), leaving
  the Fernet secret.key and encrypted tokens.enc in a traversable dir.
- Settings.dump() persisted tool_repository_password (plaintext) to
  settings.json via open("w"), producing a 0o644 file, and created the
  config dir at 0o755 — despite the sibling token_manager already writing
  secrets atomically at 0o600.

Fixes:
- TokenManager: chmod the credential dir to 0o700 after mkdir (robust against
  umask and pre-existing dirs).
- Settings: write settings.json atomically at 0o600 (mkstemp + chmod +
  os.replace) and chmod the dedicated config dir to 0o700. The /tmp and cwd
  fallback parents are deliberately not chmod'd; the 0o600 file mode protects
  the credential there.

Adds regression tests asserting 0o600 files and 0o700 dirs, and that shared
fallback dirs are not globally tightened.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Potential fix for pull request finding 'Empty except'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

* Potential fix for pull request finding 'Empty except'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>

* Close temp fd on secure settings write failure

* Log secure settings fd close failures

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
2026-06-26 01:36:48 +08:00
Rip&Tear
01fc389d4a Restrict docs broken-links workflow permissions (#6330)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2026-06-25 10:52:33 +08:00
Vinicius Brasil
178c2d212c docs: snapshot and changelog for v1.14.8a5 (#6329)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
2026-06-24 17:31:32 -07:00
Vinicius Brasil
563b55f7ca feat: bump versions to 1.14.8a5 (#6328) 2026-06-24 17:25:08 -07:00
Vinicius Brasil
340d23ae5d Remove StateProxy from flow state access (#6327)
`StateProxy` looked like a thread-safety boundary, but it only protected
a small slice of state operations. Some examples of operations that were
not covered:

- `self.state.counter += 1`, `self.state["counter"] += 1` (increments)
- `self.state.user.profile.score += 1` (nested object mutations)
- `self.state.config["limits"]["max"] = 10` (mutation through model fields)
- `self.state.items[0].status = "done"` (list/container mutations)

This commit decided to remove it completely for simplicity and
performance:

- Simpler runtime code
- attr read: 24x faster, attr write: 27x faster, list append: 19x faster (local benchmark)
- Clearer concurrency contract (lifecycle locks remain, but arbitrary
  shared state mutation is not presented as thread-safe)
2026-06-24 16:37:51 -07:00
Vinicius Brasil
7738a1d30c Make declarative refs work across flows and crews (#6326)
Declarative flows already used `module:qualname` refs for runtime
objects, but crew JSON tools still had their own lookup path. That meant
examples like `project_tools:LookupTool` were treated as named
`crewai_tools` lookups and failed with guidance that only mentioned
`SerperDevTool` or `custom:<name>`. Invalid refs such as
`not_tools:NotATool` also missed the same BaseTool validation used by
flow tool actions.

Move ref resolution into a shared declarative helper, use it from flow
tool actions and crew JSON loading, and require tool refs to resolve to
`BaseTool` classes before instantiation. Validation still checks tool
refs structurally, so validating a crew does not import or execute
project code.
2026-06-24 15:11:59 -07:00
Vinicius Brasil
156b3500b4 Fix JSON schema flow state kickoff inputs (#6325)
Allow required JSON schema state fields to be supplied by kickoff inputs
instead of requiring every field to exist in state.default before
runtime.

Example: a flow with required lead_name and no state.default can now run
with kickoff inputs={"lead_name": "Ada Lovelace"}.
2026-06-24 13:55:38 -07:00
Jesse Miller
5827abbc17 docs: nest One Card per Step under Crew Studio and drop rollout banner (AGE-107) (#6317)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
The page itself already landed on main via #6247. This rebases onto main
and applies the two remaining changes:

- Nest crew-studio + merged-step-card into a collapsible "Crew Studio"
  nav group (pencil icon), across edge and v1.14.7 in en, pt-BR, ko, ar.
- Remove the temporary "Rolling out" Note banner (feature ships today).

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 13:36:49 -04:00
Vinicius Brasil
9d0e3a841b docs: snapshot and changelog for v1.14.8a4 (#6319) 2026-06-24 09:19:33 -07:00
Vinicius Brasil
12a5e91efb feat: bump versions to 1.14.8a4 (#6318) 2026-06-24 09:14:14 -07:00
Rip&Tear
fac3e3579b Fix symlink path traversal in skill archive extraction (#6235)
* Fix symlink path traversal in skill archive extraction

`_safe_extractall` (the Python < 3.12 fallback used by `crewai skills`
archive unpacking) validated each member's *name* against the destination
but never validated symlink/hardlink *targets*. A malicious skill tarball
could plant a symlink escaping the destination (e.g. `link -> /home/user/.ssh`)
followed by a regular member written through it (`link/authorized_keys`),
escaping `dest` even though every member name resolves inside it — the
classic symlink-extraction traversal.

The 3.12+ path (`extractall(..., filter="data")`) already blocks this; the
fallback now mirrors it by rejecting absolute link targets and any link
target that resolves outside the destination directory.

Adds regression tests covering absolute and relative escaping symlinks plus
benign in-tree symlinks and ordinary archives.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* Harden skill cache archive extraction

* Reject special skill archive members

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 08:50:41 -07:00
Vinicius Brasil
a046e6a50b Validate declarative flow definition paths (#6311)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2026-06-23 19:28:35 -07:00
Lorenze Jay
1862ff8f6c Support conversational flows in the CLI TUI (#6293)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
* Add conversational flow TUI support

* properly support tui
2026-06-23 18:04:09 -07:00
Vinicius Brasil
f2a074e35b docs: snapshot and changelog for v1.14.8a3 (#6310) 2026-06-23 14:11:31 -07:00
Vinicius Brasil
658b8ee8b9 feat: bump versions to 1.14.8a3 (#6309) 2026-06-23 14:05:23 -07:00
Vinicius Brasil
3452e5c187 Add unified declarative flow loading (#6308)
Add a single declaration loader shared by API and CLI callers.

- Add FlowDefinition.from_declaration for FlowDefinition instances, dictionaries, YAML/JSON strings, and file paths
- Add Flow.from_declaration to build runnable flows directly from the same inputs
- Route declarative flow CLI loading through Flow.from_declaration so path handling and validation stay centralized

```
# Load just the serializable definition when you do not need to run it yet.
definition = FlowDefinition.from_declaration(path="flows/research.crewai")
definition = FlowDefinition.from_declaration(contents=flow_yaml)
definition = FlowDefinition.from_declaration(contents=flow_dict)

# Build a runnable flow directly from the same declaration inputs.
flow = Flow.from_declaration(path="flows/research.crewai")
flow = Flow.from_declaration(contents=flow_yaml)
flow = Flow.from_declaration(contents=flow_dict)
flow = Flow.from_declaration(contents=definition)

# Run it like any other flow.
result = flow.kickoff(inputs={"topic": "AI agents"})

# The CLI now goes through the same path-based loader.
# crewai run --definition flows/research.crewai
```
2026-06-23 12:02:18 -07:00
Lucas Gomide
793539173d fix: pin opentelemetry to ~=1.42.0 (#6292)
The previous `~=1.34.0` pin kept us on the unmaintained 1.34 line —
last patched as `1.34.1` in June 2025, eight minor releases behind
upstream — and caused `_create_exp_backoff_generator` `ImportError`
crashes in factory deployments where the OpenTelemetry Operator's
injected init container shadows
`opentelemetry.exporter.otlp.proto.common._internal` with >=1.35 while
our `opentelemetry-exporter-otlp-proto-grpc==1.34.1` still imports the
removed private symbol. Pinning to `~=1.42.0` tracks the current
upstream stable line; the resolver now lands on 1.42.1 and our public
OTel trace API usage is unaffected.
2026-06-23 14:51:22 -04:00
Vinicius Brasil
2eb4e3a236 Improve crewai run startup UX (#6297)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Remove redundant startup logs from `crewai run` and make the legacy flow
command warning actionable.

- Stop printing `Running the Flow` and `Running the Crew` before project
  execution.
- Stop printing the redundant `Flow started with ID: ...` line while
  preserving flow lifecycle event emission.
- Replace Click's generic `kickoff` deprecation warning with a clearer
  message that tells users to use `crewai run`.
2026-06-22 22:31:39 -07:00
Vinicius Brasil
221dfdb08e Consolidate crewai run and crewai flow kickoff (#6296)
Make `crewai run` the single execution path for crews and flows, with
`crewai flow kickoff` kept as a deprecated compatibility alias.
2026-06-22 20:44:08 -07:00
Vinicius Brasil
720a4c7216 Keep flow method progress visible for nested crews (#6295)
Inline crews default to `verbose=False`. They set the shared formatter's
`verbose` value in `lib/crewai/src/crewai/crew.py`, which could hide
flow method status from `lib/crewai/src/crewai/events/utils/
console_formatter.py`.

Remove that `verbose` check for flow method status. Flow output is still
controlled by `suppress_flow_events`.

Normal quiet crews are unchanged because crew, task, and agent logs
still use their own `verbose` checks.
2026-06-22 20:37:16 -07:00
Vinicius Brasil
4b2ce00a09 Add declarative Flow CLI support (#6294)
* Add declarative Flow CLI support

Currently, declarative flows can be loaded by the runtime, but the CLI
still treats them as an experimental definition file instead of a
first-class Flow project shape.

With this PR, `crewai create flow --declarative` scaffolds a YAML-backed
Flow project, and `crewai run`, `crewai flow kickoff`, and `crewai flow
plot` can run against the configured definition.

This also lets crew actions reference reusable crew definition files or
folders and override their inputs from the Flow definition, so
declarative flows can compose existing declarative crews without
inlining everything.

* Address code review comments
2026-06-22 19:58:17 -07:00
Vinicius Brasil
0391febc6c Allow @router() as start method of a flow (#6288)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
This commit fixes a bug where a router method could not be the start
method of a flow.

This is useful when you want to route against the initial state, or even
stack two routers.
2026-06-22 14:04:45 -07:00
João Moura
4cbfbdb232 Keep JSON crew projects and deploy archives Python-free (#6228)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
* fix: scaffold deployable json crews

* fix: keep json crew scaffolds python-free

* fix: keep json deploy archives python-free

* fix: tighten json crew deploy validation

* fix: address json crew pr checks

* fix: clear langsmith audit advisory
2026-06-22 13:22:46 -03:00
Vinicius Brasil
9db2d44766 Add typed output schemas for CrewAI tools (#6236)
Some checks failed
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Currently, tools have a strong input contract through `args_schema`, but no
output contract. This means that anything a tool outputs is converted to
string.

Not only the contract is weak, but the "invisible" conversion to string can
have unexpected effects when the tool returns complex objects like dicts and
arrays.

With this PR, a tool can _optionally_ define an output contract with
`output_schema`. CrewAI validates the raw result and sends the agent JSON.

```python
class ProductResult(BaseModel):
    sku: str
    name: str
    in_stock: bool

class ProductLookupTool(BaseTool):
    name: str = "Product Lookup"
    description: str = "Look up product availability by SKU."

    def _run(self, sku: str) -> ProductResult:
        return ProductResult(sku=sku, name="USB-C dock", in_stock=True)
```

If the result does not match the schema, CrewAI warns and falls back to
`str(raw_result)` instead of failing the run:

```python
@tool("Product Lookup", output_schema=ProductResult)
def product_lookup(sku: str) -> dict[str, object]:
    return {"sku": sku, "name": "USB-C dock", "in_stock": True}

#=> RuntimeWarning: Failed to validate or serialize output from tool 'Bad Product Lookup' using output_schema 'ProductResult'... Falling back to str(raw_result).
```

This is additive and non-breaking. Existing tools do not need to change. Tools
without `output_schema` keep the old string behavior. Invalid typed outputs
warn and fall back to the old formatting path.
2026-06-19 14:33:51 -07:00
Jesse Miller
cf04181190 docs: add "One Card per Step" Studio page (AGE-107) (#6247)
* docs: add "One Card per Step" Studio page (AGE-107)

Document the merge of the task and agent nodes into a single step card on
the Studio canvas. Written as evergreen present-tense feature docs with a
dated rollout banner (June 24th) for the pre-launch customer announcement;
the banner is the only time-bound content and is flagged for removal after
ship. Added in edge + v1.14.7 across en, pt-BR, ko, and ar, with nav entries
in docs.json and three canvas/editor/swap screenshots.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix: bump bedrock agentcore dependencies

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: alex-clawd <alex@crewai.com>
2026-06-19 13:10:25 -04:00
Vinicius Brasil
854c67d21c docs: snapshot and changelog for v1.14.8a2 (#6230)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2026-06-18 16:42:17 -07:00
Vinicius Brasil
f48a6389f1 feat: bump versions to 1.14.8a2 (#6229) 2026-06-18 16:37:27 -07:00
Vinicius Brasil
bc2c2a858c Add single agent action to Flow definitions (#6226)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
* Add single agent action to Flow definitions

Lets a flow method build and run a single CrewAI agent directly, without
wrapping it in a crew. Same idea as the existing `crew` action, but for
one agent.

  methods:
    answer:
      do:
        call: agent
        with:
          role: Analyst
          goal: Answer questions
          backstory: Knows things.
          input: "${state.question}"
      start: true

* `input` is required and interpolated from flow state, like
  `${state.question}` or `${item}` inside an `each` loop
* optional `response_format` points at a Pydantic model (`{"python":
  "models.AnswerModel"}`) to get structured output
* `input` must be a string and its CEL is validated at load time, so bad
  expressions like `${state.}` fail early

* Simplify test code
2026-06-18 14:53:33 -07:00
Lucas Gomide
fa89ac428e docs: add Datadog integration guide with importable operations dashboard (#6225)
Adds a consolidated `datadog.mdx` under `docs/edge/{en,pt-BR,ko,ar}/enterprise/guides/`
covering both the Datadog Agent path (stdout JSON logs via `CREWAI_LOG_FORMAT=json`)
and the Datadog OTLP intake, with a JSON log schema reference and a ready-to-import
operations dashboard (`datadog_dashboard.json`). Reframes `capture_telemetry_logs.mdx`
to lead with OpenTelemetry as the vendor-neutral path and point readers to the new
Datadog page for that ecosystem's setup.
2026-06-18 16:18:42 -04:00
Vinicius Brasil
b0816e00b6 Validate flow CEL expressions at definition load time (#6224)
* Validate flow CEL expressions at definition load time

Promote CEL expression handling to a public Expression API and validate expressions when a FlowDefinition is built instead of when it executes.

Invalid CEL syntax or unknown roots now raise ValidationError from FlowDefinition.from_yaml() and FlowDefinition.from_dict(). Expressions may reference state and outputs, plus item inside each.do; bare identifiers are rejected as unknown roots.

For with values, the CEL contract is intentionally simple: after trimming whitespace, a string is evaluated as CEL only if it starts with ${ and ends with }. Anything else is treated as a literal value, so partial interpolation is not supported. If the content inside the wrapper is not valid CEL, validation fails.

Examples:

```text
"${state.topic}"          -> evaluated, returns state.topic
"topic is ${state.topic}" -> literal string
"${state.topic} suffix"   -> literal string
"${'a'}${'b'}"              -> invalid CEL
```

* Honor explicit empty-context overrides in evaluate() / render_template()
2026-06-18 12:18:22 -07:00
João Moura
8153b67f5d docs: snapshot and changelog for v1.14.8a1 (#6223) 2026-06-18 14:46:37 -03:00
João Moura
c226722e22 feat: bump versions to 1.14.8a1 (#6222)
* test

* feat: bump versions to 1.14.8a1
2026-06-18 14:44:10 -03:00
Vinicius Brasil
b5e23a87f2 Add optional if expression to each.do steps (#6214)
* Use explicit name/action shape for each.do steps

* Add optional `if` expression to `each.do` steps

Lets a step inside an `each` action run conditionally based on a CEL
expression evaluated against `item` and prior step `outputs`.
2026-06-18 10:33:13 -07:00
João Moura
504c5c9b04 JSON crew fixes (#6217)
* feat: update pyproject.toml to specify wheel targets

Added a new section to the pyproject.toml file to include only specific files in the wheel build, enhancing the packaging process. Updated tests to verify the inclusion of these targets.

* feat: add memory save event handling to activity log

Implemented event handlers for MemorySaveStartedEvent, MemorySaveCompletedEvent, and MemorySaveFailedEvent in the crew_run_tui module. This allows the application to log memory save operations, capturing their status and details in the activity log. Added corresponding tests to verify the correct logging behavior for successful and failed memory saves.

* feat: enhance memory save event handling in activity log

Added functionality to suppress nested memory save events and updated the handling of MemorySaveStartedEvent, MemorySaveCompletedEvent, and MemorySaveFailedEvent to improve logging accuracy. Introduced new tests to verify the correct behavior of memory save events, including scenarios for nested events and completion updates for timed-out entries.

* Fix memory save activity log handling

* Normalize alpha package versions

* Update scaffolded crew dependency

* feat: add button to copy setup instructions for CrewAI coding agents

Introduced a button in the documentation that allows users to easily copy setup instructions for CrewAI coding agents. The instructions include installation steps, environment setup, and best practices for using the CrewAI CLI. This enhancement aims to streamline the onboarding process for new users.

* Improve missing CrewAI install guidance

* fix: address pr review feedback

* fix: avoid mismatched memory save rows

* fix: wait for queued memory save events

* fix: avoid matching memory saves on missing ids

* chore: normalize prerelease version to 1.14.8a1
2026-06-18 14:14:54 -03:00
João Moura
c0fa66d182 docs: snapshot and changelog for v1.14.8a (#6216)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2026-06-18 02:42:41 -03:00
João Moura
6c41d55fe2 feat: bump versions to 1.14.8a (#6215) 2026-06-18 02:39:42 -03:00
Vinicius Brasil
218dc82bf7 Replace flow diagnostics with logging (#6212)
This commit removes flow diagnostics from the definition. These were
used for logging only, and should not be coupled to the definition.
2026-06-17 19:37:52 -07:00
Vinicius Brasil
7374486f00 Document FlowDefinition fields in the JSON schema (#6198)
Add a description and examples to every FlowDefinition field and
standardize on `typing.Literal`, so the generated JSON schema documents
itself — each action discriminator, state branch, and config option
explains what it is and shows a realistic value.

Examples live on individual fields only, never at the model level, which
keeps the schema readable for tooling that renders field-level help.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 18:49:01 -07:00
Vinicius Brasil
5bd10ee2c4 Add script/code block action to FlowDefinition (#6197)
* Add script/code blocks to FlowDefinition

Let a Flow method run trusted inline Python with `call: script`. The code
is compiled once into a generated function and receives the runtime
values as arguments.

```yaml
methods:
  normalize:
    start: true
    do:
      call: script
      code: |
        import math
        state["rounded"] = math.ceil(state["raw_score"])
        return f"rounded:{state['rounded']}"
```

Even though this shares the same surface of tools (custom code), I
decided to make it opt-in for now, using
`CREWAI_ALLOW_FLOW_SCRIPT_EXECUTION=1`.

* Address code review comments
2026-06-17 18:38:41 -07:00
iris-clawd
9d70553515 Use safe expression parser in calculator tool example (#6211)
* Replace eval with safe expression parser in calculator tool example

Update the calculator tool example in the CLI template to use
ast.parse instead of eval for expression evaluation.

Co-authored-by: Vinicius Brasil <vini@hey.com>

* Replace calculator example with practical file reader tool

* Use word count example - safe, no file/eval risk

---------

Co-authored-by: Vinicius Brasil <vini@hey.com>
2026-06-17 16:59:26 -07:00
Gabe Milani
0a577b7d05 fix: remove duplicated Exa tool (#6205)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
* fix: remove duplicated Exa tool

* fix tests
2026-06-17 14:41:44 -07:00
Greyson LaLonde
431100ddca fix(deps): widen litellm extra to >=1.84,<2
The litellm extra was capped at <1.85, which excludes future
patch lines and reintroduces resolution failures under uv/pip.
Widen to >=1.84.0,<2 so the extra resolves cleanly against
crewai's openai/python-dotenv pins.

Closes OSS-71
2026-06-17 10:07:19 -07:00
Lucas Gomide
a237ebabba feat: adopt directory-based docs versioning with Edge channel (#6202)
* feat: adopt directory-based docs versioning with Edge channel

Switch docs.crewai.com from navigation-only versioning (every version
selector entry rendered the same docs/<lang>/* source files) to
Mintlify's directory-based versioning so each version selector entry
renders its own snapshot. Add an "Edge" channel under docs/edge/<lang>/*
that always reflects main HEAD for unreleased work, eliminating
pre-release leakage onto frozen release labels. External links to
canonical /<lang>/* URLs are preserved via wildcard redirects that
always land on the current default version.

Layout:
- docs/edge/<lang>/*         rolling source (you edit here)
- docs/edge/enterprise-api.*.yaml
- docs/v<X.Y.Z>/<lang>/*     frozen, immutable snapshots
- docs/v<X.Y.Z>/enterprise-api.*.yaml
- docs/images/               shared, append-only
- docs/docs.json             nav + redirects

URLs follow the Mintlify-idiomatic shape: /edge/<lang>/<page> for
Edge, /v<X.Y.Z>/<lang>/<page> for every frozen snapshot. The wildcard
redirects /<lang>/:slug* -> /<default>/<lang>/:slug* keep stale links
working, and every freeze rewrites them (plus all per-section/per-page
redirects) so destinations always resolve to the current default
without depending on a second redirect hop.

Release flow integration (devtools release):
- New module crewai_devtools.docs_versioning.freeze() materialises
  docs/v<X.Y.Z>/ from docs/edge/, rewrites openapi: refs inside the
  snapshot, inserts the version into every language block in
  docs.json, and refreshes all redirect destinations.
- _update_docs_and_create_pr() in cli.py now calls that freeze during
  Phase 2 of devtools release. Edge changelogs are updated first (so
  the snapshot freeze picks them up), then the snapshot is staged
  alongside docs.json, branched as docs/freeze-v<X.Y.Z>, and the PR
  is titled [docs-freeze] docs: snapshot and changelog for v<X.Y.Z>
  — the title prefix the new CI guard reads.
- The PR still gates tag, GitHub release, PyPI publish, and the
  enterprise release as before; no new PRs are added.
- Pre-releases (1.X.YaN, 1.X.YbN, ...) skip the snapshot — they ride
  Edge — and the docs PR title omits the [docs-freeze] prefix.
- docs_check (AI-generated docs scaffolding) writes to
  docs/edge/<lang>/* so newly-generated unreleased docs land in Edge
  and never accidentally touch a frozen snapshot.

Migration scripts (one-shot):
- scripts/docs/freeze_historical_versions.py reconstructs all 16
  historical snapshots (v1.10.0 .. v1.14.7) from git tags via
  git archive | tar, rewriting openapi: MDX refs so each snapshot
  reads its own enterprise-api YAML rather than the live one.
- scripts/docs/prefix_version_paths.py one-shot-migrates docs.json:
  rewrites every page path in 16 versioned blocks to point under
  docs/v<X.Y.Z>/, inserts a new Edge entry per language, tags
  v1.14.7 as Latest (default), prunes pages whose target file
  doesn't exist in the snapshot (e.g. docs/ar/ didn't exist before
  v1.12.0), and writes the wildcard + per-section redirects.
- scripts/docs/freeze_current_edge.py is now a thin CLI wrapper
  around docs_versioning.freeze for manual one-off freezes (e.g.
  retroactively snapshotting a forgotten release).

CI guards (.github/workflows/docs-snapshots.yml):
- Frozen snapshots under docs/v[0-9]*/ are immutable; only PRs whose
  title contains [docs-freeze] (i.e. release-cut PRs generated by
  devtools release or the manual wrapper) may modify them.
- Images under docs/images/ are append-only since snapshots share a
  single image directory. Deleting or renaming an image breaks every
  historical snapshot that still references it.

Restored docs/images/crewai-otel-export.png from PR #3673; it was
deleted in PR #4908 but v1.10.0 / v1.10.1 snapshots still reference
it. Restoring instead of editing the snapshots preserves historical
rendering fidelity and validates the new append-only rule
retroactively.

Tests:
- lib/devtools/tests/test_docs_versioning.py covers the freeze: file
  copy, openapi rewrite, version insertion, default demotion, redirect
  upserts, per-section redirect rewriting, idempotency, and invalid
  inputs.

Verified locally with mintlify broken-links: 0 broken links across
the full site (Edge + 16 frozen versions, 4 locales).

AGENTS.md (repo root) is the contributor guide for the new model;
RELEASING.md is the release-cut runbook; README's Contribution
section links to both.

Co-authored-by: Cursor <cursoragent@cursor.com>

* style: resolve linter issues

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 11:56:59 -04:00
João Moura
d3c37c4a40 Enhance memory reset functionality and JSON crew handling (#6195)
* Enhance memory reset functionality and JSON crew handling

- Added `reset_all` method to the `Memory` class to reset the entire memory store, ignoring `root_scope`.
- Updated the `Crew` class to utilize `reset_all` when resetting memory.
- Enhanced the `_reset_flow_memory` function to check for `Memory` instances and call `reset_all` accordingly.
- Introduced helper functions to load JSON crew configurations and handle project declarations, improving the reset command's flexibility.
- Added tests to validate the new JSON crew memory reset behavior and ensure proper handling of declared flow projects.

* Fix memory reset review issues

* Bump litellm for security advisory
2026-06-17 12:14:50 -03:00
Vinicius Brasil
7bb9bc7e1a Discriminate FlowDefinition state types (#6196)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Replace the single FlowStateDefinition model with a `type`-discriminated
union of FlowDictStateDefinition, FlowPydanticStateDefinition,
FlowJsonSchemaStateDefinition, and FlowUnknownStateDefinition.

Each branch only carries the fields it actually uses and forbids extras,
so an invalid combination like a `dict` state with a `ref` now fails
validation instead of being silently accepted. The runtime reads `ref`
and `json_schema` defensively since they no longer exist on every branch.

```yaml
state:
  type: json_schema
  json_schema:
    type: object
    properties:
      topic:
        type: string
```

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-16 21:31:07 -07:00
João Moura
ee4f853270 Update installation and quickstart documentation for JSON-first crew projects (#6181)
* Update installation and quickstart documentation for JSON-first crew projects

- Revised the installation guide to reflect the new JSON-first project structure, detailing the creation of `crew.jsonc` and `agents/*.jsonc` files.
- Updated the quickstart guide to demonstrate setting up agents and tasks using JSONC format, replacing previous YAML examples.
- Enhanced the agents and tasks documentation to clarify the transition from YAML to JSONC, including examples and explanations of the new structure.
- Added notes on the classic YAML structure for legacy projects and provided guidance on migrating to the new format.

* docs: clarify json crew quickstart guidance

* docs: address json docs review feedback
2026-06-16 19:55:23 -03:00
João Moura
ebbc0998ef Implement DMN mode support in crew creation and execution (#6194)
* Implement DMN mode support in crew creation and execution

- Added `is_dmn_mode_enabled` utility to check for enterprise non-interactive mode based on the `CREWAI_DMN` environment variable.
- Updated `create` function in `cli.py` to enforce required parameters when DMN mode is active, raising appropriate usage errors.
- Enhanced `create_crew` and `create_json_crew` functions to skip provider prompts and handle folder existence checks in DMN mode.
- Introduced non-interactive defaults for agent and task creation in DMN mode, ensuring seamless project setup without user input.
- Modified `run_crew` to bypass TUI and handle runtime inputs directly when in DMN mode, improving execution flow for JSON-defined crews.
- Added tests to validate DMN mode behavior, ensuring correct handling of required inputs and non-interactive defaults.

* Implement DMN mode support in crew creation and execution

- Introduced `is_dmn_mode_enabled()` utility to check for non-interactive mode based on the `CREWAI_DMN` environment variable.
- Updated `create` function to enforce required parameters when DMN mode is active, raising appropriate usage errors.
- Modified `create_crew` and `create_json_crew` functions to skip provider prompts and utilize non-interactive defaults in DMN mode.
- Enhanced `run_crew` to bypass TUI and handle runtime inputs directly in DMN mode, ensuring smooth execution without user interaction.
- Added tests to validate DMN mode behavior, including requirements for type and name, and ensuring proper handling of existing folders and missing inputs.
2026-06-16 19:48:31 -03:00
João Moura
06ada68083 Enhance crew loading and validation logic (#6182)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
* Enhance crew loading and validation logic

- Updated `crew_loader.py` to pass the project root when loading task and agent definitions, improving the handling of Python references.
- Refactored `json_loader.py` to include additional validation for Python references, ensuring they are resolved within the project root and enforcing depth limits.
- Added tests in `test_crew_loader.py` and `test_json_loader.py` to validate rejection of unsafe Python references and input files outside the project root.
- Improved error handling for JSON project validation, ensuring clearer feedback for invalid configurations.

* Refactor tests for hierarchical verbose manager agent

- Removed `@pytest.mark.vcr()` decorators from `test_hierarchical_verbose_manager_agent` and `test_hierarchical_verbose_false_manager_agent`.
- Introduced mocking for task outputs in both tests to simulate execution without relying on external dependencies.
- Ensured that the `crew.kickoff()` method is called within a context that patches the `Task.execute_sync` method, improving test isolation and reliability.

* Fix JSON loader PR review comments

* Fix JSON loader project root after rebase

* Handle UNC paths in JSON input files
2026-06-16 18:45:26 -03:00
Vinicius Brasil
4eb90ffbf3 Add crew actions to FlowDefinition (#6184) 2026-06-16 12:59:48 -07:00
Vinicius Brasil
a6cf52ec7e Add inline crew definition loading (#6183) 2026-06-16 11:51:22 -07:00
Vinicius Brasil
9d44d0a5e5 Serialize concrete Pydantic subclasses (#6187) 2026-06-16 11:00:07 -07:00
João Moura
e9d568dc69 Deep Crew / Agent / Task attributes support on json (#6172)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* Enhance JSON crew project handling and validation

- Updated `create_json_crew.py` to specify input files with a brief path.
- Refactored `crew_loader.py` to improve agent and task loading logic, including the introduction of a `build_agent` function and better handling of task classes.
- Enhanced `json_loader.py` with additional validation for agent and task definitions, including support for Python references and conditional tasks.
- Added tests in `test_crew_loader.py` and `test_json_loader.py` to ensure proper loading of agents, tasks, and validation of project structures, including custom types and conditional tasks.
- Improved error handling and validation safety across the project loading process.

* Enhance JSON crew configuration options in create_json_crew.py

- Added optional fields for custom agent subclasses and advanced task options, including condition checks and output specifications.
- Improved documentation comments for better clarity on agent and task configurations.
- Updated JSON crew handling to support additional callbacks for pre- and post-execution processes.

* Enhance JSON crew template tests in test_create_crew.py

- Added assertions for new optional fields in crew and agent templates, including conditional tasks, custom converters, and input file specifications.
- Improved validation checks for manager agents and callback references to ensure proper configuration in JSON crew definitions.
- Expanded documentation references within the tests to provide clearer guidance on the expected structure and usage of crew templates.

* Fix JSON crew PR review issues
2026-06-16 02:00:19 -03:00
Vinicius Brasil
fe2c236601 Add each composite action to FlowDefinition (#6164)
Lets a definition loop over an array without writing Python. Each
iteration exposes `item` and prior steps `outputs`.

```yaml
do:
  call: each
  in: state.rows
  do:
    - normalize:
        call: tool
        ref: my_tools:NormalizeRowTool
        with: { row: "${ item }" }
    - lead_scoring:
        call: agent
        # ...
```
2026-06-15 21:44:33 -07:00
João Moura
53c2284484 Support ZIP deployment fallback and JSON crew project env runs (#6166)
* Update crewAI CLI with various enhancements and fixes

- Updated `create_json_crew.py` to require `crewai[tools]>=1.14.7`.
- Enhanced `git.py` with improved repository initialization, including automatic initial commit creation and exclusion patterns for initial commits.
- Modified `install_crew.py` to allow error handling during installation with an optional `raise_on_error` parameter.
- Expanded `plus_api.py` to include methods for creating and updating crews from ZIP files.
- Introduced a new `archive.py` for creating deployable ZIP archives of CrewAI projects, ensuring local artifacts are excluded.
- Updated `run_crew.py` to manage JSON crew dependencies and run crews in the project's environment.
- Enhanced deployment logic in `main.py` to handle ZIP uploads and improve user feedback during deployment processes.
- Added tests for new functionalities and ensured existing tests reflect recent changes in behavior and requirements.

* fix(cli): address deploy zip review feedback

* fix(cli): sync missing lockfile before deploy

* fix(cli): preserve remote deploy on git setup warnings

* test(cli): use single deploy main import style

* fix(cli): skip project install for json crew sync

* fix(cli): load json runner from source checkout

* fix(cli): skip json crew sync when locked

* fix(cli): address deploy zip review feedback

* fix(cli): pass env on zip redeploy

* fix(cli): harden json run and zip fallback

* fix(cli): validate before deploy lock install

* fix(cli): respect poetry lock for json runs

* fix(cli): align json zip wrapper detection

* fix(deps): bump starlette audit floor

* fix(cli): avoid auth retry for deploy exits

* fix(cli): update json zip script entrypoints
2026-06-15 18:46:54 -03:00
Lorenze Jay
a5cc6f6d0e Add crewai_version to flow execution telemetry (#6167)
Some checks failed
CodeQL Advanced / Analyze (python) (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
2026-06-15 09:34:01 -07:00
João Moura
bb477f8a91 JSON first crews (#6131)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* feat(cli): introduce JSON crew project support and TUI enhancements

- Added support for creating and running JSON-defined crew projects, allowing users to scaffold projects with a new `create_json_crew.py` file.
- Implemented a full-screen Textual TUI for crew execution in `crew_run_tui.py`, enhancing user interaction with a two-column layout.
- Updated `run_crew.py` to prioritize JSON crew projects and added daemon mode for running without TUI.
- Introduced interactive pickers in `tui_picker.py` for improved CLI prompts.
- Enhanced validation for JSON crew files in `validate.py` to ensure proper structure and agent definitions.
- Updated `.gitignore` to exclude demo and crewai directories.

* feat: update LLM model references to gpt-5.4-mini

- Changed default LLM model from gpt-4o-mini to gpt-5.4-mini across various files, including CLI options, JSON crew configurations, and agent definitions.
- Enhanced benchmark and human feedback functionalities to utilize the new model.
- Improved user interface elements in the TUI for better interaction and feedback during execution.
- Added support for new skills directory in JSON crew project creation.

* feat(benchmark): add crew-level benchmarking functionality

- Introduced a new `benchmark` command in the CLI for crew-level benchmarking, allowing users to specify agents, models, and timeout settings.
- Implemented `CrewBenchmarkCase` to handle crew-level benchmark cases with inputs and criteria.
- Enhanced the benchmark runner to support progress tracking and detailed reporting of results for multiple models.
- Added tests for loading crew benchmark cases and validating their structure.
- Updated existing benchmark functions to accommodate the new crew-level execution model.

* feat(cli): enhance JSON crew project functionality and TUI improvements

- Added optional agent-level guardrails and advanced options in JSON crew configurations to improve output validation and flexibility.
- Updated the TUI to better handle plan step statuses, including visual indicators for task completion and failure.
- Introduced methods for parsing and managing step observation events, ensuring accurate updates to task statuses during execution.
- Enhanced validation for JSON crew projects, ensuring proper structure and error handling for agent and task definitions.
- Added comprehensive tests for new features and validation logic, ensuring robustness in JSON crew project handling.

* refactor(cli): streamline JSON crew project handling and improve validation

- Refactored JSON crew project loading and validation logic to enhance clarity and maintainability.
- Introduced utility functions for finding JSON crew files, improving code reuse across modules.
- Removed deprecated benchmark functionality and associated tests to simplify the codebase.
- Updated CLI commands to utilize the new JSON project structure, ensuring compatibility with recent changes.
- Enhanced test coverage for JSON crew project features, ensuring robust validation and error handling.

* feat(cli): enhance activity log navigation and focus management

- Added functionality to focus on the activity log when navigating through log entries.
- Implemented refresh logic for the log panel to ensure updates are displayed correctly during navigation.
- Improved keyboard navigation for log entries, allowing users to expand and scroll through logs seamlessly.
- Added tests to verify the correct behavior of log navigation and focus management in the TUI.

* feat(cli): enhance JSON crew project interaction and input handling

- Introduced a new function to enable prompt line editing for better user experience during input prompts.
- Updated the JSON crew project wizards to show interpolation hints for dynamic values, improving user guidance.
- Enhanced the handling of missing input placeholders by prompting users for required values during crew setup.
- Refactored the crew run logic to ensure proper loading and preparation of JSON-defined crews, including runtime input management.
- Added tests to verify the correct behavior of new input handling features and JSON crew project interactions.

* feat(cli): improve crew project input prompts and event handling

- Enhanced the `_prompt_text` function to allow for configurable spacing before prompts, improving user experience during input collection.
- Updated the wizards for agent and task creation to utilize the new prompt configuration, ensuring a more compact and streamlined interaction.
- Introduced new plan step lifecycle events (`PlanStepStartedEvent`, `PlanStepCompletedEvent`) to better track the execution status of plan steps.
- Refactored the step executor to emit these events during the execution of tasks, improving observability and debugging capabilities.
- Added tests to verify the correct behavior of new prompt handling and event emissions during crew project execution.

* fix: refine json-first crew interactions

* fix: prioritize common json crew tools

* fix: make json crew more tools expandable

* fix: show json crew tools by category

* feat(memory): update default embedder to OpenAI text-embedding-3-large and enhance memory compatibility

- Changed the default embedding model for Memory to OpenAI text-embedding-3-large, which uses 3072-dimensional vectors.
- Added warnings regarding compatibility issues with existing local memory stores created with 1536-dimensional embeddings.
- Updated documentation to reflect the new default embedder and its configuration options.
- Enhanced the CLI and codebase to support the new embedding model across various components, ensuring a seamless transition for users.

* fix: address PR review feedback for JSON-first crews

Review blockers:
- Forward trained_agents_file to JSON crews: crewai run -f now exports
  CREWAI_TRAINED_AGENTS_FILE for the in-process JSON crew path
- Wizard agent picker: Esc/cancel now reprompts instead of silently
  assigning the first agent
- JSON tool resolution hard-fails: unknown tool names, missing custom
  tool files, and invalid custom tool modules raise JSONProjectError
  with actionable messages instead of warn-and-continue
- Embedding dimension mismatch: LanceDB and Qdrant Edge storages raise
  EmbeddingDimensionMismatchError with reset/pin guidance instead of
  silently zero-filling vectors or returning empty search results
- Custom tool code execution documented in loader docstring and the
  scaffolded project README

CI fixes:
- ruff format across lib/
- All 133 PR-introduced mypy errors fixed (llm.py lazy-litellm and
  cli.py lazy command shims now use TYPE_CHECKING imports; textual
  is_mounted misuse fixed; pick_many overloads; misc annotations)

Bot review comments:
- Empty except blocks now have explanatory comments or debug logging
- Removed unused _C_BG/_C_PANEL/_C_BORDER globals and redundant
  import re; tests use a single import style for create_json_crew

Tests: trained-agents propagation, wizard cancel, tool resolution
failures, and dimension mismatch guidance.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix: address second round of PR review comments

Cursor Bugbot:
- Wizard agent slugs: strip to [a-z0-9_] and fall back to agent_<n> so
  symbol-only roles can't produce an empty agents/.jsonc filename
- Wizard task names: dedupe against prior task names and fall back to
  task_<n> for symbol-only descriptions

CodeRabbit:
- Agent.message(): import Task explicitly at runtime instead of relying
  on the namespace injection done by crewai/__init__
- Async executor: move the native-tools-unsupported fallback from
  _ainvoke_loop_react (self-recursion) to _ainvoke_loop_native_tools,
  mirroring the sync implementation
- StepExecutor downgrade: keep the in-step conversation and append the
  text-tooling instructions instead of rebuilding messages, so completed
  native tool calls are not re-executed
- crewai-files: extension-based MIME lookup now runs before byte
  sniffing so csv/xml types are not degraded to text/plain
- Memory storages: validate every record in a save() batch against a
  consistent embedding dimension (LanceDB previously checked only the
  first record); added mixed-batch tests
- _print_post_tui_summary now typed against CrewRunApp
- Docs: Azure OpenAI default embedder change called out in the memory
  migration warning and provider table

Code quality bots:
- Removed unused _C_YELLOW/_C_CYAN (crew_run_tui) and _GREEN (tui_picker)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* feat(cli): accordion tool picker in JSON crew wizard

The flat tool list had grown to ~90 rows. The picker now shows:
- Common tools always visible at the top
- Every other category as a single expandable row with tool and
  selection counts (e.g. "Search & Research  (27 tools, 2 selected)")
- Expanding a category collapses the previously expanded one
- Selections persist across expand/collapse via new preselected
  support in pick_many; cursor follows the toggled category row

tui_picker gains preselected + initial_cursor options on pick_many,
and Esc in multi-select now confirms the current selection instead of
discarding it (required so collapsing can't silently drop choices).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* refactor(cli): remove --daemon flag from crewai run

The flag only affected JSON crew projects — classic and flow projects
ignored it entirely, which made the behavior inconsistent. Removed the
option, the daemon code path (_run_json_crew_daemon), and its helper
(_load_json_crew_with_inputs).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* test: update run command tests after --daemon removal

lib/crewai/tests/cli/test_run_crew.py still asserted the old
run_crew(trained_agents_file=..., daemon=False) call signature.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(cli): exit codes, mid-run quit, async statuses, hyphen placeholders

Addresses the latest Bugbot review round:

- Failed JSON crew runs now exit non-zero (SystemExit(1)) so scripts
  and CI don't treat failures as success, mirroring the classic path
- Quitting the TUI mid-run now ends the process (os._exit(130));
  kickoff runs in a thread worker that cannot be force-cancelled, so
  letting the CLI return would leave LLM/tool work burning tokens in
  the background
- Sidebar task statuses are now async-safe: completion/failure events
  resolve the task's own row via identity instead of assuming the most
  recently started task, and starting a task no longer blanket-marks
  earlier active rows as done
- The runtime-input prompt regex now accepts hyphenated placeholder
  names ({my-topic}), matching kickoff's interpolation pattern

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix: validation safety, custom tool sandboxing, TUI log integrity, memory error surfacing

- Deploy validation no longer executes project code: validation mode
  checks tool declarations structurally (well-formed entries, custom
  tool file exists) without importing or instantiating anything.
  custom:<name> resolution only happens on the actual run path.
- custom:<name> is constrained to [A-Za-z_][A-Za-z0-9_]* and the
  resolved path must stay inside the project's tools/ directory, so
  custom:../foo or absolute-path names cannot execute code outside it.
  Tool paths resolve relative to the crew project root, not cwd.
- TUI task logs are built from per-task state captured at task start
  (idx, description, agent, start time); an out-of-order completion
  takes its output from the event and no longer steals or resets the
  current task's streamed steps/output.
- EmbeddingDimensionMismatchError now inherits ValueError instead of
  RuntimeError so background saves surface it through
  MemorySaveFailedEvent instead of silently dropping the save; the
  shutdown catch in _background_encode_batch is narrowed to the
  "cannot schedule new futures" case.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(cli): declared project type wins over crew.json presence

A flow project that also contains a crew.json(c) file now runs and
validates as the flow it declares in pyproject.toml instead of being
hijacked by the JSON crew path. Both crewai run (_has_json_crew) and
deploy validation (_is_json_crew) check tool.crewai.type; a missing or
unreadable pyproject still means a bare JSON crew project.

Also documents why StepObservationFailedEvent intentionally marks the
plan step "done": the event signals an observer failure, not a step
failure, and the executor continues past it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(cli): type the declared_type locals so mypy stays clean

Comparing an Any-typed .get() chain returns Any, which tripped
no-any-return on the previous commit.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-06-14 04:19:48 -03:00
Vini Brasil
d80719df81 Add experimental crewai run --definition for flows (#6147)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Let users run a Flow from a Flow Definition YAML file or inline string
without writing Python, passing kickoff inputs as `--inputs` JSON. The
flag is gated behind an experimental warning since the definition format
may still change.
2026-06-12 22:31:05 -07:00
Vini Brasil
6ad821b157 Add expressions to FlowDefinition actions (#6145)
* Add expressions to FlowDefinition actions

Let definitions compute values without Python. A new `call: expression`
action evaluates a Common Expression Language (CEL) expression, and tool
`with:` blocks now render `${...}` CEL templates.

Example 1:

```yaml
decide:
  do:
    call: expression
    expr: "state.score >= 80 ? 'qualified' : 'nurture'"
  router: true
  emit: [qualified, nurture]
```

Example 2:

```yaml
search:
  do:
    call: tool
    ref: my.pkg:SearchTool
    with:
      search_query: "${outputs.build_query.query + ' news'}"
      max_results: "${state.limit}"
```

* Address code review comments

* Address code review comments

* Fix linting offenses

* Address code review comments

* Fix scrapgraph issue
2026-06-12 21:56:02 -07:00
Vini Brasil
2444895ca4 Implement Flow definition run tools without Python code (#6144)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
A `do:` step can now say `call: tool` and name a CrewAI tool to run,
passing its inputs under `with:`. Before this, a definition could only
point at Python code to run.

```yaml
methods:
  search:
    start: true
    do:
      call: tool
      ref: crewai_tools:ExaSearchTool
      with:
        search_query: ai agents
```
2026-06-12 19:47:58 -07:00
Vini Brasil
bf291a7a55 Drive human feedback from the flow definition (#6133)
* Drive human feedback from the flow definition

@human_feedback previously wrapped methods with the full HITL runtime (feedback
request, outcome collapse, learn loop), so flows built from a YAML definition —
which carry no decorated callables — could not pause for or route on human
feedback.

# Conflicts:
#	lib/crewai/src/crewai/flow/persistence/decorators.py
#	lib/crewai/src/crewai/flow/runtime/__init__.py

* Address code review comments
2026-06-12 14:48:43 -07:00
Vini Brasil
64438cba37 Wire config and persistence from FlowDefinition into the runtime (#6132)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
* Wire config and persistence from FlowDefinition into the runtime

`from_definition` was silently dropping all config fields; it now passes
`config.model_dump()` so suppress_flow_events, max_method_calls, etc.
actually apply.

Persistence is now engine-driven: `_persist_method_completion` fires
after every method using the definition's persist metadata, so
`@persist` no longer needs to wrap methods — it just stamps them.

* Address code review comments
2026-06-12 11:51:44 -07:00
Lucas Gomide
887adafd2c fix: aggregate token usage across all LLM calls (#6122)
* feat: aggregate LLM token usage at the flow level

Introduces `flow.usage_metrics`, a snapshot of every LLMCallCompletedEvent
emitted under the flow's `current_flow_id` for the duration of one kickoff
(or resume) call. Aggregation happens on the singleton event bus so it
covers crews, direct `LLM.call`s, and nested listener calls — solving the
mismatch where the SDK reported only the last crew's usage while the
Enterprise UI showed the correct full total.

Co-authored-by: Cursor <cursoragent@cursor.com>

* refactor: centralize provider key normalization in UsageMetrics

Add UsageMetrics.from_provider_dict to normalize raw LLM usage dicts
across providers (LiteLLM, native Anthropic, native Gemini, OpenAI
nested cached). BaseLLM._track_token_usage_internal and the flow-level
aggregator now share this single source of truth, so `flow.usage_metrics`
agrees with per-LLM totals on every provider — including the native
Anthropic path that emits `input_tokens`/`output_tokens` instead of
`prompt_tokens`/`completion_tokens`.

* fix: flush event bus before reading aggregated usage_metrics

`crewai_event_bus.emit` dispatches LLMCallCompletedEvent handlers on a
ThreadPoolExecutor (fire-and-forget), so a flow whose last LLM call
completes right before kickoff_async/resume_async returns can detach
the usage listener while that handler is still queued, leaving its
tokens off `flow.usage_metrics`. Match `Crew.kickoff()` and call
`crewai_event_bus.flush()` in both finally blocks so every handler
drains before the listener is detached.

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-12 12:55:22 -04:00
Rip&Tear
d3fc0d31f8 [codex] Redact file tool paths (#6134)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* Redact file tool paths

* Fix for pull request finding 'Empty except'

* Potential fix for pull request finding

---------
2026-06-12 15:50:40 +08:00
Vini Brasil
373dca3d04 Run flows from a definition without a Python subclass (#6104)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
* Read flow dispatch from FlowDefinition

Store the definition in a `_definition` PrivateAttr at post-init and
convert the dispatch helpers (`_start_method_names`, `_listener_methods`,
`_start_condition`, `_listen_condition`, `_is_router`) from classmethods
to instance methods that read it. Event names now fall back to
`self._definition.name` instead of `self.__class__.__name__`.

Behavior is identical for decorator subclasses, but the engine no longer
assumes the definition comes from the class. This is the seam for
`Flow.from_definition`, where an instance runs a definition that was
loaded rather than built from a Python subclass.

* Add Flow.from_definition to run flows without a subclass

A FlowDefinition (e.g. loaded from YAML) was only usable for dispatch on
decorator-authored subclasses. Now each method definition records an
importable `module:qualname` handler ref, and `Flow.from_definition`
resolves and binds those handlers to build a runnable flow directly.

* Build flow state from FlowDefinition

Definition-driven flows previously always started with a bare dict
state.

* Replace handler string with structured FlowActionDefinition

`handler: str | None` was optional and opaque — missing handlers only
surfaced at kickoff time. `do: FlowActionDefinition` is required, so
Pydantic rejects invalid definitions at parse time.

The `call: "code"` discriminator prepares the schema for future
non-Python action types (e.g. MCP tool, crew) without touching
`FlowMethodDefinition`. Resolution logic is extracted to
`runtime/_action_resolvers.py` to keep the dispatch point isolated.

* Fix conversational start router missing required do field

FlowMethodDefinition.do became required when the handler string was
replaced with FlowActionDefinition, but _conversation_start_router still
built its fragment without it, breaking crewai import entirely.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* Add event scoping to flow test

* Change lib/crewai/tests/test_flow_from_definition.py

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 14:18:49 -07:00
Greyson LaLonde
21fa8e32d9 docs: update changelog and version for v1.14.7
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
2026-06-11 10:13:40 -07:00
Greyson LaLonde
f18c03cd8f feat: bump versions to 1.14.7 2026-06-11 10:06:07 -07:00
Greyson LaLonde
50b9c02272 fix(checkpoint): rebuild custom BaseLLM as concrete LLM on restore
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
A custom BaseLLM subclass serializes with the inherited llm_type "base",
which the registry maps to the abstract BaseLLM. Restore then crashed on
cls(**value). Rebuild a concrete LLM from the saved config when the
resolved class is abstract.
2026-06-10 22:21:35 -07:00
Greyson LaLonde
c55334be5f docs: update changelog and version for v1.14.7rc2 2026-06-10 20:52:56 -07:00
Greyson LaLonde
05a2ba9ca4 feat: bump versions to 1.14.7rc2 2026-06-10 20:45:29 -07:00
Greyson LaLonde
fbafe1f0d3 fix(flow): gate restore on a flag so live snapshots don't replay as resume
Checkpoint serialization stamps checkpoint_completed_methods onto every live
Flow in RuntimeState.root, including the agent executor reused across a crew's
tasks. kickoff_async read that stamp as a restore signal, so the second task
replayed the first task's completed methods and never reached a final answer.

Gate is_restoring on _restored_from_checkpoint, set only by
_restore_from_checkpoint, and consume it single-shot.
2026-06-10 20:40:08 -07:00
Greyson LaLonde
5267c059f5 test(flow): pass show=False in test_flow_plotting to not open a browser
flow.plot defaults to show=True, which calls webbrowser.open on every run.
The test only asserts FlowPlotEvent is emitted, so disable the browser open.
2026-06-10 20:36:14 -07:00
Greyson LaLonde
243c9edc1c docs: update changelog and version for v1.14.7rc1
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
2026-06-10 18:56:52 -07:00
Greyson LaLonde
68910b70c0 feat: bump versions to 1.14.7rc1 2026-06-10 18:50:54 -07:00
Greyson LaLonde
299782765c ci: ignore GHSA-rrmf-rvhw-rf47 (torch alias of PYSEC-2025-194)
* ci: ignore GHSA-rrmf-rvhw-rf47 (torch alias of PYSEC-2025-194)

pip-audit reports CVE-2025-3000 under its GHSA id, which the existing
PYSEC-2025-194 ignore does not match. Same advisory: memory corruption
in torch.jit.script, CVSS 1.9, local-only, no fix for torch 2.11.0.

* ci: sync GHSA-rrmf-rvhw-rf47 ignore into pre-commit pip-audit
2026-06-10 18:45:42 -07:00
Greyson LaLonde
a1f44eb272 fix(events): scope runtime state per run to bound growth and isolate concurrent runs 2026-06-10 18:39:05 -07:00
Lorenze Jay
036b032ab6 handle supporting both custom prompts (#6108)
* handle supporting both custom prompts

* handle translations

* handle deprecation warnings better
2026-06-10 17:52:53 -07:00
Lorenze Jay
f88ae54f96 fix telemetry setup on crewai-login (#6106)
* fix telemetry setup on crewai-login

* type check fix
2026-06-10 17:03:25 -07:00
Lorenze Jay
b6e5d632c1 improve convo routing cycle with one less route (#6102)
* improve one less route

* flows in flows, new agent executor causing early trace batch finalization

* addressing comments

* addressing comments pt2

* lint and typecheck fix
2026-06-10 16:49:16 -07:00
Greyson LaLonde
0d971e5bc5 feat(events): add reset_runtime_state to release accumulated bus state 2026-06-10 16:12:28 -07:00
Lucas Gomide
b3f175b56f docs: update otel images (#6103)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
2026-06-10 14:34:30 -04:00
Lucas Gomide
f523a7d029 docs: udpate docs to reflect new state of OpenTelemetry collector (#6100)
* docs: udpate docs to reflect new state of OpenTelemetry collector

* docs: add OTel collector and Datadog screenshots

These images are referenced by the capture_telemetry_logs guides but were
missing from the tree, which broke the link checker across all locales.

* docs: address PR review on OTel collector guide

- Clarify that OpenTelemetry Traces and Logs are separate integrations
  sharing the same fields (resolves Traces/Logs wording inconsistency)
- List regional Datadog OTLP hosts (US1/US3/US5/EU1/AP1) so users outside
  US5 can copy the right domain
2026-06-10 14:26:35 -04:00
Lorenze Jay
f214ff4b7b decouple convo logic from runtime and added a conversational_definition (#6091)
* decouple convo logic from runtime and added a conversational_definition

* type check fix

* always defer traces for convo and so fix tests to reflect that
2026-06-10 10:49:39 -07:00
Vini Brasil
a9e7c3a44f Simplify flow condition evaluation to be stateless per event (#6097)
Re-evaluate the whole `@listen`/`@router` condition tree against the set
of events seen so far, instead of tracking which AND sub-branches remain
pending.

Net effect:
* Fixes a regression where `or_()` short-circuited at the first
  satisfied branch, leaving a sibling `and_()` half-complete so a later
  trigger could spuriously re-fire the listener
* Removes the fragile per-branch pending state and `id()`-based keys
* Shrinks the evaluator to one readable predicate
2026-06-10 10:35:25 -07:00
Lucas Gomide
da8fe8c715 fix: respect suppress_flow_events for method-execution events (#6095)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* fix: respect suppress_flow_events for method-execution events

* test: align suppressed-flow test with new method-event behavior
2026-06-09 17:19:25 -04:00
Greyson LaLonde
ce42994ae3 docs: update changelog and version for v1.14.7a4 2026-06-09 12:58:38 -07:00
Greyson LaLonde
820c3905e3 feat: bump versions to 1.14.7a4 2026-06-09 12:51:55 -07:00
Vini Brasil
703ffe67ee Migrate @listen/@router runtime to read from FlowDefinition (#6084)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
* Migrate @listen/@router runtime to read from FlowDefinition

The runtime now resolves listener conditions, router status, and emit
values from `FlowMethodDefinition` instead of legacy method metadata and
the `_listeners`/`_routers`/`_router_emit` registries.

* Evaluate AND/OR listener conditions over the definition shape via
  `_evaluate_definition_condition`
* Drop the class registries and the `FlowMeta` extraction that built
  them; stop stamping `__trigger_methods__`, `__is_router__`,
  `__router_emit__`, and friends
* `@human_feedback` emit now lives only on its config

* Simplify conditionals DSL
2026-06-09 09:40:30 -07:00
Matt Aitchison
8919026326 feat(storage): pluggable default backends for memory, knowledge, rag, flow (#6079)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Add opt-in extension seams so an application can route memory, knowledge,
RAG, and flow persistence through a custom backend without subclassing or
threading an explicit instance through every construction site -- mirroring
the existing crewai_core.lock_store.set_lock_backend seam.

- memory:    crewai.memory.storage.factory.set_memory_storage_factory
- knowledge: crewai.knowledge.storage.factory.set_knowledge_storage_factory
- rag:       crewai.rag.factory.register_rag_client_factory (provider registry)
- flow:      crewai.flow.persistence.factory.set_flow_persistence_factory

Each construction site consults the registered factory and falls back to the
built-in default when none is set; an explicit instance always wins. Widen
Knowledge.storage and the knowledge source base classes to BaseKnowledgeStorage
(consistent with BaseAgent.knowledge_storage) so any base-interface backend
plugs in. Runtime-free tests cover each seam.
2026-06-08 21:14:13 -05:00
Greyson LaLonde
988927006c docs: update changelog and version for v1.14.7a3
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
2026-06-08 18:56:39 -07:00
Greyson LaLonde
48c1987fcf feat: bump versions to 1.14.7a3 2026-06-08 18:43:15 -07:00
Greyson LaLonde
af62b7b583 fix: expose ask_for_human_input on experimental AgentExecutor
fixes #6065
2026-06-08 17:55:19 -07:00
Greyson LaLonde
1b14e162e9 fix: resolve pip-audit CVEs (aiohttp, docling, docling-core, pip)
* fix: resolve pip-audit CVEs for aiohttp, docling, docling-core, pip

- aiohttp 3.13.4 → 3.14.0: fixes GHSA-jg22-mg44-37j8, GHSA-hg6j-4rv6-33pg
- docling 2.84.0 → 2.97.0: fixes GHSA-cjqg-rq2h-2fvj, GHSA-pj2v-ggqh-cmq2,
  GHSA-r3xg-rg9j-67fv, GHSA-q29v-xc37-wh5m
- docling-core 2.74.0 → 2.79.0: fixes GHSA-j5xp-7m2f-49jv, GHSA-jmmv-h3mp-59v8
- pip 26.1.1 → 26.1.2: fixes PYSEC-2026-196

docling-core 2.74.1+ requires pydantic-settings>=2.14.0, so the crewai pin
is loosened from ~=2.10.1 to >=2.10.1,<3. pydantic-settings resolves to
2.14.1 in the lock.

* fix: correct aiohttp CVE floor to 3.14.0 (not 3.13.5)

* test: shim AsyncStreamReaderMixin for vcrpy under aiohttp 3.14.0

aiohttp 3.14.0 removed aiohttp.streams.AsyncStreamReaderMixin (folded into
StreamReader). vcrpy's aiohttp stub still subclasses it, so vcr's patch
machinery raised AttributeError at test collection. Restore an equivalent
mixin in conftest before vcr is imported.

* test: rebuild vcrpy MockClientResponse init for aiohttp 3.14.0

aiohttp 3.14.0 added a required stream_writer kwarg to ClientResponse.__init__
and reads stream_writer.output_size when writer is None. vcrpy's
MockClientResponse doesn't pass it, raising TypeError at cassette playback.
Rebuild the super().__init__ call from the live signature (defaulting required
keyword-only args to None, with a stream_writer stub exposing output_size) so
it survives future aiohttp signature additions too.

* test: avoid deprecated get_event_loop in vcrpy aiohttp shim

asyncio.get_event_loop() emits a DeprecationWarning (and can RuntimeError)
when no current loop is set on Python 3.12+. Prefer get_running_loop() (the
real cassette-playback path always has one) and fall back to a single cached
loop in sync contexts, since the mock only stores the loop and calls
get_debug().

* fix: pull docling-core[chunking] so HierarchicalChunker imports

docling 2.97 split into docling-slim, moving the chunker's code-chunking
deps (tree-sitter, semchunk, language grammars) behind docling-core's
[chunking] extra. crewai's knowledge source imports HierarchicalChunker,
whose package __init__ eagerly imports those submodules -> ModuleNotFoundError
('tree_sitter') without the extra. Request docling-core[chunking]; carry the
extra in override-dependencies too, since overrides replace the whole
requirement and would otherwise strip it.
2026-06-08 17:45:07 -07:00
Vini Brasil
e570534f15 Migrate @start to read from FlowDefinition (#6071)
* Remove `_start_methods` and `__is_start_method__` stamping
* Add helpers to read start info from the definition
* Scan `__dict__` instead of `dir()` to find flow methods
2026-06-08 15:03:50 -07:00
Lorenze Jay
913a3abead docs: update changelog and version for v1.14.7a2 (#6055)
Some checks failed
Check Documentation Broken Links / Check broken links (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2026-06-05 14:19:42 -07:00
Lorenze Jay
17cfbdf95f feat: bump versions to 1.14.7a2 (#6054) 2026-06-05 14:15:43 -07:00
Lorenze Jay
8cd51fc67e Lorenze/imp/conversational flow traces (#6044)
* feat: add conversation message and route selection events

- Introduced `ConversationMessageAddedEvent` and `ConversationRouteSelectedEvent` to enhance conversational flow tracking.
- Updated event listeners to emit these events during message handling and routing decisions.
- Enhanced the `_ConversationalMixin` class to emit events for user and assistant messages, as well as selected routes.
- Added tests to verify the correct emission of these events during conversational turns.

* ensure flow started events only emiited once

* refactor(tracing): rename trace event handler methods to action event handlers

Updated the  class to replace  with  for  and  events, improving clarity in event handling.

Additionally, adjusted comments in the  class to clarify the application of pending user messages in relation to state restoration and flow scope initialization.

* fix(conversational_mixin): handle empty message index in route events

Updated the message index handling in the  class to return  when there are no messages. Added tests to ensure that route events do not reference index zero when the transcript is empty, and verified the correct emission of conversation message events during flow handling.
2026-06-05 14:10:19 -07:00
Lorenze Jay
3723f0db76 Update conversational flow docs to use handle_turn (#6053) 2026-06-05 11:04:28 -07:00
Lucas Gomide
cab3319af9 feat(otel): surface real finish_reason + sampling params + response.id on LLM events (#5945)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
* feat(otel): surface real finish_reason + sampling params + response.id on LLM events

Companion to the OTel GenAI emitter compliance work in crewai-enterprise
(CON-172). Today the enterprise emitter reads these fields off the OSS
LLM events via `getattr(..., None)`, so it produces valid (but partial)
spans against the existing OSS surface. This change makes those fields
first-class on the events so spans can carry the real provider data.

What this adds:

- `LLMCallStartedEvent` gains the sampling-param fields the emitter needs
  for `gen_ai.request.*`: `temperature`, `top_p`, `max_tokens`, `stream`,
  `seed`, `stop_sequences`, `frequency_penalty`, `presence_penalty`, `n`.
  All optional; existing call sites keep working.
- `BaseLLM._emit_call_started_event` introspects those values off `self`
  (the LLM instance) via `getattr(..., None)` so every provider gets the
  fields propagated for free without per-provider plumbing.
- `LLMCallCompletedEvent` gains `finish_reason: str | None` and
  `response_id: str | None`. A field validator coerces any non-string
  value (MagicMock, unexpected provider object) to None so the event
  never raises on construction.
- `LLM._emit_call_completed_event` accepts both as kwargs.
- `LLM` (LiteLLM path) gets a defensive `_extract_finish_reason_and_response_id`
  helper that handles both streaming (`StreamingChoices`) and non-streaming
  (`Choices`) shapes and is wired into every completion-event emission site.
- Provider completions extract native values from their SDK responses and
  pass them through:
  - OpenAI: `_extract_responses_finish_reason_and_id` for Responses-API,
    `_extract_finish_reason_and_id` for Chat-Completions.
  - Anthropic: `_extract_finish_reason_and_id` (Messages API + streaming).
  - Bedrock: `_extract_finish_reason_and_id` (`stopReason` from converse).
  - Gemini: `_extract_finish_reason_and_id` (`finish_reason` from candidates).
  - Azure: inherits via OpenAI sub-class; adds the helper for Azure-specific
    response shapes.
  - openai_compatible: inherits from OpenAICompletion, no edits needed.

Compatibility:

- All new fields are optional with sensible defaults. No existing call
  sites need to change.
- The validator on `LLMCallCompletedEvent` swallows non-string values for
  the new fields so legacy mocks / exotic provider types don't blow up
  event construction.
- Enterprise side already reads these fields defensively, so OSS and
  enterprise can merge independently and cut on the same synchronized
  release.

Tested against the full LLM + events + provider test suite — all green;
the 14 pre-existing multimodal failures on main are unrelated and
reproduce without this diff.

* fix(bedrock): propagate finish_reason + response_id on async paths

The original commit covered every provider's sync path and Bedrock's
sync streaming path, but two Bedrock async paths still emitted
LLMCallCompletedEvent without finish_reason/response_id:

- _ahandle_converse: the final fallback emit_call_completed_event call
  was missing both fields. Added stop_reason + response_id matching the
  other emission sites in the same function.

- _ahandle_streaming_converse: response_id was never seeded from the
  initial response object, and stream_finish_reason wasn't propagated
  to the structured-output and final-text emissions. Now extracts
  response_id up front and threads stream_finish_reason through every
  completion event.

Adds a dedicated test file covering the new event fields end-to-end:
- LLMCallCompletedEvent.finish_reason / response_id Pydantic validation
  (string accepted, None default, non-string coerced to None).
- LLMCallStartedEvent sampling params (all nine fields accepted, default
  to None).
- BaseLLM._emit_call_started_event introspecting sampling params off
  self, with explicit kwargs overriding.
- BaseLLM._emit_call_completed_event passing finish_reason/response_id
  through to the event.
- LLM._extract_finish_reason_and_response_id across the LiteLLM shapes
  (non-streaming response, streaming chunk, dict, missing fields,
  non-string values, unexpected input).

* fix(otel): correct streaming finish_reason + bedrock response_id semantics

Two correctness fixes uncovered while landing the OTel finish_reason +
response_id plumbing:

- LiteLLM streaming (sync + async): `stream_options={"include_usage": True}`
  causes LiteLLM to emit a final usage-only chunk with `choices=[]`. The
  post-loop `_extract_finish_reason_and_response_id(last_chunk)` silently
  returned `(None, None)` because the last chunk has no choices, even though
  earlier chunks carried `finish_reason="stop"`. Track both fields
  incrementally inside the loop (mirroring how OpenAI/Gemini/Azure already
  handle their native streams) and use the tracked values for the
  LLMCallCompletedEvent emission and the partial-response error path.

- Bedrock Converse: `ResponseMetadata.RequestId` is an AWS infra trace id,
  not a model-level response id (semantically different from OpenAI's
  `chatcmpl-XXX`). Return None for `response_id` rather than mislead
  downstream telemetry consumers. The audit-fix's async propagation chain
  still works — None propagates through unchanged.

Adds `test_llm_streaming_finish_reason.py` pinning both the sync and async
LiteLLM streaming paths against the include_usage chunk shape.

* refactor(otel): unify LLM event introspection + drop redundant defensive code

Three cohesion cleanups uncovered during PR review, all behavior-preserving:

- LLM.call / LLM.acall in llm.py now delegate to BaseLLM._emit_call_started_event
  instead of constructing LLMCallStartedEvent inline. The base helper already
  introspects sampling params off self via getattr; the inline duplication was
  accidental, not justified, and a duplication risk if anyone adds a tenth
  OTel sampling param later.

- Extracted lib/crewai/llms/_finish_reason_utils.py:extract_choices_finish_reason_and_id
  as the shared extractor for the choices-based response shape. OpenAI Chat,
  Azure, and LiteLLM all read the same shape (response.id + choices[0].finish_reason)
  as both object attrs and dict keys. Providers with genuinely different shapes
  - Anthropic (stop_reason), Bedrock (stopReason), Gemini (protobuf enum),
  OpenAI Responses (status) - keep their own provider-specific helpers.

- Dropped redundant try/except (AttributeError, TypeError) wrappers around
  bare getattr(obj, "field", None) calls across the new extraction helpers.
  getattr with a default already suppresses AttributeError, and the inner
  isinstance / dict.get / int-coercion ops can't raise TypeError in practice.
  Kept the catches that legitimately guard against IndexError (e.g. choices[0]
  on an empty list).

Tests: 600 passed, 23 skipped, 14 pre-existing multimodal failures unchanged.
Added 12 parametrized tests for the shared helper covering object + dict
shapes, missing fields, non-string coercion, and never-raises invariants.

* chore(otel): drop dead last_chunk variable from async streaming

The streaming-fix commit (49e5581b5) replaced the post-loop
`_extract_finish_reason_and_response_id(last_chunk)` call with the
incrementally-tracked `stream_finish_reason` / `stream_response_id`,
which removed the only reader of `last_chunk` in
`_ahandle_streaming_response`. The declaration and per-iteration
assignment were left behind — harmless but confusing for future
readers because the sync sibling still legitimately uses `last_chunk`
(for usage and content fallbacks via `_handle_streaming_callbacks`).

The async path inlines its usage extraction directly inside the loop
(`chunk.model_extra.get("usage")`), so there's no fallback consumer.
Drop both lines.

Sync path untouched — `last_chunk` there is still load-bearing.

* fix(otel): coerce non-list stop_sequences to list[str] on LLMCallStartedEvent

Observed in Datadog: gen_ai.request.stop_sequences on a Gemini/Vertex
span surfaced the textproto repr of a google.protobuf.struct_pb2.ListValue
(values { string_value: "\nObservation:" }) instead of a real Sequence[str].

Root cause is upstream - a Vertex AI / Gemini code path stores the stop
list in a protobuf container (RepeatedScalarContainer or ListValue) rather
than a plain Python list. When that container reaches LLMCallStartedEvent
and then BaseLLM._emit_call_started_event hands it to the OTel SDK as a
span attribute, the SDK falls back to str(value) because the type isn't a
recognised Sequence[str] - producing the protobuf textproto string instead
of an array attribute.

* chore: fix ruff lint findings

* refactor(otel): declare sampling params on BaseLLM + honor stop overrides + dict chunk id

* fix: widen max_tokens to int | float | None + apply ruff format

* fix(otel): coerce unknown finish_reason / response_id to None instead of stringifying

* fix(otel): extract Azure stream finish_reason/id before usage-continue

Match the LiteLLM ordering so a finish_reason or response id riding on a
usage-carrying chunk isn't dropped by the early `continue`.

* fix(otel): report effective max_tokens cap + bedrock structured finish_reason
2026-06-05 07:23:38 -04:00
Vini Brasil
906cd9769d feat(flow): type DSL triggers as route-aware decorators (#6042)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Centralize FlowTrigger and FlowMethodDecorator so start/listen/router and the boolean trigger helpers share one authoring contract. This preserves decorated method signatures for static checking while allowing route-label strings in nested FlowCondition data.

Export the shared typing helpers for static analyzers, use an explicit Protocol body, align condition validation with Sequence-backed condition data, and drop the stale call-arg ignore exposed by the signature-preserving decorators.

Update the flow guide to use or_(...) for multi-label listeners.
2026-06-04 18:07:49 -03:00
Lorenze Jay
14ce97d787 chat api for convo flows (#6034)
* Add conversational Flow chat helper

* Document conversational flow chat APIs in translations

* Stringify conversational chat REPL output
2026-06-04 13:36:48 -07:00
Matt Aitchison
f3a15a4f07 feat(lock_store): make locking backend overridable (#6015)
* feat(lock_store): make locking backend overridable

Allow the centralised lock factory to use a pluggable backend instead of
the hardcoded Redis/file selection. Backends are resolved with precedence
override > CREWAI_LOCK_FACTORY env > built-in default:

- set_lock_backend()/reset_lock_backend() and a scoped lock_backend()
  context manager for programmatic overrides
- CREWAI_LOCK_FACTORY="module:callable" env import-path, resolved lazily
  and cached, with clear errors on malformed or non-callable specs
- LockBackend Protocol documenting the contract (raw name in, context
  manager out; backend owns its namespacing)

Default Redis/file behavior is unchanged when nothing is overridden.

* refactor(lock_store): use explicit body for LockBackend protocol method

Replace the no-op `...` body with `raise NotImplementedError` to satisfy
the CodeQL ineffectual-statement check while keeping the Protocol
structural-typing only.

* refactor(lock_store): drop scoped lock_backend context manager

Keep the backend overridable via set_lock_backend/reset_lock_backend and
the CREWAI_LOCK_FACTORY env path, but remove the scoped lock_backend()
context manager. It was speculative surface and the only thread-unsafe
piece (racy save/restore of the module global); nothing depends on it.

* refactor(lock_store): drop reset_lock_backend alias

reset_lock_backend() was just set_lock_backend(None); callers use that
directly. Clearing the override is documented on set_lock_backend.

* style(lock_store): apply ruff format

* refactor(lock_store): simplify overridable backend to a single setter

Reduce the override surface to just set_lock_backend(): lock() uses the
custom backend when one is set, otherwise the unchanged Redis/file default.

Drop the CREWAI_LOCK_FACTORY env import-path, the runtime_checkable
Protocol, the precedence resolver, and the getter — a custom backend is
now any callable(name, *, timeout) -> context manager, registered in
process.

* fix(lock_store): snapshot backend to avoid check-then-call race

Read the module-global backend once into a local before the None check
and the call, so a concurrent set_lock_backend(None) cannot make lock()
invoke None.

* docs(lock_store): clarify name handling for custom backends

The default namespaces the lock name; custom backends receive it
verbatim. Correct the lock() docstring which implied namespacing always
happens.

* docs(lock_store): note set_lock_backend is for one-time startup setup
2026-06-04 13:28:31 -05:00
Vini Brasil
75dad212a2 Split flow DSL monolith into focused decorator modules (#6040)
The Flow DSL lived in one 1033-line `dsl.py` that mixed every decorator
(`@start`/`@listen`/`@router`), the `human_feedback` decorator,
condition combinators, and FlowDefinition extraction helpers in a single
file.

Split it into a `dsl/` package where each decorator gets its own module
(`start.py` 68 lines, `listen.py` 55, `router.py` 164,
`human_feedback.py` 98) and the shared extraction/condition helpers stay
in `utils.py`. The public API is re-exported from `dsl/__init__.py`, so
import paths are unchanged.

This is simpler because each decorator is now read and changed in
isolation instead of scanning a 1000-line file to find one of them, and
router-specific annotation parsing no longer sits next to unrelated
start/listen logic.
2026-06-04 15:02:06 -03:00
alex-clawd
aed69237d4 docs: add NVIDIA Nemotron LLM guide (#6037)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
2026-06-04 09:22:41 -03:00
Vini Brasil
051fa0c1cb Build FlowDefinition from Flow DSL metadata (#6017)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* Build FlowDefinition from Flow DSL metadata

Introduce `FlowDefinition`, a serializable model built from the Flow
DSL's runtime metadata. It becomes the structural contract for Flow
methods, triggers, routers, state, and configuration.

The visualization layer is the first consumer: `flow_structure` and
`build_flow_structure` now project from the definition instead of
re-introspecting the class. The runner still executes from live
registries, but the definition gives future runners a single static
contract to read.

This replaces AST source parsing for router return values, crew
references, and state schema with runtime metadata plus explicit
`@router(paths=...)` or `Literal`/`Enum` return hints. AST parsing was
fragile and could silently fail for dynamic or non-inspectable methods.

The refactor removes obsolete introspection and serializer code:

* Delete `flow_serializer.py`, `flow/utils.py`, and
  `visualization/schema.py`
* Move flow structure modeling into `flow_definition.py`
* Simplify visualization building around the static definition contract

* Format files
2026-06-03 18:02:56 -03:00
Gui Vieira
73d20fb0c3 Document monorepo deployments (#6018)
* Document monorepo deployments

* Add localized monorepo docs
2026-06-03 17:01:10 -03:00
Lucas Gomide
d09e3f4544 feat: flatten LiteLLM cache/reasoning usage sub-counts in _usage_to_dict (#6033)
LiteLLM returns provider usage as-is, nesting cache-read / cache-creation /
reasoning counts under provider-specific shapes (e.g.
prompt_tokens_details.cached_tokens, Anthropic-style cache_read_input_tokens).
Surface them as flat cached_prompt_tokens / reasoning_tokens /
cache_creation_tokens keys so the span pipeline can read them; prompt /
completion / total token counts are left untouched.
2026-06-03 15:13:30 -04:00
Lorenze Jay
1357491f0d Lorenze/feat/conversational flows (#5896)
* feat: add conversational flows documentation and chat session support

- Introduced a new guide for building multi-turn chat applications using , detailing session management and message handling.
- Added  class to facilitate chat interactions, including streaming support and event handling.
- Implemented  for class-level defaults and improved input normalization for conversational turns.
- Enhanced event listeners to manage flow events and tracing more effectively, including support for nested crew executions.
- Added tests for conversational flow helpers and kickoff parameters to ensure functionality and reliability.

* linted

* feat: enhance flow event tracing and session management

- Updated TraceCollectionListener to handle nested flows without re-claiming parent session batches.
- Ensured that method execution events are always emitted for tracing, regardless of flow event suppression.
- Improved finalization logic for flow trace batches to respect session deferral flags.
- Added tests to verify that method execution events are emitted correctly when flow events are suppressed and that deferred session finalization is respected in nested flows.

* updated docs

* feat: introduce experimental conversational flow framework

- Added a new module for conversational flow, including classes for managing conversation state, messages, and events.
- Implemented  and  for structured intent handling and routing.
- Enhanced the  class to support turn-oriented conversational applications with built-in routing and message handling.
- Updated  to include new classes in the public API.
- Added tests to validate the functionality of the new conversational flow features.

* handled docs

* feat(flow): enhance conversational flow handling and tracing

- Introduced support for deferred multi-turn tracing to maintain continuous event sequences.
- Updated  method to delegate to restored checkpoint flows, improving session management.
- Added tests to validate the new tracing behavior and ensure correct event handling in conversational flows.

* fix multimodal test

* better conversational

* adjusted prompt

* drop unused

* fix test

* refactor: rename  to  and update related documentation

This commit refactors the  class to  for clarity and consistency across the codebase. The documentation has been updated to reflect this change, ensuring that references to the new  class are accurate. Additionally, the alias for legacy imports is maintained for backward compatibility. The changes enhance the overall structure and readability of the conversational flow implementation.

* fix test

* adding experimetnal indicators

* fix test and reloaded cassettes

* cleanup ConversationalFlow class

* addressing double finalization and fixed tests

* improve on emphemeral tracing and adddressing comments
2026-06-03 11:53:16 -07:00
Lorenze Jay
ea88904d35 docs: update changelog and version for v1.14.7a1 (#6032) 2026-06-03 10:40:43 -07:00
Lorenze Jay
be3cf62b63 feat: bump versions to 1.14.7a1 (#6031) 2026-06-03 10:30:33 -07:00
Greyson LaLonde
68cdd44520 fix(cli): restore [project.scripts] in crewai package for uv tool install 2026-06-03 09:50:39 -07:00
Greyson LaLonde
7676b0937c fix(deps): bump authlib to >=1.6.12 to patch PYSEC-2026-188 2026-06-03 09:45:59 -07:00
Greyson LaLonde
ee707028db chore: remove testing pdf from root
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2026-06-02 17:53:26 -07:00
Lorenze Jay
770d1b284f Lorenze/fix/file input not working reliably (#6020)
* fix filesystem

* Refine commit message formatting

* fix for async kickoffs

* added suggestion
2026-06-02 17:14:51 -07:00
alex-clawd
b047c96756 Handle Snowflake Claude stringified tool calls (#6008)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
* Handle Snowflake Claude stringified tool calls

* Fix Snowflake tool id type narrowing

* Extract Snowflake tool result text in summaries

* Bump PyJWT for vulnerability scan

---------

Co-authored-by: João Moura <joaomdmoura@gmail.com>
2026-06-02 19:37:18 -03:00
Greyson LaLonde
d37af0d404 perf(knowledge): lazy-load docling imports to speed up crewai import 2026-06-02 15:16:48 -07:00
Greyson LaLonde
c81b4fe11e fix(deps): bump pyjwt to >=2.13.0 to patch CVEs 2026-06-02 10:01:53 -07:00
Lorenze Jay
a9cb7867bb Add crew trained agents file support (#6012)
* Add crew trained agents file support

* Add crew trained agents file support
2026-06-02 09:38:34 -07:00
Jesse Miller
383ae66b55 docs: add Databricks integration guide (#6001)
Some checks failed
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
* docs: add Databricks integration guide to enterprise integrations

Add documentation for connecting CrewAI agents to Databricks via the
Databricks managed MCP servers. Highlights Genie, Databricks SQL, Unity
Catalog Functions, and Vector Search, each configured as a separate MCP
connection, and covers OAuth/PAT setup. Includes ko, pt-BR, and ar
translations and registers the page in all docs.json navigation blocks.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* fix: use locale-specific slugs for Databricks nav entries

Add databricks integration entries to pt-BR, ko, and ar nav blocks
using locale-specific prefixes instead of only having en/ entries.

Co-authored-by: Luzk <2128595+Luzk@users.noreply.github.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Iris <iris@crewai.com>
Co-authored-by: Luzk <2128595+Luzk@users.noreply.github.com>
Co-authored-by: Greyson LaLonde <greyson.r.lalonde@gmail.com>
Co-authored-by: Lucas Gomide <lucaslg200@gmail.com>
2026-06-02 09:43:05 -04:00
alex-clawd
774fd871a8 Fix Snowflake Claude incomplete tool result histories (#6006)
* Fix Snowflake Claude incomplete tool result histories

* Filter Snowflake Claude preserved tool results
2026-06-02 09:11:59 -03:00
alex-clawd
4a0769d97c Add native Snowflake Cortex LLM provider (#6005) 2026-06-02 08:10:13 -03:00
Greyson LaLonde
fee5b3e395 fix(devtools): point template bumper at lib/cli templates dir 2026-06-02 02:02:12 -07:00
devin-ai-integration[bot]
3010f1286f chore: widen click dependency constraint to allow 8.2+
Addresses #6002
2026-06-02 00:06:25 -07:00
Greyson LaLonde
e53a676c04 fix(flow): re-arm multi-source or_ listeners across router-driven cycles
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
The previous discard-after-body approach cleared the gate mid-wave, so
a slow parallel @start finishing after the listener body could re-fire
the same multi-source or_ listener. Re-arm only when a router emits a
signal that matches the listener's condition; parallel @start paths
never reach that branch and the race gate keeps protecting them.

Closes #5972
2026-06-01 15:24:58 -07:00
Vini Brasil
1aba9fe415 Split flow.py into DSL, definition, and runtime (#5997)
This commit separates the monolithic `flow.py` into three modules, each
with one job:

- `dsl.py` - the Python DSL for flows (@start/@listen/@router, or_/and_)
- `flow_definition.py` - the structural model extracted from the DSL
- `runtime.py` - the execution engine and state for flows

This phase moves code only and should not have any breaking changes.
2026-06-01 18:37:10 -03:00
Greyson LaLonde
4dafb05735 chore(deps): bump uv to >=0.11.15 and ignore unfixable chromadb CVE
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
uv 0.11.7 -> 0.11.17 patches GHSA-4gg8-gxpx-9rph. chromadb has no
patched release for GHSA-f4j7-r4q5-qw2c (server-only pre-auth RCE,
not reachable in our embedded use); ignore until upstream ships a fix.
2026-06-01 00:10:19 -07:00
Jesse Miller
5cdc420c50 docs: add Snowflake integration guide (#5977)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
* docs: add Snowflake integration guide to enterprise integrations

Add documentation for connecting CrewAI agents to Snowflake via the
Snowflake-managed MCP server. Highlights Cortex Analyst, Cortex Search,
and SQL execution, and covers OAuth/PAT setup. Registers the page in
all docs.json navigation blocks.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* docs: add Snowflake integration page for ko, ar, pt-BR

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Iris Clawd <iris@crewai.com>
2026-05-29 15:03:55 -04:00
Greyson LaLonde
fca21b155c docs: update changelog and version for v1.14.6
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2026-05-28 10:03:50 -07:00
Greyson LaLonde
0486b85aa3 feat: bump versions to 1.14.6 2026-05-28 09:47:19 -07:00
Greyson LaLonde
ed91100a0f refactor(skills): move Skills Repository to experimental + CREWAI_EXPERIMENTAL gate
Moves the registry/cache pieces of PR #5867 under crewai.experimental.skills
and the CLI commands under `crewai experimental skill`. The stable local-file
skills feature (loader, parser, validation, models) stays in crewai.skills.

Both entry points now require CREWAI_EXPERIMENTAL=1:
- resolve_registry_ref() calls require_experimental_skills() before resolving
- The `crewai experimental` CLI group raises UsageError when the flag is unset

SkillDownloadStarted/CompletedEvent move out of crewai.events.types.skill_events
into crewai.experimental.skills.events.

* refactor(skills): move 'version' off SkillFrontmatter into metadata

The skill version is now stored as `metadata.version` rather than a
top-level field on `SkillFrontmatter`. A `before` validator lifts any
top-level YAML `version:` into `metadata['version']` so existing SKILL.md
files keep parsing.
2026-05-28 09:38:10 -07:00
Lucas Gomide
2148c7ed77 docs: add ACP (Beta) docs navigation block to Agent Control Plane pages (#5961)
- Adds an <Info> "ACP (Beta) Docs Navigation" block at the top of every
  Agent Control Plane page so readers can jump between Overview,
  Monitoring, and Rules without scrolling to the bottom-of-page Related
  cards.
2026-05-28 09:56:37 -04:00
iris-clawd
8890e0d645 docs: remove consensual process references from processes page (#5959)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
The consensual process was never implemented and is not planned.
Removes all mentions across en, ar, ko, and pt-BR locales.

Co-authored-by: Lorenze Jay <lorenzejay@users.noreply.github.com>
Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com>
2026-05-27 18:01:30 -07:00
Greyson LaLonde
4a6a072fc8 docs: update changelog and version for v1.14.6a2 2026-05-27 16:49:36 -07:00
Greyson LaLonde
d52106b3c7 feat: bump versions to 1.14.6a2 2026-05-27 16:42:40 -07:00
Greyson LaLonde
4b190ae6b4 docs: restructure checkpointing page 2026-05-27 14:51:42 -07:00
Lorenze Jay
2e36f06732 feat: enhance StdioTransport to prevent environment variable leakage (#5506)
* feat: enhance StdioTransport to prevent environment variable leakage

- Replaced os.environ.copy() with get_default_environment() to ensure only allowed environment variables are passed to the MCP server.
- Added tests to verify that ambient environment variables do not leak and that user-supplied environment variables can override defaults.

* feat: add environment variable filtering hook to StdioTransport

- Introduced an optional `_env_filter_hook` to allow extensions to modify the environment variables passed to MCP servers, enabling features like credential stripping.
- Updated tests to ensure the filtering hook is applied correctly after merging user-supplied and default environment variables.
2026-05-27 13:38:25 -07:00
Lorenze Jay
a1033e4bfe Fix structured output leaks in tool-calling loops (#5897)
* Fix structured output leaks in tool-calling loops

* addressing comments

* drop scripts

* Update Gemini agent tests to include structured output with thoughts and bump model version to 2.5-flash

* merge

* Update Anthropic test cases to use new model and tool structure

- Changed the model from "claude-3-5-haiku-20241022" to "claude-sonnet-4-6" in the test setup.
- Updated the request and response formats in the YAML test cassette to reflect the new tool structure and improved content formatting.
- Adjusted the expected response body to match the new output format from the assistant, including changes in tool usage and response details.
- Increased rate limit values in the response headers for better testing scenarios.

* adjusted bedrock cassettes

* adjusting cassettes for bedrock

* fix test

* Update VCR configuration to use 'host' instead of 'bedrock_host' for request matching
2026-05-27 13:20:53 -07:00
iris-clawd
90a37c94c1 docs: remove Skills Repository entry from changelog (#5953)
* docs: remove Skills Repository entry from changelog

* docs: also remove Skills Repository entry from translated changelogs
2026-05-27 13:15:55 -07:00
Greyson LaLonde
c5ea415cda chore(crewai-tools): drop self-explanatory comments
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2026-05-26 16:25:07 -07:00
Lucas Gomide
1bac7d3afb document one-time admin package install step (#5941)
* docs: document one-time admin package install step

The previous revision described a manual "install in Salesforce first,
then connect from AMP" flow that nobody actually follows, and linked to
a private repo customers can't access.

* docs: point Integrations link at crewai_plus/unified_tools
2026-05-26 19:06:51 -04:00
Greyson LaLonde
3a52919a35 chore(devtools): drop self-explanatory comments 2026-05-26 15:50:44 -07:00
Greyson LaLonde
07569f04ee chore(crewai-files): drop self-explanatory comments 2026-05-26 15:01:22 -07:00
Lucas Gomide
952c84c195 Add Agent Control Plane docs (#5939)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
* docs: split Agent Control Plane into Overview/Monitoring/Rules and localize

Mirror the secrets-manager folder convention for ACP: one folder per
locale with overview, monitoring, and rules pages. Replaces the two
flat agent-control-plane.mdx / agent-control-plane-rules.mdx files
with a 3-page layout, adds full translations for pt-BR, ko, and ar,
and rewires docs.json to register the new paths under each locale's
Manage group across the same 4 versions where ACP already lived.

* docs: flag Agent Control Plane as Beta in overview pages

Add a Beta callout right after the lead screenshot on the ACP
overview page across en, pt-BR, ko, and ar, matching the convention
used by Secrets Manager.
2026-05-26 14:42:27 -04:00
Greyson LaLonde
840ba89900 chore(crewai-core): drop self-explanatory comments 2026-05-26 10:33:18 -07:00
Greyson LaLonde
fd10c64148 chore(crewai): drop self-explanatory comments 2026-05-26 10:23:33 -07:00
Lorenze Jay
77a61274dc feat(planning): enhance planning configuration and observation handling (#5913)
* feat(planning): enhance planning configuration and observation handling

- Introduced  attribute in  to control LLM calls after each step.
- Updated  to set default  to 1 when planning is enabled without explicit config.
- Modified  to support heuristic observations when LLM calls are disabled.
- Adjusted  to respect  and  settings for step observations.
- Added tests to verify behavior of new configurations and ensure correct observation handling across different reasoning efforts.

* fix(agent_executor): update handling of failed steps in low effort mode

- Adjusted logic to ensure that failed steps are recorded without marking them as completed when using low reasoning effort.

- Introduced feedback for failed steps, allowing the process to continue while tracking failures.
- Added a test to verify that failed steps are correctly marked without triggering a replan.

- And linted

* linted
2026-05-26 09:10:43 -07:00
Vini Brasil
32f5e74449 Skip lock acquisition in CrewTrainingHandler.load when file is missing (#5935)
Every agent kickoff calls _use_trained_data, which calls
CrewTrainingHandler(...).load(). Since #4827 wrapped load() in store_lock,
that means every kickoff acquires the cross-process (Redis-backed when
REDIS_URL is set) lock even on deployments that never train and have no
trained-agents file on disk.

Move the missing/empty-file short-circuit above store_lock so the lock is
only acquired when there is actually a file to read. save() and the real
read remain locked.
2026-05-26 12:52:31 -03:00
Greyson LaLonde
bad64b1ee6 chore(cli): drop self-explanatory comments
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2026-05-26 01:05:25 -07:00
Greyson LaLonde
867df0f633 fix(checkpoint): drop unroundtrippable callbacks and adapter state
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
- callable_to_string returns None for lambdas/closures instead of an
  unresolvable dotted path; Crew filters Nones out of restored callback
  lists.
- EventNode.event serializer honors info.mode so mode='json' calls cascade
  properly into nested event payloads.
- RagTool.adapter serializes to None (post-validator rebuilds from
  config); concrete adapters hold runtime state that can't be round-tripped.
2026-05-25 19:24:02 -07:00
Greyson LaLonde
c3e2001d52 fix(checkpoint): serialize type[BaseModel] fields as JSON schema
Some checks failed
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
Subclass redeclarations of args_schema/response_format dropped the
parent's Annotated PlainSerializer, causing PydanticSerializationError
on model_dump(mode='json'). Replace with @field_serializer decorators
backed by a shared serialize_model_class helper:

- BaseTool: covers RecallMemoryTool, RememberTool, AskQuestionTool,
  DelegateWorkTool, AddImageTool, ReadFileTool
- BaseLLM (check_fields=False): covers LLM, Anthropic, OpenAI, Gemini,
  Bedrock
- LiteAgent.response_format
- A2AConfig / A2AClientConfig response_model
2026-05-23 03:50:24 +08:00
Greyson LaLonde
306f5989b4 fix(checkpoint): avoid orphan task_started on resume scope restore
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
Move scope restoration from Crew-level global push to a per-task push
inside Task via resume_task_scope() in event_context. Fixes orphan
task_started warning, hierarchical resume (manager_agent now eligible
for _resuming), and parallel async resume (each contextvars copy owns
its own scope). Tests added.
2026-05-23 01:20:15 +08:00
Greyson LaLonde
4990041ef7 chore(deps): force starlette>=1.0.1 for PYSEC-2026-161
starlette <1.0.1 has PYSEC-2026-161 (missing Host header validation
poisons request.url.path, bypassing path-based auth). Pulled in as a
transitive of fastapi. Override-dependencies forces the patched
version; lock regenerated against starlette 1.0.1.
2026-05-22 23:33:08 +08:00
Greyson LaLonde
88e95befe7 fix(experimental): allow AgentExecutor restore from checkpoint
llm and prompt were declared required with exclude=True, making the
model un-restorable from its own serialized output. Mirror the
CrewAgentExecutor pattern: make them nullable with default None, keep
exclude=True, and re-attach llm on the resume path alongside the other
re-attached fields. Guard the two prompt-deref sites so the runtime
invariant survives the looser type.
2026-05-22 23:24:12 +08:00
Matt Aitchison
179c20b352 ci: pin third-party actions to commit SHAs (#5869)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* ci: pin third-party actions to commit SHAs

Pin third-party GitHub Actions in workflow files to immutable 40-char
commit SHAs per the org security policy. Mutable refs like @v4 can be
silently re-pointed by a compromised upstream; SHAs cannot. Trailing
version comments let Dependabot/Renovate continue to manage updates.

Related to [COR-51](https://linear.app/crewai/issue/COR-51).

* ci: disable persist-credentials in pip-audit checkout

Address CodeRabbit feedback on PR #5869: the pip-audit workflow is
read-only and never needs an authenticated git context, so opt out of
persisting the GITHUB_TOKEN in the local git config per the
actions/checkout security guidance.
2026-05-21 18:08:34 -05:00
Thiago Moretto
c3ef622ec6 feat(tools): declare env_vars on DatabricksQueryTool (#5892)
* feat(tools): declare env_vars on DatabricksQueryTool

Add EnvVar import and env_vars field to DatabricksQueryTool so the host
UI knows which environment variables the tool requires. Both auth paths
(DATABRICKS_HOST+TOKEN or DATABRICKS_CONFIG_PROFILE) are marked
required=False with descriptions explaining the alternative.

* chore: update tool specifications

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-21 16:20:58 -03:00
Heitor Carvalho
6d712a3686 docs: migrate Secrets Manager / Workload Identity from replicated-config (#5874) 2026-05-21 14:23:42 -03:00
Thiago Moretto
56b6594669 fix(tools): correct mongdb typo to pymongo in package_dependencies (#5891)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
* fix(tools): correct mongdb typo to pymongo in package_dependencies

The `package_dependencies` field in `MongoDBVectorSearchTool` referenced
the non-existent package `mongdb` instead of the actual PyPI package
`pymongo`, which is the driver imported and used throughout the file.

* chore: update tool specifications

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-21 10:57:17 -04:00
Greyson LaLonde
d3e20900e8 docs: update changelog and version for v1.14.6a1 2026-05-21 21:27:13 +08:00
Greyson LaLonde
81c21e3166 feat: bump versions to 1.14.6a1
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2026-05-21 15:09:48 +08:00
Greyson LaLonde
b4b285764c fix: harden RuntimeState serialization across entity fields
Adds missing serializers, discriminators, and exclude markers on entity
fields that previously crashed model_dump_json or restored ambiguously:

- Flow.persistence: add _serialize_persistence; drop | Any escape hatch
- Flow.input_provider: SerializableInstance dotted-path round-trip
- BaseAgent.agent_executor: add _serialize_executor_ref
- BaseAgent.tools_handler / cache_handler: exclude=True
- Memory / MemoryScope / MemorySlice: memory_kind Literal discriminator
- Knowledge.storage / .embedder: exclude live client, serialize spec
- BaseKnowledgeSource subclasses: source_type Literal + dict-resolver
- BaseKnowledgeSource.storage / chunk_embeddings: exclude=True
- input_provider: enforce InputProvider protocol via dedicated
  validator/serializer; reject non-class dotted paths in
  _dotted_path_to_instance
- MemoryScope/MemorySlice: allow restore without live Memory; expose
  bind() to reattach the dependency post-restore
- Knowledge.embedder: add BeforeValidator that resolves provider_class
  dotted paths back to a BaseEmbeddingsProvider subclass
2026-05-21 14:53:40 +08:00
alex-clawd
418afd29e7 feat: Skills Repository — registry, cache, CLI, and SDK integration (#5867)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
* feat: add Skills Repository — registry, cache, CLI, and SDK integration

Adds a Skills Repository feature allowing users to publish, install,
and use skills from the CrewAI registry with @org/skill-name refs.

## What's New

### SDK (lib/crewai/)
- SkillFrontmatter: added optional 'version' field (backward compatible)
- SkillCacheManager: manages ~/.crewai/skills/{org}/{name}/ with
  .crewai_meta.json tracking, path-traversal-safe tar extraction
- SkillRegistry: parse @org/skill-name refs, local-first resolution
  (./skills/ > cache > download), interactive prompt on first use,
  CI-mode guard (CREWAI_NONINTERACTIVE/CI env vars)
- Agent.skills and Crew.skills widened to accept str refs (@org/name)
- set_skills() resolves registry refs with org-prefixed dedup keys
- New events: SkillDownloadStartedEvent, SkillDownloadCompletedEvent

### CLI (lib/cli/)
- crewai skill create <name> — context-aware (project vs standalone)
- crewai skill install @org/name — downloads to ./skills/ or cache
- crewai skill publish — ZIP + upload to org registry
- crewai skill list — show installed skills

### PlusAPI (lib/crewai-core/)
- Added SKILLS_RESOURCE, get_skill(), publish_skill(), list_skills()

### Scaffolding
- crew and flow templates now include skills/ directory

### Tests
- 91 SDK skill tests + 15 CLI skill tests, all passing

* fix: address all CI failures and CodeRabbit review comments

Lint:
- Remove unused imports (click, pytest, json)
- Replace try-except-pass with logging (S110)
- Fix unprotected zipfile.extractall (S202)

Security:
- Path traversal: startswith → is_relative_to for tar extraction
- Add path traversal protection to ZIP extraction via _safe_extract_zip
- Both cache.py and CLI main.py hardened

Type checker:
- Fix import path: crewai.events.event_bus (not crewai_event_bus)
- Remove unused type: ignore comments
- Fix type mismatches in set_skills() variable types

Code quality:
- Fix f-string interpolation in SkillNotCachedError
- Use ValidationError instead of Exception in test

* style: ruff format + autofix remaining lint errors

* refactor: reuse SDK parser and SkillCacheManager in CLI

- _parse_frontmatter() now delegates to crewai.skills.parser.parse_frontmatter
  when available, with a minimal fallback for CLI-only installs
- install() global cache path now reuses SkillCacheManager.store() instead
  of duplicating metadata writing logic

* refactor: add _print_current_organization to SkillCommand (matches ToolCommand pattern)

* fix: write .crewai_meta.json in fallback install path

CodeRabbit caught that the ImportError fallback in install() didn't write
cache metadata, making skills invisible to 'crewai skill list'.

* fix: tighten @org/name ref validation to prevent path traversal

Reject refs with multiple slashes (@org/a/b), dot segments (@../skill),
or leading dots in org/name. Applied to both CLI install() and SDK
parse_registry_ref() so the contract is enforced consistently.

* fix: update test assertions to match tightened error messages

* fix: align OSS client with AMP API contract

- download_skill(): fetch download_url (presigned URL) instead of
  expecting inline base64. Falls back to 'file' field for compat.
- Read 'latest_version' field, fall back to 'version'
- Same fixes applied to CLI install() command

* fix: publish as tar.gz (matches AMP content_type validation) + add zip fallback to SDK cache

CLI publish:
- _build_skill_zip → _build_skill_tarball (tar.gz format)
- Content type: application/x-gzip (matches SkillVersion validation)

SDK cache:
- store() now tries tar.gz first, falls back to zip extraction
- Added _safe_extract_zip for path-traversal-safe zip handling
- Both formats work for download/install regardless of server format

---------

Co-authored-by: João Moura <joaomdmoura@gmail.com>
2026-05-20 14:38:25 -03:00
Greyson LaLonde
7cc1a7bb41 fix(deps): bump pip and paramiko to drop pip-audit ignores
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
OSV no longer flags pip 26.1.1 (GHSA-58qw-9mgm-455v) or paramiko
5.0.0 (GHSA-r374-rxx8-8654), so override both to those minimums
and remove the corresponding --ignore-vuln entries. paramiko is
pulled in transitively via composio-core.
2026-05-20 22:33:43 +08:00
Greyson LaLonde
09ffe87fbb ci: ignore pip-audit findings without published fixes
Adds joblib, markdown, nltk, onnx, pyjwt, torch and transformers
advisories that have no fixed version available (or are disputed)
to the pip-audit ignore list. Rationale recorded next to each ID.
2026-05-20 21:40:30 +08:00
Greyson LaLonde
14af56b74d ci: pin third-party actions to commit SHAs
Replaces version tags (e.g. astral-sh/setup-uv@v6, slackapi/slack-github-action@v2.1.0)
with full commit SHAs across every workflow. Mitigates supply-chain risk from
mutable tags.
2026-05-20 19:01:53 +08:00
Greyson LaLonde
35f693cf68 chore: tighten typing across plus_api client
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Adds typed containers for wire payloads, literal aliases for HTTP method
and log type, and Ffnal markers on resource constants. Updates
upstream returns in project_utils.py and deploy/main.py to match
the new contracts.
2026-05-20 01:43:48 +08:00
Greyson LaLonde
da15554d81 feat: generate categorized release notes for enterprise 2026-05-20 00:24:26 +08:00
Greyson LaLonde
284533464f fix: bump idna to 3.15 to address GHSA-65pc-fj4g-8rjx
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
2026-05-19 23:38:34 +08:00
Tiago Freire
024e230b2c docs: remove {" "} JSX expressions breaking <Steps> render (#5857)
## Overview

Prettier-inserted bare `{" "}` lines between sibling `<Step>` elements caused Mintlify's `<Steps>` to crash with "Cannot read properties of undefined (reading 'stepNumber')", leaving the page body blank.

### Affected pages (en/ar/ko/pt-BR):
- enterprise/guides/enable-crew-studio
- learn/llm-selection-guide
2026-05-19 10:44:53 -04:00
Greyson LaLonde
a4c90b6912 docs: update changelog and version for v1.14.5
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2026-05-19 03:19:40 +08:00
Greyson LaLonde
c50da7a6f2 feat: bump versions to 1.14.5 2026-05-19 03:11:26 +08:00
Irfaan Mansoori
e8aa870f90 fix: memory leak in git.py by using cached_property
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Co-authored-by: Greyson LaLonde <greyson.r.lalonde@gmail.com>
2026-05-18 21:55:57 +08:00
Greyson LaLonde
14cd81eec6 docs: update changelog and version for v1.14.5a7 2026-05-18 21:13:34 +08:00
Greyson LaLonde
a6225da326 feat: bump versions to 1.14.5a7 2026-05-18 21:08:46 +08:00
Greyson LaLonde
259d334e38 chore(devtools): skip pinning crewai-files in file-processing extra 2026-05-18 21:00:37 +08:00
Greyson LaLonde
42aa8a777c chore: deprecate function_calling_llm field 2026-05-18 20:49:11 +08:00
Heitor Carvalho
a95d26763f docs: update changelog and version for v1.14.5a6 (#5828)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2026-05-15 17:05:04 -03:00
Heitor Carvalho
65ec783aae feat: bump versions to 1.14.5a6 (#5827) 2026-05-15 16:51:59 -03:00
Greyson LaLonde
eefe0e42ac fix: surface streamed tool calls when available_functions is absent 2026-05-16 02:46:35 +08:00
Greyson LaLonde
75bb882911 fix(deps): bump langsmith to >=0.8.0 for GHSA-3644-q5cj-c5c7
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
2026-05-15 21:32:52 +08:00
iris-clawd
c36827b45b fix(docs/pt-BR): replace untranslated code block placeholders (#5781)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* fix(docs/pt-BR): replace untranslated code block placeholders

Replace all `# (O código não é traduzido)` and `# código não traduzido`
placeholder comments in the PT-BR docs with the actual code from the
English source files.

Files fixed:
- docs/pt-BR/concepts/flows.mdx (~15 placeholders → real code)
- docs/pt-BR/guides/flows/mastering-flow-state.mdx (~17 placeholders → real code)

Code itself is kept in English per i18n conventions. Inline # comments
within code blocks have been translated to Portuguese.

* fix(docs/pt-BR): address CodeRabbit review comments

- flows.mdx: add missing load_dotenv() call after imports
- mastering-flow-state.mdx: fix PersistentCounterFlow second-run example
  to pass inputs={"id": flow1.state.id} to kickoff(), matching the
  documented resume pattern; update comment accordingly
2026-05-13 12:23:18 -03:00
Lorenze Jay
264da8245a Lorenze/imp/prompt layering (#5774)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* improving prompt structure especially for prompt caching

* addressing comments
2026-05-12 12:39:12 -07:00
Mani
f2960ccaaf Added docs for TavilyGetResearch (#5707)
* Add Tavily Research and get Research

- Added tavily research with docs to crew AI

- Added tavily get research with docs to crew AI

* Update `tavily-python` installation instructions and adjust version constraints

- Changed installation command from `pip install` to `uv add` for `tavily-python` in multiple documentation files.
- Updated version constraint for `tavily-python` in `pyproject.toml` from `>=0.7.14` to `~=0.7.14`.
- Modified the `exclude-newer` date in `uv.lock` to `2026-04-23T07:00:00Z`.

* Add Tavily Research Tool documentation in multiple languages

- Introduced `TavilyResearchTool` documentation in English, Arabic, Korean, and Portuguese.
- Updated `docs.json` to include paths for the new documentation files.
- The `TavilyResearchTool` allows CrewAI agents to perform multi-step research tasks and generate cited reports using the Tavily Research API.

* Fix Tavily research CI failures

* added getResearchTool docs

- Added docs for getResearchTool

---------

Co-authored-by: lorenzejay <lorenzejaytech@gmail.com>
Co-authored-by: Evan Rimer <evan.rimer@tavily.com>
Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com>
2026-05-12 12:25:45 -07:00
Greyson LaLonde
bb0bde9518 docs: update changelog and version for v1.14.5a5 2026-05-13 03:00:58 +08:00
Greyson LaLonde
2034f2140a feat: bump versions to 1.14.5a5 2026-05-13 02:54:13 +08:00
iris-clawd
3322634625 feat: deprecate CrewAgentExecutor, default Crew agents to AgentExecutor (#5745)
* feat: deprecate CrewAgentExecutor, default Crew agents to AgentExecutor

* regen cassettes

* fix tests

* addressing pr comments

---------

Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com>
Co-authored-by: lorenzejay <lorenzejaytech@gmail.com>
Co-authored-by: Greyson LaLonde <greyson.r.lalonde@gmail.com>
2026-05-12 11:22:13 -07:00
Tiago Freire
3d95afca41 Docs: inputs.idrestoreFromStateId migration guide (#5779)
## Summary

- Add a new docs page at `docs/en/guides/flows/inputs-id-deprecation.mdx` that explains the deprecation of `inputs.id` as a `@persist` hydration mechanism and walks users through migrating to `restoreFromStateId` (available in CrewAI **v1.14.5 and later**).
- Wire the page into `docs.json` next to `mastering-flow-state` in all 13 version blocks across all 4 languages (52 nav inserts).
- Add translations for `ar`, `ko`, `pt-BR`
2026-05-12 13:10:32 -04:00
iris-clawd
b2cd133f10 fix(docs): restore missing code block in pt-BR first-flow guide (#5780)
* fix(docs): restore missing code block in pt-BR first-flow guide

The pt-BR translation of the 'Build Your First Flow' guide had a
placeholder comment '# [CÓDIGO NÃO TRADUZIDO, MANTER COMO ESTÁ]'
instead of the actual Python code in Step 5. This restores the full
main.py code block from the English source, matching the original
since code should not be translated.

* Translate code comments to pt-BR in first-flow guide

Code comments in the tutorial should be in Portuguese for the pt-BR
audience, since they are part of the guide's educational content.
2026-05-12 13:23:00 -03:00
Greyson LaLonde
ba523f46c0 fix(devtools): include all workspace packages in bump pin rewrites 2026-05-12 22:49:44 +08:00
Greyson LaLonde
63a9e7eb5e fix(deps): patch urllib3 GHSA-qccp-gfcp-xxvc, GHSA-mf9v-mfxr-j63j
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2026-05-12 00:48:42 +08:00
Greyson LaLonde
5d757cb626 fix(flow): log HITL pre-review and distillation failures, add learn_strict 2026-05-12 00:26:31 +08:00
Greyson LaLonde
b0d4dd256d fix(deps): patch gitpython, langchain-core; ignore unpatched paramiko CVE 2026-05-11 22:31:56 +08:00
iris-clawd
e4a91cdc0c docs: add OSS upgrade & crew-to-flow migration guide (#5744)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
* docs: add OSS upgrade & crew-to-flow migration guide

* docs: add upgrading-crewai guide and installation note

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* docs: consolidate upgrade & migration guide into single page

Merge the broader root-level upgrade-crewai.mdx into the canonical
en/guides/migration/upgrading-crewai.mdx so there is one comprehensive
upgrade & migration page covering: project venv vs global CLI, why
crewai install alone won't bump versions, breaking changes, and the
Crew-to-Flow migration. Removes the orphaned root-level file (which
was not referenced in docs.json nav).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* docs: add pt-BR, ar, ko translations of upgrade/migration guide

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* docs: reduce upgrade guide scope to package upgrade + breaking changes only

* docs: soften intro tone — releases ship features, not breaking changes

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix: resolve CodeRabbit review comments

- Add space between Arabic conjunction and `uv.lock` code span (ar)
- Add explicit {#memory-embedder-config} anchors to localized headings
  so in-page links resolve correctly (ar, ko, pt-BR, en)

Co-authored-by: Lucas Gomide <lucaslg200@gmail.com>

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: Lucas Gomide <lucaslg200@gmail.com>
Co-authored-by: Greyson LaLonde <greyson.r.lalonde@gmail.com>
2026-05-08 17:49:39 -04:00
Mislav Ivanda
b9e71b322f feat: improve Daytona sandbox tools
Signed-off-by: Mislav Ivanda <mislavivanda454@gmail.com>
Co-authored-by: Greyson LaLonde <greyson.r.lalonde@gmail.com>
Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com>
2026-05-09 05:29:30 +08:00
Greyson LaLonde
f495bda016 fix(devtools): refresh all published workspace packages on uv lock/sync 2026-05-09 03:50:51 +08:00
Greyson LaLonde
622c0b610b docs: update changelog and version for v1.14.5a4 2026-05-09 03:14:29 +08:00
Greyson LaLonde
a09c4de2fd feat: bump versions to 1.14.5a4 2026-05-09 03:08:22 +08:00
Greyson LaLonde
cf2fb4503d chore(deps): bump mem0ai to >=2.0.0 to address GHSA-xqxw-r767-67m7
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
2026-05-09 00:17:48 +08:00
Greyson LaLonde
c67f6f63dc fix(ci): make nightly publish idempotent and serialized
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2026-05-08 02:20:31 +08:00
Greyson LaLonde
964066e86b fix(ci): stamp and pin all workspace packages in nightly publish
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
2026-05-08 02:07:01 +08:00
Cole Goeppinger
74a1ff8db5 feat: update llm listings
Add the latest Anthropic and OpenAI LLMs to the CLI
2026-05-08 01:19:47 +08:00
Greyson LaLonde
d6f7e7d5f8 chore(deps): use 3-day exclude-newer window
* chore(deps): use 3-day exclude-newer window

Aligns the root workspace with the per-package pyprojects, which
already use `exclude-newer = "3 days"`. The fixed 2026-04-27 cutoff
blocks legitimate dependency bumps (e.g. daytona ~=0.171 in #5740)
without adding meaningful protection — the relative window still
includes the security patches that motivated the original pin.

* fix(deps): bump gitpython and python-multipart for new advisories

- gitpython >=3.1.49 for GHSA-v87r-6q3f-2j67 (newline injection in
  config_writer().set_value() enables RCE via core.hooksPath).
- python-multipart >=0.0.27 for GHSA-pp6c-gr5w-3c5g (DoS via
  unbounded multipart part headers).

Both surfaced via pip-audit on this branch.
2026-05-08 00:11:05 +08:00
Greyson LaLonde
d165bcb65f fix(deps): move textual to crewai-cli and add certifi
Some checks failed
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2026-05-07 04:40:08 +08:00
Greyson LaLonde
fa6287327d docs: update changelog and version for v1.14.5a3 2026-05-07 01:58:27 +08:00
Greyson LaLonde
e961a005cb feat: bump versions to 1.14.5a3
Some checks failed
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
2026-05-07 01:44:05 +08:00
Greyson LaLonde
93e786d263 refactor: extract CLI into standalone crewai-cli package 2026-05-06 20:46:46 +08:00
iris-clawd
ec8a522c2c fix: correct status endpoint path from /{kickoff_id}/status to /status/{kickoff_id}
Some checks failed
Check Documentation Broken Links / Check broken links (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
2026-05-05 07:29:49 +08:00
Greyson LaLonde
e25f6538a8 fix(deps): bump gitpython to >=3.1.47 for GHSA-rpm5-65cw-6hj4
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
2026-05-04 23:44:28 +08:00
Greyson LaLonde
470d4035db docs: update changelog and version for v1.14.5a2 2026-05-04 23:04:56 +08:00
Greyson LaLonde
57d1b338f7 feat: bump versions to 1.14.5a2 2026-05-04 22:58:06 +08:00
huang yutong
01df19b029 fix(a2a): always restore task.output_pydantic in finally block
In `_execute_task_with_a2a` and its async variant, the try body
sets `task.output_pydantic = None` before returning an A2A
response. The finally block then checks
`if task.output_pydantic is not None` before restoring the
original value — but since it was just set to None, the condition
is always False and the original value is never restored. This
permanently mutates the Task object.

Remove the guard so `output_pydantic` is unconditionally restored,
matching the unconditional restoration of `description` and
`response_model` in the same block.

Co-authored-by: Greyson LaLonde <greyson.r.lalonde@gmail.com>
2026-05-04 22:41:04 +08:00
Rip&Tear
dca2c3160f chore: update security reporting instructions
Co-authored-by: Greyson LaLonde <greyson.r.lalonde@gmail.com>
2026-05-04 22:31:35 +08:00
Greyson LaLonde
6494d68ffc fix(gemini): include thoughts_token_count in completion tokens 2026-05-04 21:03:38 +08:00
Greyson LaLonde
f579aa53ae fix: preserve task outputs across async batch flush 2026-05-04 20:24:24 +08:00
minasami-pr
a23e118b11 fix: forward kwargs to loader calls in CrewAIRagAdapter
Co-authored-by: Greyson LaLonde <greyson.r.lalonde@gmail.com>
2026-05-04 19:52:24 +08:00
Greyson LaLonde
095f796922 fix: prevent result_as_answer from returning hook-block message as final answer 2026-05-04 19:42:07 +08:00
Zamuldinov Nikita
bfbdba426f fix: prevent result_as_answer from returning error as final answer
When a tool with result_as_answer=True raises an exception, the agent
was receiving result_as_answer=True and returning the error string as
the final answer. Now we set result_as_answer=False when an error event
is emitted, allowing the agent to reflect and retry.

Fixes crewAIInc/crewAI#5156

---------

Co-authored-by: NIK-TIGER-BILL <nik.tiger.bill@github.com>
Co-authored-by: Greyson LaLonde <greyson.r.lalonde@gmail.com>
2026-05-04 19:28:21 +08:00
Greyson LaLonde
a058a3b15b fix(task): use acall for output conversion in async paths 2026-05-04 18:42:12 +08:00
Greyson LaLonde
184c228ae9 fix: prevent shared LLM stop words mutation across agents
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2026-05-04 14:23:17 +08:00
Greyson LaLonde
c9100cb51d docs(devtools): document additional env vars
Some checks failed
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
2026-05-03 14:50:44 +08:00
Greyson LaLonde
17e82743f6 fix: handle BaseModel input in convert_to_model 2026-05-03 14:17:03 +08:00
Lorenze Jay
3403f3cba9 docs: update changelog and version for v1.14.5a1 (#5678)
Some checks failed
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2026-05-01 14:27:57 -07:00
Lorenze Jay
5db72250b2 feat: bump versions to 1.14.5a1 (#5677)
* feat: bump versions to 1.14.5a1

* chore: update tool specifications

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-05-01 14:21:50 -07:00
Greyson LaLonde
a071838e92 fix(devtools): cover missing crewai pin sites in release flow 2026-05-02 03:26:56 +08:00
Tiago Freire
cd2b9ee38a feat(flow): add restore_from_state_id kickoff parameter (#5674)
## Summary

- Reverts `b0e2fda` ("fix(flow): add execution_id separate from state.id", COR-48): removes `Flow.execution_id` and points `current_flow_id` / `current_flow_request_id` back at `flow_id` (i.e. `state.id`). The separate per-run tracking id was no longer the right abstraction once `restore_from_state_id` reshapes how `state.id` is assigned;

- Adds an optional `restore_from_state_id` kwarg to `Flow.kickoff` / `Flow.kickoff_async` that hydrates state from a previously-persisted flow's latest snapshot

- Reassigns `state.id` to a fresh value (or `inputs["id"]` if pinned) so the new run's `@persist` writes don't extend the source's history

- Existing `inputs["id"]` resume, `@persist`, and `from_checkpoint` paths are unchanged

## Problem
`@persist` only supports *resume* today: `kickoff(inputs={"id": <uuid>})` hydrates state and continues writing under the same `flow_uuid`. There's no way to **fork** — hydrate from a snapshot but persist under a separate key, leaving the source's history intact. This PR adds that.

| | `state.id` after kickoff | `@persist` writes land under |
|---|---|---|
| `inputs["id"]` (resume) | supplied id | supplied id (extends history) |
| `restore_from_state_id` (fork) | fresh id, or `inputs["id"]` if pinned | new id (source preserved) |

## Behavior

| `inputs.id` | `restore_from_state_id` | Effect |
|---|---|---|
| — | — | Fresh kickoff |
| set | — | Existing resume |
| — | UUID | Fork — new `state.id`, hydrated from source |
| set | UUID | Fork into a pinned `state.id`, hydrated from source |

- Source not found → silent fallback (mirrors existing resume)
- Both `from_checkpoint` and `restore_from_state_id` set → `ValueError`
- `restore_from_state_id=None` → byte-identical to current main

## Design
Fork hydration runs before the existing `inputs` block in `kickoff_async`. On a hit, it calls the same `_restore_state` primitive used by resume, then overwrites `state.id` with a fresh UUID (or `inputs["id"]`). A `fork_succeeded` flag gates the existing `inputs["id"]` path so we don't double-load. `_completed_methods` / `_is_execution_resuming` are intentionally untouched — skip-completed-methods remains the territory of `apply_checkpoint` and `from_pending`.

## Test plan
- [ ] `pytest tests/test_flow_persistence.py` — 5 new tests (four-row matrix, not-found fallback, default no-op, conflict raise) + 6 existing as regression
- [ ] `pytest tests/test_flow.py` — broader flow suite
- [ ] Manual end-to-end against an HITL `@persist` flow
2026-05-01 11:46:07 -04:00
Ishan Goswami
07c4a30f2e feat(crewai-tools): add highlights to ExaSearchTool, rename from EXASearchTool
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
* feat(crewai-tools): add highlights to ExaSearchTool, rename from EXASearchTool

- Add a highlights init param so agents can get token-efficient excerpts instead of full pages
- Rename EXASearchTool to ExaSearchTool; keep EXASearchTool as a deprecated alias so existing imports keep working
- Update the docs and example to use highlights as the recommended option
- Add a small note that says Exa is the fastest and most accurate web search API
- Add tests for the new highlights param and the deprecation alias

* fix(crewai-tools): import order and module-level Exa for tests

- Reorder std-lib imports so ruff is happy with force-sort-within-sections.
- Import Exa at module level (with a fallback) so the existing test mocks resolve.
  The lazy install prompt still works if exa_py is missing.
- Allow content and summary to be a dict, matching highlights.
- Trim test file to the cases this PR introduces (highlights param and the
  EXASearchTool deprecation alias). Existing init-shape tests stay.

Co-Authored-By: ishan <ishan@exa.ai>

* chore(crewai-tools): drop self-explanatory comment on schema alias

Co-Authored-By: ishan <ishan@exa.ai>

* docs(crewai-tools): default highlights to True, drop summary from examples

Co-Authored-By: ishan <ishan@exa.ai>

* docs(crewai-tools): simplify highlights examples to highlights=True

Co-Authored-By: ishan <ishan@exa.ai>

* feat(crewai-tools): add x-exa-integration header for usage tracking

Co-Authored-By: ishan <ishan@exa.ai>

* docs(crewai-tools): add Exa MCP section and resources links

Co-Authored-By: ishan <ishan@exa.ai>

---------

Co-authored-by: ishan <ishan@exa.ai>
Co-authored-by: Greyson LaLonde <greyson.r.lalonde@gmail.com>
Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com>
2026-05-01 21:25:23 +08:00
Lorenze Jay
b30fdbaa0e fix: ensure skills loading events for traces
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2026-05-01 12:08:25 +08:00
Greyson LaLonde
898f860916 docs: update changelog and version for v1.14.4
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
2026-05-01 03:11:30 +08:00
Greyson LaLonde
2c0323c3fe feat: bump versions to 1.14.4 2026-05-01 02:57:37 +08:00
Greyson LaLonde
c580d428f0 chore(devtools): open PR for deployment test bump and wait for merge 2026-05-01 02:48:08 +08:00
Greyson LaLonde
70f391994e fix(converter): fall through when JSON regex match isn't valid JSON 2026-05-01 00:48:09 +08:00
Vini Brasil
864f0a8a91 Revert "feat(flow): support custom persistence key in @persist (#5649)" (#5668)
This reverts commit e2deac5575.
2026-04-30 12:04:57 -03:00
Greyson LaLonde
9f13235037 fix(llm): preserve tool_calls when response also contains text 2026-04-30 22:53:01 +08:00
Matt Aitchison
c7f01048b7 feat(azure): forward credential_scopes to Azure AI Inference client (#5661)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* feat(azure): forward credential_scopes to Azure AI Inference client

Adds a credential_scopes field to the native Azure AI Inference
provider and a matching AZURE_CREDENTIAL_SCOPES env var
(comma-separated). The value is forwarded to ChatCompletionsClient /
AsyncChatCompletionsClient when set, letting keyless / Entra-based
callers target a specific Azure AD audience (e.g.
https://cognitiveservices.azure.com/.default) without subclassing the
provider. Matches the upstream azure.ai.inference SDK kwarg of the
same name.

Lazy build re-reads the env var so an LLM constructed at module
import (before deployment env vars are set) still picks up scopes —
same pattern as the existing AZURE_API_KEY / AZURE_ENDPOINT lazy
reads. to_config_dict round-trips the field.

* refactor(azure): tighten credential_scopes env handling

Address review feedback:
- Move os.getenv into the helper so AZURE_CREDENTIAL_SCOPES appears once
- Match the surrounding api_key/endpoint `or` style in the validator
- Drop the list() defensive copy in to_config_dict — every other field
  in that method (and the base class's `stop`) is assigned by reference
2026-04-29 16:52:29 -05:00
Greyson LaLonde
14c3963d2c fix(instructor): forward base_url and api_key to instructor.from_provider 2026-04-30 03:00:39 +08:00
Greyson LaLonde
feb2e715a3 fix(mcp): warn and return empty when native MCP server returns no tools 2026-04-30 02:41:01 +08:00
Kunal Karmakar
e0b86750c2 feat(azure): add Responses API support for Azure OpenAI provider (#5201)
* Support azure openai responses

* Revert function supported condition

* Revert comment deletion

* Update support stop words

* Add cassette based tests

* Fix linting
2026-04-29 11:12:11 -07:00
Greyson LaLonde
2a40316521 fix(llm): use validated messages variable in non-streaming handlers 2026-04-30 00:56:56 +08:00
Lucas Gomide
e2deac5575 feat(flow): support custom persistence key in @persist (#5649)
* feat(flow): add optional key param to @persist decorator

Allows users to specify which state attribute to use as the
persistence key instead of always defaulting to state.id.

Usage: @persist(key='conversation_id')

Falls back to state.id when key is not provided (no breaking change).
Raises ValueError if the specified key is missing or falsy on state.

* docs(flow): document @persist key parameter for custom persistence keys

* fix(flow): use explicit None check for persist key to avoid empty-string fallback

---------

Co-authored-by: iris-clawd <iris-clawd@anthropic.com>
Co-authored-by: iris-clawd <iris@crewai.com>
Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com>
2026-04-29 12:41:20 -04:00
Greyson LaLonde
e1b53f684a docs: update changelog and version for v1.14.4a1 2026-04-29 23:57:06 +08:00
Greyson LaLonde
4b49fc9ac6 feat: bump versions to 1.14.4a1 2026-04-29 23:50:30 +08:00
Greyson LaLonde
07667829e9 fix(cli): guard crew chat description helpers against LLM failures
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2026-04-29 10:30:24 +08:00
Lorenze Jay
0154d16fd8 docs: add E2B Sandbox Tools page (#5647)
Some checks failed
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Document the new E2BExecTool, E2BPythonTool, and E2BFileTool — agent
tools that run shell commands, Python, and filesystem ops inside
isolated E2B remote sandboxes. Adds the page under tools/ai-ml/ and
wires it into the navigation in docs.json.

Co-authored-by: iris-clawd <iris@crewai.com>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 11:47:12 -07:00
Greyson LaLonde
4c74dc0f86 fix(executor): reset messages and iterations between invocations
CrewAgentExecutor is reused across sequential tasks but invoke/ainvoke
only appended to self.messages and never reset self.iterations, so
task 2 inherited task 1's history and iteration count.
2026-04-29 02:10:17 +08:00
Lorenze Jay
13e0e9be6b docs: add Daytona sandbox tools documentation (#5643)
Adds docs for DaytonaExecTool, DaytonaPythonTool, and DaytonaFileTool
introduced in PR #5530. Covers installation, lifecycle modes, examples,
and full parameter reference. Registered in docs.json nav for all
languages and versions.

Co-authored-by: iris-clawd <iris@crewai.com>
2026-04-28 10:30:40 -07:00
dependabot[bot]
860a5d494d chore(deps): bump pip in the security-updates group across 1 directory (#5635)
Bumps the security-updates group with 1 update in the / directory: [pip](https://github.com/pypa/pip).


Updates `pip` from 26.0.1 to 26.1
- [Changelog](https://github.com/pypa/pip/blob/main/NEWS.rst)
- [Commits](https://github.com/pypa/pip/compare/26.0.1...26.1)

---
updated-dependencies:
- dependency-name: pip
  dependency-version: '26.1'
  dependency-type: indirect
  dependency-group: security-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-28 10:39:04 -05:00
Matt Aitchison
cbb5c53557 Add Vertex AI workload identity setup guide (#5637)
* docs: add Vertex AI workload identity setup guide

Walks SaaS customers through configuring CrewAI AMP to authenticate to
Google Vertex AI via GCP Workload Identity Federation, eliminating the
need for long-lived service account keys.

* docs: restrict Vertex WI guide to v1.14.3+ navigation

The guide requires `crewai>=1.14.3`, so registering it under older
version snapshots is misleading. Keep the entry only in the v1.14.3
English nav.

* docs: clarify crewai-vertex SA name is an example
2026-04-28 10:15:54 -05:00
Greyson LaLonde
45497478c0 fix(cli): forward trained-agents file through replay and test 2026-04-28 22:46:41 +08:00
Greyson LaLonde
4e9331a2c8 fix(agent): honor custom trained-agents file at inference 2026-04-28 22:09:34 +08:00
Greyson LaLonde
a29977f4f6 fix(crew): bind task-only agents to crew so multimodal input_files reach the LLM
Some checks failed
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
2026-04-28 20:53:39 +08:00
Greyson LaLonde
7a0a8cf56f fix: serialize guardrail callables as null for JSON checkpointing 2026-04-28 14:57:49 +08:00
Edward Irby
6ae1d1951f docs: add You.com MCP tools for search, research, and content extraction (#5563)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* docs: add You.com MCP integration documentation for crewAI

Add documentation pages for integrating You.com's remote MCP server
with crewAI agents, covering web search, research, and content
extraction tools via the MCP protocol.

Pages added:
- Overview with DSL and MCPServerAdapter integration approaches
- you-search: web/news search with advanced filtering
- you-research: multi-source research with cited answers
- you-contents: full page content extraction
- Security considerations (prompt injection, API key management)

Co-authored-by: factory-droid[bot] <138933559+factory-droid-oss@users.noreply.github.com>

* docs: add You.com MCP search, research, and content extraction guides

Add two documentation pages for integrating You.com's remote MCP server
with crewAI agents:

- search-research/youai-search.mdx: you-search (web/news search)
  and you-research (synthesized cited answers) via DSL or MCPServerAdapter.
  Includes free tier support (100 queries/day, no API key).
- web-scraping/youai-contents.mdx: you-contents (full page content
  extraction) via MCPServerAdapter with schema patching helpers.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

* fix: add tool_filter to DSL search agent in youai-contents combo example

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

---------

Co-authored-by: factory-droid[bot] <138933559+factory-droid-oss@users.noreply.github.com>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com>
2026-04-27 15:36:06 -07:00
Greyson LaLonde
ef40bc0bc8 fix(agent_executor): rename force_final_answer to avoid self-referential router
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
2026-04-28 05:06:21 +08:00
Mani
07364cf46f Add Tavily Research and get Research (#5483)
* Add Tavily Research and get Research

- Added tavily research with docs to crew AI

- Added tavily get research with docs to crew AI

* Update `tavily-python` installation instructions and adjust version constraints

- Changed installation command from `pip install` to `uv add` for `tavily-python` in multiple documentation files.
- Updated version constraint for `tavily-python` in `pyproject.toml` from `>=0.7.14` to `~=0.7.14`.
- Modified the `exclude-newer` date in `uv.lock` to `2026-04-23T07:00:00Z`.

* Add Tavily Research Tool documentation in multiple languages

- Introduced `TavilyResearchTool` documentation in English, Arabic, Korean, and Portuguese.
- Updated `docs.json` to include paths for the new documentation files.
- The `TavilyResearchTool` allows CrewAI agents to perform multi-step research tasks and generate cited reports using the Tavily Research API.

* Fix Tavily research CI failures

---------

Co-authored-by: lorenzejay <lorenzejaytech@gmail.com>
Co-authored-by: Evan Rimer <evan.rimer@tavily.com>
Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com>
2026-04-27 13:51:56 -07:00
Lorenze Jay
1337e6de34 ci: skip generate-tool-specs job on fork PRs
GitHub doesn't expose repo secrets to pull_request events from forks, so
${{ secrets.CREWAI_TOOL_SPECS_APP_ID }} resolves to an empty string and
tibdex/github-app-token@v2 errors with "Input required and not supplied:
app_id". The job also tries to push commits to the PR branch, which it
can't do on a fork regardless. Skip it for cross-repo PRs and keep it
for same-repo PRs and manual dispatch.

Co-authored-by: Greyson LaLonde <greyson.r.lalonde@gmail.com>
2026-04-28 04:41:20 +08:00
Greyson LaLonde
de0b2a4fe0 fix(deps): bump litellm for SSTI fix; ignore unfixable pip CVE 2026-04-28 04:34:17 +08:00
Greyson LaLonde
cb46a1c4ba docs: update changelog and version for v1.14.3
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
2026-04-25 00:13:43 +08:00
Greyson LaLonde
d9046b98dd feat: bump versions to 1.14.3 2026-04-25 00:04:46 +08:00
Tiago Freire
b0e2fda105 fix(flow): add execution_id separate from state.id
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* fix(flow): add execution_id separate from state.id (COR-48)

  When a consumer passes `id` in `kickoff(inputs=...)`, that value
  overwrites the flow's state.id — which was also being used as the
  execution tracking identity for telemetry, tracing, and external
  correlation. Two kickoffs sharing the same consumer id ended up
  with the same tracking id, breaking any downstream system that
  joins on it.

  Introduces `Flow.execution_id`: a stable per-run identifier stored
  as a `PrivateAttr` on the `Flow` model, exposed via property +
  setter. It defaults to a fresh `uuid4` per instance, is never
  touched by `inputs["id"]`, and can be assigned by outer systems
  that already have an execution identity (e.g. a task id).

  Switches the `current_flow_id` / `current_flow_request_id`
  ContextVars to seed from `execution_id` so OTel spans emitted by
  `FlowTrackable` children correlate on the stable tracking key.

  `state.id` keeps its existing override semantics for
  persistence/restore — consumers resuming a persisted flow via
  `inputs["id"]` work exactly as before.

  Adds tests covering default uniqueness per instance, immunity to
  consumer `inputs["id"]`, context-var propagation, absence from
  serialized state, and parity for dict-state flows.

Co-authored-by: Greyson LaLonde <greyson.r.lalonde@gmail.com>
2026-04-24 04:48:14 +08:00
Greyson LaLonde
69d777ca50 fix(flow): replay recorded method events on checkpoint resume 2026-04-24 03:41:55 +08:00
Greyson LaLonde
77b2835a1d fix(flow): serialize initial_state class refs as JSON schema
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
2026-04-23 21:55:50 +08:00
Lorenze Jay
c77f1632dd fix: preserve metadata-only agent skills
Co-authored-by: Greyson LaLonde <greyson.r.lalonde@gmail.com>
2026-04-23 19:58:12 +08:00
Greyson LaLonde
69461076df refactor: dedupe checkpoint helpers and tighten state type hints 2026-04-23 19:29:04 +08:00
Greyson LaLonde
55937d7523 feat: emit lifecycle events for checkpoint operations
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2026-04-23 18:47:50 +08:00
Greyson LaLonde
bc2fb71560 docs: update changelog and version for v1.14.3a3
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Nightly Canary Release / Check for new commits (push) Has been cancelled
Nightly Canary Release / Build nightly packages (push) Has been cancelled
Nightly Canary Release / Publish nightly to PyPI (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
2026-04-23 05:11:06 +08:00
Greyson LaLonde
3e9deaf9c0 feat: bump versions to 1.14.3a3 2026-04-23 04:55:08 +08:00
Lorenze Jay
3f7637455c feat: supporting e2b 2026-04-23 04:36:33 +08:00
Matt Aitchison
fdf3101b39 feat(azure): fall back to DefaultAzureCredential when no API key
Enables keyless Azure auth (OIDC Workload Identity Federation, Managed
Identity, Azure CLI, env-configured Service Principal) without any
crewAI-specific configuration. Customers whose deployment environment
already sets the standard azure-identity env vars get keyless auth for
free; the existing API-key path is unchanged.

Linear: FAC-40
2026-04-23 04:21:35 +08:00
Greyson LaLonde
c94f2e8f28 fix: upgrade lxml to >=6.1.0 for GHSA-vfmq-68hx-4jfw
Some checks failed
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
2026-04-23 00:52:36 +08:00
alex-clawd
944fe6d435 docs: remove pricing FAQ from build-with-ai page across all locales (#5586)
Some checks failed
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Vulnerability Scan / pip-audit (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Removes the 'How does pricing work?' accordion from EN, AR, KO, and PT-BR.

Co-authored-by: Joao Moura <joaomdmoura@gmail.com>
2026-04-22 03:56:41 -03:00
iris-clawd
3be2fb65dc perf: lazy-load MCP SDK and event types to reduce cold start by ~29% (#5584)
* perf: defer MCP SDK import by fixing import path in agent/core.py

- Change 'from crewai.mcp import MCPServerConfig' to direct path
  'from crewai.mcp.config import MCPServerConfig' to avoid triggering
  mcp/__init__.py which eagerly loads the full mcp SDK (~300-400ms)
- Move MCPToolResolver import into get_mcp_tools() method body since
  it's only used at runtime, not in type annotations

Saves ~200ms on 'import crewai' cold start.

* perf: lazy-load heavy MCP imports in mcp/__init__.py

MCPClient, MCPToolResolver, BaseTransport, and TransportType now use
__getattr__ lazy loading. These pull in the full mcp SDK (~400ms) but
are only needed at runtime when agents actually connect to MCP servers.

Lightweight config and filter types remain eagerly imported.

* perf: lazy-load all event type modules in events/__init__.py

Previously only agent_events were lazy-loaded; all other event type
modules (crew, flow, knowledge, llm, guardrail, logging, mcp, memory,
reasoning, skill, task, tool_usage) were eagerly imported at package
init time. Since events/__init__.py runs whenever ANY crewai.events.*
submodule is accessed, this loaded ~12 Pydantic model modules
unnecessarily.

Now all event types use the same __getattr__ lazy-loading pattern,
with TYPE_CHECKING imports preserved for IDE/type-checker support.

Saves ~550ms on 'import crewai' cold start.

* chore: remove UNKNOWN.egg-info from version control

* fix: add MCPToolResolver to TYPE_CHECKING imports

Fixes F821 (ruff) and name-defined (mypy) from lazy-loading the
MCP import. The type annotation on _mcp_resolver needs the name
available at type-check time.

* fix: bump lxml to >=5.4.0 for GHSA-vfmq-68hx-4jfw

lxml 5.3.2 has a known vulnerability. Bump to 5.4.0+ which
includes the fix (libxml2 2.13.8). The previous <5.4.0 pin
was for etree import issues that have since been resolved.

* fix: bump exclude-newer to 2026-04-22 for lxml 6.1.0 resolution

lxml 6.1.0 (GHSA fix) was released April 17 but the exclude-newer
date was set to April 17, missing it by timestamp. Bump to April 22.

* perf: add import time benchmark script

scripts/benchmark_import_time.py measures import crewai cold start
in fresh subprocesses. Supports --runs, --json (for CI), and
--threshold (fail if median exceeds N seconds).

The companion GitHub Action workflow needs to be pushed separately
(requires workflow scope).

* new action

* Potential fix for pull request finding 'CodeQL / Workflow does not contain permissions'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

---------

Co-authored-by: Joao Moura <joaomdmoura@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-04-22 02:17:33 -03:00
20897 changed files with 4249942 additions and 124228 deletions

7
.github/security.md vendored
View File

@@ -5,8 +5,11 @@ CrewAI ecosystem.
### How to Report
Please submit reports to **crewai-vdp-ess@submit.bugcrowd.com**
Please submit reports through one of the following channels:
- **crewai-vdp-ess@submit.bugcrowd.com**
- https://security.crewai.com
- **Please do not** disclose vulnerabilities via public GitHub issues, pull requests,
or social media
- Reports submitted via channels other than this Bugcrowd submission email will not be reviewed and will be dismissed
- Reports submitted via channels other than the methods above will not be reviewed and will be dismissed

View File

@@ -23,10 +23,10 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Install uv
uses: astral-sh/setup-uv@v6
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
with:
version: "0.11.3"
python-version: ${{ matrix.python-version }}
@@ -39,7 +39,7 @@ jobs:
echo "Cache populated successfully"
- name: Save uv caches
uses: actions/cache/save@v4
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: |
~/.cache/uv

View File

@@ -59,7 +59,7 @@ jobs:
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
# Add any setup steps before running the `github/codeql-action/init` action.
# This includes steps like installing compilers or runtimes (`actions/setup-node`
@@ -69,7 +69,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
uses: github/codeql-action/init@9e0d7b8d25671d64c341c19c0152d693099fb5ba # v4.35.5
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
@@ -98,6 +98,6 @@ jobs:
exit 1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
uses: github/codeql-action/analyze@9e0d7b8d25671d64c341c19c0152d693099fb5ba # v4.35.5
with:
category: "/language:${{matrix.language}}"

View File

@@ -4,32 +4,62 @@ on:
pull_request:
paths:
- "docs/**"
- "docs.json"
push:
branches:
- main
paths:
- "docs/**"
- "docs.json"
workflow_dispatch:
permissions:
contents: read
jobs:
check-links:
name: Check broken links
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Set up Node
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: "22"
- name: Install Mintlify CLI
run: npm i -g mintlify
- name: Install Mint CLI
run: npm i -g mint@4.2.741
# Pruning immutable snapshots keeps the check fast (--files still parses every
# page); the default version must stay because unprefixed links resolve to it.
- name: Prune frozen doc versions (keep edge and latest)
if: github.event_name != 'workflow_dispatch'
run: |
python3 - <<'EOF'
import json
import shutil
from pathlib import Path
docs = Path("docs")
spec_path = docs / "docs.json"
spec = json.loads(spec_path.read_text())
keep_dirs = {"edge"}
for lang in spec["navigation"]["languages"]:
kept = [v for v in lang["versions"] if v["version"] == "Edge" or v.get("default")]
lang["versions"] = kept
keep_dirs.update(v["version"] for v in kept if v["version"] != "Edge")
missing = [d for d in keep_dirs if not (docs / d).is_dir()]
if missing:
raise SystemExit(f"docs.json version labels do not match directories: {missing}")
spec_path.write_text(json.dumps(spec, indent=2))
for path in docs.glob("v*"):
if path.is_dir() and path.name not in keep_dirs:
shutil.rmtree(path)
EOF
- name: Run broken link checker
run: |
# Auto-answer the prompt with yes command
yes "" | mintlify broken-links || test $? -eq 141
run: mint broken-links
working-directory: ./docs

View File

@@ -14,6 +14,7 @@ permissions:
jobs:
generate-specs:
if: github.event_name == 'workflow_dispatch' || github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
env:
PYTHONUNBUFFERED: 1
@@ -21,19 +22,19 @@ jobs:
steps:
- name: Generate GitHub App token
id: app-token
uses: tibdex/github-app-token@v2
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
with:
app_id: ${{ secrets.CREWAI_TOOL_SPECS_APP_ID }}
private_key: ${{ secrets.CREWAI_TOOL_SPECS_PRIVATE_KEY }}
app-id: ${{ secrets.CREWAI_TOOL_SPECS_APP_ID }}
private-key: ${{ secrets.CREWAI_TOOL_SPECS_PRIVATE_KEY }}
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
ref: ${{ github.head_ref }}
token: ${{ steps.app-token.outputs.token }}
- name: Install uv
uses: astral-sh/setup-uv@v6
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
with:
version: "0.11.3"
python-version: "3.12"

View File

@@ -12,8 +12,8 @@ jobs:
outputs:
code: ${{ steps.filter.outputs.code }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: dorny/paths-filter@d1c1ffe0248fe513906c8e24db8ea791d46f8590 # v3
id: filter
with:
filters: |
@@ -26,11 +26,11 @@ jobs:
if: needs.changes.outputs.code == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Restore global uv cache
id: cache-restore
uses: actions/cache/restore@v4
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: |
~/.cache/uv
@@ -41,7 +41,7 @@ jobs:
uv-main-py3.11-
- name: Install uv
uses: astral-sh/setup-uv@v6
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
with:
version: "0.11.3"
python-version: "3.11"
@@ -58,7 +58,7 @@ jobs:
- name: Save uv caches
if: steps.cache-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: |
~/.cache/uv

View File

@@ -5,6 +5,10 @@ on:
- cron: '0 6 * * *' # daily at 6am UTC
workflow_dispatch:
concurrency:
group: nightly-publish
cancel-in-progress: false
jobs:
check:
name: Check for new commits
@@ -14,14 +18,15 @@ jobs:
outputs:
has_changes: ${{ steps.check.outputs.has_changes }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
fetch-depth: 0
- name: Check for commits in last 24h
- name: Check for recent commits
id: check
run: |
RECENT=$(git log --since="24 hours ago" --oneline | head -1)
# 25h window absorbs cron-vs-commit timing skew at the boundary.
RECENT=$(git log --since="25 hours ago" --oneline | head -1)
if [ -n "$RECENT" ]; then
echo "has_changes=true" >> "$GITHUB_OUTPUT"
else
@@ -36,36 +41,44 @@ jobs:
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Install uv
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
with:
version: "0.11.3"
python-version: "3.12"
enable-cache: false
- name: Stamp nightly versions
run: |
DATE=$(date +%Y%m%d)
# All workspace packages share the same base version and are released together.
BASE=$(python -c "
import re
print(re.search(r'__version__\s*=\s*\"(.*?)\"', open('lib/crewai/src/crewai/__init__.py').read()).group(1))
")
NIGHTLY="${BASE}.dev${DATE}"
echo "Nightly version: ${NIGHTLY}"
for init_file in \
lib/crewai/src/crewai/__init__.py \
lib/crewai-core/src/crewai_core/__init__.py \
lib/crewai-tools/src/crewai_tools/__init__.py \
lib/crewai-files/src/crewai_files/__init__.py; do
CURRENT=$(python -c "
import re
text = open('$init_file').read()
print(re.search(r'__version__\s*=\s*\"(.*?)\"\s*$', text, re.MULTILINE).group(1))
")
NIGHTLY="${CURRENT}.dev${DATE}"
lib/crewai-files/src/crewai_files/__init__.py \
lib/cli/src/crewai_cli/__init__.py; do
sed -i "s/__version__ = .*/__version__ = \"${NIGHTLY}\"/" "$init_file"
echo "$init_file: $CURRENT -> $NIGHTLY"
echo "Stamped $init_file -> $NIGHTLY"
done
# Update cross-package dependency pins to nightly versions
sed -i "s/\"crewai-tools==[^\"]*\"/\"crewai-tools==${NIGHTLY}\"/" lib/crewai/pyproject.toml
# Update all cross-package dependency pins to the nightly version.
sed -i "s/\"crewai==[^\"]*\"/\"crewai==${NIGHTLY}\"/" lib/crewai-tools/pyproject.toml
sed -i "s/\"crewai-core==[^\"]*\"/\"crewai-core==${NIGHTLY}\"/" lib/crewai/pyproject.toml
sed -i "s/\"crewai-cli==[^\"]*\"/\"crewai-cli==${NIGHTLY}\"/" lib/crewai/pyproject.toml
sed -i "s/\"crewai-tools==[^\"]*\"/\"crewai-tools==${NIGHTLY}\"/" lib/crewai/pyproject.toml
sed -i "s/\"crewai-files==[^\"]*\"/\"crewai-files==${NIGHTLY}\"/" lib/crewai/pyproject.toml
sed -i "s/\"crewai-core==[^\"]*\"/\"crewai-core==${NIGHTLY}\"/" lib/cli/pyproject.toml
echo "Updated cross-package dependency pins to ${NIGHTLY}"
- name: Build packages
@@ -74,7 +87,7 @@ jobs:
rm dist/.gitignore
- name: Upload artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: dist
path: dist/
@@ -85,22 +98,19 @@ jobs:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/crewai
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v6
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
with:
version: "0.11.3"
python-version: "3.12"
enable-cache: false
- name: Download artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: dist
path: dist
@@ -116,7 +126,8 @@ jobs:
continue
fi
echo "Publishing $package"
if ! uv publish "$package"; then
# --check-url skips files already on PyPI so manual re-runs on the same day are idempotent.
if ! uv publish --check-url https://pypi.org/simple/ "$package"; then
echo "Failed to publish $package"
failed=1
fi

View File

@@ -10,7 +10,7 @@ jobs:
permissions:
pull-requests: write
steps:
- uses: codelytv/pr-size-labeler@v1
- uses: codelytv/pr-size-labeler@095a41fca88b8764fd9e008ad269bcdb82bb38b9 # v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
xs_label: "size/XS"

View File

@@ -12,7 +12,7 @@ jobs:
pr-title:
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
- uses: amannn/action-semantic-pull-request@e32d7e603df1aa1ba07e981f2a23455dee596825 # v5
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -24,17 +24,17 @@ jobs:
echo "tag=" >> $GITHUB_OUTPUT
fi
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
ref: ${{ steps.release.outputs.tag || github.ref }}
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@v4
uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # v4
- name: Build packages
run: |
@@ -42,7 +42,7 @@ jobs:
rm dist/.gitignore
- name: Upload artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: dist
path: dist/
@@ -58,19 +58,19 @@ jobs:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
ref: ${{ inputs.release_tag || github.ref }}
- name: Install uv
uses: astral-sh/setup-uv@v6
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
with:
version: "0.11.3"
python-version: "3.12"
enable-cache: false
- name: Download artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: dist
path: dist
@@ -159,7 +159,7 @@ jobs:
- name: Notify Slack
if: success()
uses: slackapi/slack-github-action@v2.1.0
uses: slackapi/slack-github-action@b0fa283ad8fea605de13dc3f449259339835fc52 # v2.1.0
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
webhook-type: incoming-webhook

View File

@@ -14,7 +14,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
- uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-label: 'no-issue-activity'

View File

@@ -12,8 +12,8 @@ jobs:
outputs:
code: ${{ steps.filter.outputs.code }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: dorny/paths-filter@d1c1ffe0248fe513906c8e24db8ea791d46f8590 # v3
id: filter
with:
filters: |
@@ -34,13 +34,13 @@ jobs:
group: [1, 2, 3, 4, 5, 6, 7, 8]
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
fetch-depth: 0 # Fetch all history for proper diff
- name: Restore global uv cache
id: cache-restore
uses: actions/cache/restore@v4
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: |
~/.cache/uv
@@ -51,7 +51,7 @@ jobs:
uv-main-py${{ matrix.python-version }}-
- name: Install uv
uses: astral-sh/setup-uv@v6
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
with:
version: "0.11.3"
python-version: ${{ matrix.python-version }}
@@ -61,7 +61,7 @@ jobs:
run: uv sync --all-groups --all-extras
- name: Restore test durations
uses: actions/cache/restore@v4
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: .test_durations_py*
key: test-durations-py${{ matrix.python-version }}
@@ -108,7 +108,7 @@ jobs:
- name: Save uv caches
if: steps.cache-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: |
~/.cache/uv

View File

@@ -12,8 +12,8 @@ jobs:
outputs:
code: ${{ steps.filter.outputs.code }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: dorny/paths-filter@d1c1ffe0248fe513906c8e24db8ea791d46f8590 # v3
id: filter
with:
filters: |
@@ -33,11 +33,11 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Restore global uv cache
id: cache-restore
uses: actions/cache/restore@v4
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: |
~/.cache/uv
@@ -48,7 +48,7 @@ jobs:
uv-main-py${{ matrix.python-version }}-
- name: Install uv
uses: astral-sh/setup-uv@v6
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
with:
version: "0.11.3"
python-version: ${{ matrix.python-version }}
@@ -62,7 +62,7 @@ jobs:
- name: Save uv caches
if: steps.cache-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: |
~/.cache/uv

View File

@@ -23,11 +23,11 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Restore global uv cache
id: cache-restore
uses: actions/cache/restore@v4
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: |
~/.cache/uv
@@ -38,7 +38,7 @@ jobs:
uv-main-py${{ matrix.python-version }}-
- name: Install uv
uses: astral-sh/setup-uv@v6
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
with:
version: "0.11.3"
python-version: ${{ matrix.python-version }}
@@ -55,14 +55,14 @@ jobs:
- name: Save durations to cache
if: always()
uses: actions/cache/save@v4
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: .test_durations_py*
key: test-durations-py${{ matrix.python-version }}
- name: Save uv caches
if: steps.cache-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: |
~/.cache/uv

View File

@@ -16,11 +16,13 @@ jobs:
name: pip-audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
- name: Restore global uv cache
id: cache-restore
uses: actions/cache/restore@v4
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: |
~/.cache/uv
@@ -31,7 +33,7 @@ jobs:
uv-main-py3.11-
- name: Install uv
uses: astral-sh/setup-uv@v6
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
with:
version: "0.11.3"
python-version: "3.11"
@@ -45,18 +47,17 @@ jobs:
- name: Run pip-audit
run: |
uv run pip-audit --desc --aliases --skip-editable --format json --output pip-audit-report.json \
--ignore-vuln CVE-2025-69872 \
--ignore-vuln CVE-2026-25645 \
--ignore-vuln CVE-2026-27448 \
--ignore-vuln CVE-2026-27459 \
--ignore-vuln PYSEC-2023-235
# Ignored CVEs:
# CVE-2025-69872 - diskcache 5.6.3: no fix available (latest version)
# CVE-2026-25645 - requests 2.32.5: fix requires 2.33.0, blocked by crewai-tools ~=2.32.5 pin
# CVE-2026-27448 - pyopenssl 25.3.0: fix requires 26.0.0, blocked by snowflake-connector-python <26.0.0 pin
# CVE-2026-27459 - pyopenssl 25.3.0: same as above
# PYSEC-2023-235 - couchbase: fixed in 4.6.0 (already upgraded), advisory not yet updated
pip_audit_args=(
--desc
--aliases
--skip-editable
--format json
--output pip-audit-report.json
--ignore-vuln PYSEC-2026-597 # nltk 3.9.4 (CVE-2026-12243): no fix available, transitive through crewai-tools[xml] -> unstructured.
--ignore-vuln GHSA-rrmf-rvhw-rf47 # torch 2.12.0 (CVE-2025-3000): local-only memory corruption in torch.jit.script; no fix available.
--ignore-vuln GHSA-f4j7-r4q5-qw2c # chromadb 1.1.1 (CVE-2026-45829): pre-auth RCE in the HTTP server; no fix available.
)
uv run pip-audit "${pip_audit_args[@]}"
continue-on-error: true
- name: Display results
@@ -88,18 +89,17 @@ jobs:
- name: Upload pip-audit report
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: pip-audit-report
path: pip-audit-report.json
- name: Save uv caches
if: steps.cache-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: |
~/.cache/uv
~/.local/share/uv
.venv
key: uv-main-py3.11-${{ hashFiles('uv.lock') }}

3
.gitignore vendored
View File

@@ -30,3 +30,6 @@ chromadb-*.lock
.crewai/memory
blogs/*
secrets/*
UNKNOWN.egg-info/
demos/*
.crewai/*

View File

@@ -19,7 +19,7 @@ repos:
language: system
pass_filenames: true
types: [python]
exclude: ^(lib/crewai/src/crewai/cli/templates/|lib/crewai/tests/|lib/crewai-tools/tests/|lib/crewai-files/tests/)
exclude: ^(lib/crewai/src/crewai/cli/templates/|lib/cli/src/crewai_cli/templates/|lib/cli/tests/|lib/crewai/tests/|lib/crewai-tools/tests/|lib/crewai-files/tests/|lib/devtools/tests/)
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.11.3
hooks:
@@ -28,7 +28,36 @@ repos:
hooks:
- id: pip-audit
name: pip-audit
entry: bash -c 'source .venv/bin/activate && uv run pip-audit --skip-editable --ignore-vuln CVE-2025-69872 --ignore-vuln CVE-2026-25645 --ignore-vuln CVE-2026-27448 --ignore-vuln CVE-2026-27459 --ignore-vuln PYSEC-2023-235' --
# Keep this ignore list in sync with .github/workflows/vulnerability-scan.yml.
entry: >-
bash -c 'source .venv/bin/activate && uv run pip-audit --skip-editable
--ignore-vuln PYSEC-2024-277
--ignore-vuln PYSEC-2026-89
--ignore-vuln PYSEC-2026-97
--ignore-vuln PYSEC-2026-597
--ignore-vuln PYSEC-2025-148
--ignore-vuln PYSEC-2025-183
--ignore-vuln PYSEC-2025-189
--ignore-vuln PYSEC-2025-190
--ignore-vuln PYSEC-2025-191
--ignore-vuln PYSEC-2025-192
--ignore-vuln PYSEC-2025-193
--ignore-vuln PYSEC-2025-194
--ignore-vuln PYSEC-2025-195
--ignore-vuln PYSEC-2025-196
--ignore-vuln PYSEC-2025-197
--ignore-vuln PYSEC-2025-210
--ignore-vuln PYSEC-2026-139
--ignore-vuln GHSA-rrmf-rvhw-rf47
--ignore-vuln PYSEC-2025-211
--ignore-vuln PYSEC-2025-212
--ignore-vuln PYSEC-2025-213
--ignore-vuln PYSEC-2025-214
--ignore-vuln PYSEC-2025-215
--ignore-vuln PYSEC-2025-216
--ignore-vuln PYSEC-2025-217
--ignore-vuln PYSEC-2025-218
--ignore-vuln GHSA-f4j7-r4q5-qw2c' --
language: system
pass_filenames: false
stages: [pre-push, manual]

26
AGENTS.md Normal file
View File

@@ -0,0 +1,26 @@
# Agent Instructions for CrewAI OSS
CrewAI is a Python based framework for building AI agents and agentic systems.
Follow these guidelines when contributing:
## Key Guidelines
1. Follow Python best practices and idiomatic patterns.
2. Maintain existing code structure and organization.
3. Write unit tests for new functionality focusing on behaivor and not
implementation.
4. Document public APIs and complex logic.
5. Suggest changes to the `docs/` folder when appropriate
6. Follow software principles such as DRY and YAGNI.
7. Keep diffs as minimal as possible.
## Changing Docs
1. Edit MDX under `docs/edge/en/*` and reference it from `docs/docs.json` if
needed.
2. Do not modify files under `docs/v*/`. Those are frozen release snapshots
managed by devtools.
3. Do not delete or rename files under `docs/images/` as frozen snapshots
may reference them.
4. If you want to preview your changes locally, use `cd docs && mintlify dev`.
To check for broken links, run `cd docs && mintlify broken-links`.

View File

@@ -12,6 +12,8 @@
<p align="center">
<a href="https://crewai.com">Homepage</a>
·
<a href="https://crewai.com/open-source">Open Source</a>
·
<a href="https://docs.crewai.com">Docs</a>
·
<a href="https://app.crewai.com">Start Cloud Trial</a>
@@ -53,20 +55,20 @@
### Fast and Flexible Multi-Agent Automation Framework
> CrewAI is a lean, lightning-fast Python framework built entirely from scratch—completely **independent of LangChain or other agent frameworks**.
> It empowers developers with both high-level simplicity and precise low-level control, ideal for creating autonomous AI agents tailored to any scenario.
> CrewAI is an open-source Python framework with high-level abstractions and low-level APIs for building production-ready multi-agent workflows.
> It gives developers autonomous agent collaboration through Crews and precise, event-driven control through Flows.
- **CrewAI Crews**: Optimize for autonomy and collaborative intelligence.
- **CrewAI Flows**: The **enterprise and production architecture** for building and deploying multi-agent systems. Enable granular, event-driven control, single LLM calls for precise task orchestration and supports Crews natively
- **CrewAI Crews**: Optimize for autonomy and collaborative intelligence with role-based AI agents.
- **CrewAI Flows**: Build event-driven automations that combine precise workflow control, single LLM calls, and native support for Crews.
With over 100,000 developers certified through our community courses at [learn.crewai.com](https://learn.crewai.com), CrewAI is rapidly becoming the
standard for enterprise-ready AI automation.
standard for production-ready agentic automation.
# CrewAI AMP Suite
CrewAI AMP Suite is a comprehensive bundle tailored for organizations that require secure, scalable, and easy-to-manage agent-driven automation.
For organizations that need a commercial control plane around CrewAI, [CrewAI AMP Suite](https://www.crewai.com/enterprise) adds managed deployment, observability, governance, security, and enterprise support.
You can try one part of the suite the [Crew Control Plane for free](https://app.crewai.com)
You can try one part of the suite, the [Crew Control Plane, for free](https://app.crewai.com).
## Crew Control Plane Key Features:
@@ -88,7 +90,6 @@ intelligent automations.
- [Getting Started](#getting-started)
- [Key Features](#key-features)
- [Understanding Flows and Crews](#understanding-flows-and-crews)
- [CrewAI vs LangGraph](#how-crewai-compares)
- [Examples](#examples)
- [Quick Tutorial](#quick-tutorial)
- [Write Job Descriptions](#write-job-descriptions)
@@ -96,11 +97,11 @@ intelligent automations.
- [Stock Analysis](#stock-analysis)
- [Using Crews and Flows Together](#using-crews-and-flows-together)
- [Connecting Your Crew to a Model](#connecting-your-crew-to-a-model)
- [How CrewAI Compares](#how-crewai-compares)
- [Frequently Asked Questions (FAQ)](#frequently-asked-questions-faq)
- [When to Use CrewAI](#when-to-use-crewai)
- [Contribution](#contribution)
- [Telemetry](#telemetry)
- [License](#license)
- [Frequently Asked Questions (FAQ)](#frequently-asked-questions-faq)
## Build with AI
@@ -134,15 +135,15 @@ This installs the official [CrewAI Skills](https://github.com/crewAIInc/skills)
<img src="docs/images/asset.png" alt="CrewAI Logo" width="100%">
</div>
CrewAI unlocks the true potential of multi-agent automation, delivering the best-in-class combination of speed, flexibility, and control with either Crews of AI Agents or Flows of Events:
CrewAI unlocks the true potential of multi-agent automation, delivering speed, flexibility, and control through Crews of AI agents and event-driven Flows:
- **Standalone Framework**: Built from scratch, independent of LangChain or any other agent framework.
- **Purpose-built architecture**: Designed specifically for agent orchestration, with a lightweight Python core and clean primitives for real-world automation.
- **High Performance**: Optimized for speed and minimal resource usage, enabling faster execution.
- **Flexible Low Level Customization**: Complete freedom to customize at both high and low levels - from overall workflows and system architecture to granular agent behaviors, internal prompts, and execution logic.
- **Ideal for Every Use Case**: Proven effective for both simple tasks and highly complex, real-world, enterprise-grade scenarios.
- **Flexible Low-Level Customization**: Complete freedom to customize everything from workflows and system architecture to agent behaviors, internal prompts, and execution logic.
- **Ideal for Every Use Case**: Proven effective for simple tasks, complex workflows, and production-grade automation.
- **Robust Community**: Backed by a rapidly growing community of over **100,000 certified** developers offering comprehensive support and resources.
CrewAI empowers developers and enterprises to confidently build intelligent automations, bridging the gap between simplicity, flexibility, and performance.
CrewAI empowers developers and teams to build intelligent automations that balance simplicity, flexibility, and production-grade control.
## Getting Started
@@ -433,16 +434,17 @@ In addition to the sequential process, you can use the hierarchical process, whi
## Key Features
CrewAI stands apart as a lean, standalone, high-performance multi-AI Agent framework delivering simplicity, flexibility, and precise control—free from the complexity and limitations found in other agent frameworks.
CrewAI gives developers a practical foundation for building agentic systems that move from prototype to production: autonomous collaboration where it helps, explicit workflow control where it matters, and Python-native customization throughout.
- **Standalone & Lean**: Completely independent from other frameworks like LangChain, offering faster execution and lighter resource demands.
- **Flexible & Precise**: Easily orchestrate autonomous agents through intuitive [Crews](https://docs.crewai.com/concepts/crews) or precise [Flows](https://docs.crewai.com/concepts/flows), achieving perfect balance for your needs.
- **Seamless Integration**: Effortlessly combine Crews (autonomy) and Flows (precision) to create complex, real-world automations.
- **Deep Customization**: Tailor every aspect—from high-level workflows down to low-level internal prompts and agent behaviors.
- **Reliable Performance**: Consistent results across simple tasks and complex, enterprise-level automations.
- **Thriving Community**: Backed by robust documentation and over 100,000 certified developers, providing exceptional support and guidance.
- **Crews for autonomy**: Model teams of specialized AI agents with roles, goals, tools, and tasks.
- **Flows for control**: Build event-driven workflows with state, branching, routing, and production logic.
- **Seamless integration**: Combine Crews and Flows to create complex, real-world automations.
- **Python-native customization**: Customize prompts, tools, execution paths, state, and integrations without fighting the framework.
- **Agent-ready capabilities**: Use tools, memory, knowledge, checkpointing, async execution, and MCP/A2A support for more capable production agents.
- **Production-ready patterns**: Add deterministic steps, human input, structured outputs, and checkpointing as your system grows.
- **Thriving community**: Backed by robust documentation and over 100,000 certified developers, providing exceptional support and guidance.
Choose CrewAI to easily build powerful, adaptable, and production-ready AI automations.
Choose CrewAI to build powerful, adaptable, and production-ready AI automations.
## Examples
@@ -580,16 +582,17 @@ CrewAI supports using various LLMs through a variety of connection options. By d
Please refer to the [Connect CrewAI to LLMs](https://docs.crewai.com/how-to/LLM-Connections/) page for details on configuring your agents' connections to models.
## How CrewAI Compares
## When to Use CrewAI
**CrewAI's Advantage**: CrewAI combines autonomous agent intelligence with precise workflow control through its unique Crews and Flows architecture. The framework excels at both high-level orchestration and low-level customization, enabling complex, production-grade systems with granular control.
Use CrewAI when you need more than a single prompt or chatbot: multi-step work, specialized agents, tool use, structured outputs, human review, or workflows that combine autonomous reasoning with explicit business logic.
- **LangGraph**: While LangGraph provides a foundation for building agent workflows, its approach requires significant boilerplate code and complex state management patterns. The framework's tight coupling with LangChain can limit flexibility when implementing custom agent behaviors or integrating with external systems.
CrewAI is especially useful when you want to:
_P.S. CrewAI demonstrates significant performance advantages over LangGraph, executing 5.76x faster in certain cases like this QA task example ([see comparison](https://github.com/crewAIInc/crewAI-examples/tree/main/Notebooks/CrewAI%20Flows%20%26%20Langgraph/QA%20Agent)) while achieving higher evaluation scores with faster completion times in certain coding tasks, like in this example ([detailed analysis](https://github.com/crewAIInc/crewAI-examples/blob/main/Notebooks/CrewAI%20Flows%20%26%20Langgraph/Coding%20Assistant/coding_assistant_eval.ipynb))._
- **Autogen**: While Autogen excels at creating conversational agents capable of working together, it lacks an inherent concept of process. In Autogen, orchestrating agents' interactions requires additional programming, which can become complex and cumbersome as the scale of tasks grows.
- **ChatDev**: ChatDev introduced the idea of processes into the realm of AI agents, but its implementation is quite rigid. Customizations in ChatDev are limited and not geared towards production environments, which can hinder scalability and flexibility in real-world applications.
- Coordinate multiple agents with clear roles and tasks.
- Wrap agent work in deterministic, event-driven workflows.
- Keep application logic in regular Python.
- Move from experiment to production without changing frameworks.
- Add tools, memory, checkpointing, and async execution as your system grows.
## Contribution
@@ -601,6 +604,19 @@ CrewAI is open-source and we welcome contributions. If you're looking to contrib
- Send a pull request.
- We appreciate your input!
### Contributing to the docs
The site at [docs.crewai.com](https://docs.crewai.com) is published from
`docs/` by [Mintlify](https://www.mintlify.com/). The docs use directory-based
versioning: edits to `docs/edge/<lang>/...` (e.g.
`docs/edge/en/concepts/agents.mdx`) land under the **Edge** version selector
immediately and are frozen into a new versioned snapshot under
`docs/v<X.Y.Z>/` at the next release cut. Frozen snapshots are immutable — CI
rejects PRs that modify them without a `[docs-freeze]` title prefix. The
release CLI (`devtools release`) handles the freeze automatically; see
[`AGENTS.md`](AGENTS.md) for the full contributor guide and
[`RELEASING.md`](RELEASING.md) for the release-cut runbook.
### Installing Dependencies
```bash
@@ -685,7 +701,7 @@ CrewAI is released under the [MIT License](https://github.com/crewAIInc/crewAI/b
- [What exactly is CrewAI?](#q-what-exactly-is-crewai)
- [How do I install CrewAI?](#q-how-do-i-install-crewai)
- [Does CrewAI depend on LangChain?](#q-does-crewai-depend-on-langchain)
- [Is CrewAI a standalone framework?](#q-is-crewai-a-standalone-framework)
- [Is CrewAI open-source?](#q-is-crewai-open-source)
- [Does CrewAI collect data from users?](#q-does-crewai-collect-data-from-users)
@@ -694,7 +710,6 @@ CrewAI is released under the [MIT License](https://github.com/crewAIInc/crewAI/b
- [Can CrewAI handle complex use cases?](#q-can-crewai-handle-complex-use-cases)
- [Can I use CrewAI with local AI models?](#q-can-i-use-crewai-with-local-ai-models)
- [What makes Crews different from Flows?](#q-what-makes-crews-different-from-flows)
- [How is CrewAI better than LangChain?](#q-how-is-crewai-better-than-langchain)
- [Does CrewAI support fine-tuning or training custom models?](#q-does-crewai-support-fine-tuning-or-training-custom-models)
### Resources and Community
@@ -710,7 +725,7 @@ CrewAI is released under the [MIT License](https://github.com/crewAIInc/crewAI/b
### Q: What exactly is CrewAI?
A: CrewAI is a standalone, lean, and fast Python framework built specifically for orchestrating autonomous AI agents. Unlike frameworks like LangChain, CrewAI does not rely on external dependencies, making it leaner, faster, and simpler.
A: CrewAI is a lean, fast Python framework built specifically for orchestrating autonomous AI agents and production-ready agentic workflows.
### Q: How do I install CrewAI?
@@ -726,9 +741,9 @@ For additional tools, use:
uv pip install 'crewai[tools]'
```
### Q: Does CrewAI depend on LangChain?
### Q: Is CrewAI a standalone framework?
A: No. CrewAI is built entirely from the ground up, with no dependencies on LangChain or other agent frameworks. This ensures a lean, fast, and flexible experience.
A: Yes. CrewAI is a standalone Python framework with its own primitives for agents, tasks, crews, flows, tools, and orchestration.
### Q: Can CrewAI handle complex use cases?
@@ -742,10 +757,6 @@ A: Absolutely! CrewAI supports various language models, including local ones. To
A: Crews provide autonomous agent collaboration, ideal for tasks requiring flexible decision-making and dynamic interaction. Flows offer precise, event-driven control, ideal for managing detailed execution paths and secure state management. You can seamlessly combine both for maximum effectiveness.
### Q: How is CrewAI better than LangChain?
A: CrewAI provides simpler, more intuitive APIs, faster execution speeds, more reliable and consistent results, robust documentation, and an active community—addressing common criticisms and limitations associated with LangChain.
### Q: Is CrewAI open-source?
A: Yes, CrewAI is open-source and actively encourages community contributions and collaboration.
@@ -784,11 +795,11 @@ A: Absolutely! CrewAI agents can easily integrate with external tools, APIs, and
### Q: Is CrewAI suitable for production environments?
A: Yes, CrewAI is explicitly designed with production-grade standards, ensuring reliability, stability, and scalability for enterprise deployments.
A: Yes, CrewAI is designed with production-grade patterns that support reliable, stable, and scalable agentic workflows.
### Q: How scalable is CrewAI?
A: CrewAI is highly scalable, supporting simple automations and large-scale enterprise workflows involving numerous agents and complex tasks simultaneously.
A: CrewAI is highly scalable, supporting simple automations and large-scale workflows involving numerous agents and complex tasks simultaneously.
### Q: Does CrewAI offer debugging and monitoring tools?

View File

@@ -5,12 +5,105 @@ from collections.abc import Generator
import gzip
import os
from pathlib import Path
import re
import tempfile
from typing import Any
from dotenv import load_dotenv
import pytest
from vcr.request import Request # type: ignore[import-untyped]
def _patch_vcrpy_aiohttp_compat() -> None:
"""Keep vcrpy's aiohttp stub working under aiohttp 3.14.0.
aiohttp 3.14.0 (pulled in to fix GHSA-jg22-mg44-37j8 and GHSA-hg6j-4rv6-33pg):
* removed ``aiohttp.streams.AsyncStreamReaderMixin`` (folded into ``StreamReader``),
which vcrpy's ``MockStream`` still subclasses -- vcr's patch machinery then raises
``AttributeError`` at collection time; and
* added a required ``stream_writer`` keyword-only arg to ``ClientResponse.__init__``,
which vcrpy's ``MockClientResponse`` does not pass -- raising ``TypeError`` at
cassette playback.
Restore the mixin, then rebuild ``MockClientResponse``'s ``super().__init__`` call from
the live ``ClientResponse`` signature (defaulting every required keyword-only arg to
``None``, mirroring vcrpy's original call) so it also survives future aiohttp additions.
"""
import asyncio
import inspect
from aiohttp import streams
from aiohttp.client_reqrep import ClientResponse
if not hasattr(streams, "AsyncStreamReaderMixin"):
class AsyncStreamReaderMixin:
__slots__ = ()
def __aiter__(self) -> streams.AsyncStreamIterator[bytes]:
return streams.AsyncStreamIterator(self.readline) # type: ignore[attr-defined]
def iter_chunked(self, n: int) -> streams.AsyncStreamIterator[bytes]:
return streams.AsyncStreamIterator(lambda: self.read(n)) # type: ignore[attr-defined]
def iter_any(self) -> streams.AsyncStreamIterator[bytes]:
return streams.AsyncStreamIterator(self.readany) # type: ignore[attr-defined]
def iter_chunks(self) -> streams.ChunkTupleAsyncStreamIterator:
return streams.ChunkTupleAsyncStreamIterator(self) # type: ignore[arg-type]
streams.AsyncStreamReaderMixin = AsyncStreamReaderMixin # type: ignore[attr-defined]
# Importing the stub builds MockStream/MockClientResponse, so it must run after the
# mixin is restored above.
import vcr.stubs.aiohttp_stubs as aiohttp_stubs # type: ignore[import-untyped]
if getattr(aiohttp_stubs.MockClientResponse, "_crewai_aiohttp_patched", False):
return
keyword_only = [
name
for name, param in inspect.signature(ClientResponse.__init__).parameters.items()
if param.kind is inspect.Parameter.KEYWORD_ONLY
]
class _NullStreamWriter:
# aiohttp 3.14.0 reads stream_writer.output_size in the "request already
# sent" branch (writer is None), so None is not enough -- supply a stub.
output_size = 0
fallback_loop: list[asyncio.AbstractEventLoop] = []
def _resolve_loop() -> asyncio.AbstractEventLoop:
# MockClientResponse is normally built inside aiohttp's running loop, so
# prefer that. In a sync context there is no running loop; avoid
# asyncio.get_event_loop(), which on 3.12+ emits a DeprecationWarning
# (and can RuntimeError) when no current loop is set. Use one cached
# loop instead -- the mock only stores it and calls loop.get_debug().
try:
return asyncio.get_running_loop()
except RuntimeError:
if not fallback_loop:
fallback_loop.append(asyncio.new_event_loop())
return fallback_loop[0]
def _mock_client_response_init(
self: Any, method: str, url: Any, request_info: Any = None
) -> None:
kwargs: dict[str, Any] = dict.fromkeys(keyword_only)
kwargs["request_info"] = request_info
if "loop" in kwargs:
kwargs["loop"] = _resolve_loop()
if "stream_writer" in kwargs:
kwargs["stream_writer"] = _NullStreamWriter()
ClientResponse.__init__(self, method, url, **kwargs)
aiohttp_stubs.MockClientResponse.__init__ = _mock_client_response_init
aiohttp_stubs.MockClientResponse._crewai_aiohttp_patched = True
_patch_vcrpy_aiohttp_compat()
from vcr.request import Request # type: ignore[import-untyped] # noqa: E402
try:
@@ -20,21 +113,42 @@ except ModuleNotFoundError:
env_test_path = Path(__file__).parent / ".env.test"
load_dotenv(env_test_path, override=True)
load_dotenv(override=True)
load_dotenv(env_test_path, override=False)
load_dotenv(override=False)
BEDROCK_HOST_PLACEHOLDER = "bedrock-runtime.vcr.amazonaws.com"
_BEDROCK_HOST_RE = re.compile(r"^bedrock-runtime\.[a-z0-9-]+\.amazonaws\.com$")
def _patched_make_vcr_request(httpx_request: Any, **kwargs: Any) -> Any:
def _normalize_bedrock_host(host: str) -> str:
if _BEDROCK_HOST_RE.match(host):
return BEDROCK_HOST_PLACEHOLDER
return host
def bedrock_host_matcher(r1: Request, r2: Request) -> bool: # type: ignore[no-any-unimported]
"""Match Bedrock requests across AWS regions (CI uses us-east-1, local may use us-west-2)."""
return _normalize_bedrock_host(r1.host or "") == _normalize_bedrock_host(
r2.host or ""
)
def _patched_make_vcr_request(
httpx_request: Any, real_request_body: Any = None, **kwargs: Any
) -> Any:
"""Patched version of VCR's _make_vcr_request that handles binary content.
The original implementation fails on binary request bodies (like file uploads)
because it assumes all content can be decoded as UTF-8.
"""
raw_body = httpx_request.read()
try:
body = raw_body.decode("utf-8")
except UnicodeDecodeError:
body = base64.b64encode(raw_body).decode("ascii")
raw_body = real_request_body if real_request_body is not None else httpx_request.read()
body: Any = raw_body
if isinstance(raw_body, bytes):
try:
body = raw_body.decode("utf-8")
except UnicodeDecodeError:
body = base64.b64encode(raw_body).decode("ascii")
uri = str(httpx_request.url)
headers = dict(httpx_request.headers)
return Request(httpx_request.method, uri, body, headers)
@@ -54,12 +168,13 @@ _original_from_serialized_response = getattr(
)
if _original_from_serialized_response is not None:
_from_serialized: Any = _original_from_serialized_response
def _patched_from_serialized_response(
request: Any, serialized_response: Any, history: Any = None
) -> Any:
"""Patched version that ensures response._content is properly set."""
response = _original_from_serialized_response(request, serialized_response, history)
response = _from_serialized(request, serialized_response, history)
# Explicitly set _content to avoid ResponseNotRead errors
# The content was passed to the constructor but the mocked read() prevents
# proper initialization of the internal state
@@ -187,6 +302,7 @@ HEADERS_TO_FILTER = {
"anthropic-ratelimit-tokens-remaining": "ANTHROPIC-RATELIMIT-TOKENS-REMAINING-XXX",
"anthropic-ratelimit-tokens-reset": "ANTHROPIC-RATELIMIT-TOKENS-RESET-XXX",
"x-amz-date": "X-AMZ-DATE-XXX",
"x-amz-security-token": "X-AMZ-SECURITY-TOKEN-XXX",
"amz-sdk-invocation-id": "AMZ-SDK-INVOCATION-ID-XXX",
"accept-encoding": "ACCEPT-ENCODING-XXX",
"x-amzn-requestid": "X-AMZN-REQUESTID-XXX",
@@ -211,6 +327,10 @@ def _filter_request_headers(request: Request) -> Request: # type: ignore[no-any
placeholder_host = "fake-azure-endpoint.openai.azure.com"
request.uri = request.uri.replace(original_host, placeholder_host)
# Normalize Bedrock regional endpoints so cassettes work in any AWS region.
if request.host and _BEDROCK_HOST_RE.match(request.host):
request.uri = request.uri.replace(request.host, BEDROCK_HOST_PLACEHOLDER)
return request
@@ -228,6 +348,11 @@ def _filter_response_headers(response: dict[str, Any]) -> dict[str, Any] | None:
if body == "" or body == b"" or content_length == ["0"]:
return None
status_code = response.get("status", {}).get("code")
if isinstance(status_code, int) and status_code >= 400:
# Avoid persisting auth/model errors when re-recording without valid AWS creds.
return None
for encoding_header in ["Content-Encoding", "content-encoding"]:
if encoding_header in headers:
encoding = headers.pop(encoding_header)
@@ -255,7 +380,8 @@ def vcr_cassette_dir(request: Any) -> str:
for parent in test_file.parents:
if (
parent.name in ("crewai", "crewai-tools", "crewai-files")
parent.name
in ("crewai", "crewai-tools", "crewai-files", "cli", "crewai-core")
and parent.parent.name == "lib"
):
package_root = parent
@@ -277,6 +403,11 @@ def vcr_cassette_dir(request: Any) -> str:
return str(cassette_dir)
def pytest_recording_configure(vcr: Any, config: Any) -> None:
"""Register custom VCR matchers for each test cassette session."""
vcr.register_matcher("bedrock_host", bedrock_host_matcher)
@pytest.fixture(scope="module")
def vcr_config(vcr_cassette_dir: str) -> dict[str, Any]:
"""Configure VCR with organized cassette storage."""

View File

@@ -1,6 +0,0 @@
---
title: "GET /{kickoff_id}/status"
description: "الحصول على حالة التنفيذ"
openapi: "/enterprise-api.en.yaml GET /{kickoff_id}/status"
mode: "wide"
---

File diff suppressed because it is too large Load Diff

View File

@@ -1,154 +0,0 @@
---
title: بنية الإنتاج
description: أفضل الممارسات لبناء تطبيقات ذكاء اصطناعي جاهزة للإنتاج مع CrewAI
icon: server
mode: "wide"
---
# عقلية التدفق أولاً
عند بناء تطبيقات ذكاء اصطناعي إنتاجية مع CrewAI، **نوصي بالبدء بتدفق (Flow)**.
بينما يمكن تشغيل أطقم أو وكلاء فرديين، فإن تغليفهم في تدفق يوفر الهيكل اللازم لتطبيق متين وقابل للتوسع.
## لماذا التدفقات؟
1. **إدارة الحالة**: توفر التدفقات طريقة مدمجة لإدارة الحالة عبر مراحل مختلفة من تطبيقك. هذا ضروري لتمرير البيانات بين الأطقم والحفاظ على السياق ومعالجة مدخلات المستخدم.
2. **التحكم**: تتيح لك التدفقات تحديد مسارات تنفيذ دقيقة، بما في ذلك الحلقات والشرطيات ومنطق التفريع. هذا أساسي لمعالجة الحالات الاستثنائية وضمان سلوك تطبيقك بشكل متوقع.
3. **المراقبة**: توفر التدفقات هيكلًا واضحًا يسهّل تتبع التنفيذ وتصحيح الأخطاء ومراقبة الأداء. نوصي باستخدام [تتبع CrewAI](/ar/observability/tracing) للحصول على رؤى تفصيلية. ما عليك سوى تشغيل `crewai login` لتفعيل ميزات المراقبة المجانية.
## البنية
يبدو تطبيق CrewAI الإنتاجي النموذجي هكذا:
```mermaid
graph TD
Start((Start)) --> Flow[Flow Orchestrator]
Flow --> State{State Management}
State --> Step1[Step 1: Data Gathering]
Step1 --> Crew1[Research Crew]
Crew1 --> State
State --> Step2{Condition Check}
Step2 -- "Valid" --> Step3[Step 3: Execution]
Step3 --> Crew2[Action Crew]
Step2 -- "Invalid" --> End((End))
Crew2 --> End
```
### 1. فئة التدفق
فئة `Flow` هي نقطة الدخول. تحدد مخطط الحالة والطرق التي تنفذ منطقك.
```python
from crewai.flow.flow import Flow, listen, start
from pydantic import BaseModel
class AppState(BaseModel):
user_input: str = ""
research_results: str = ""
final_report: str = ""
class ProductionFlow(Flow[AppState]):
@start()
def gather_input(self):
# ... منطق الحصول على المدخلات ...
pass
@listen(gather_input)
def run_research_crew(self):
# ... تشغيل طاقم ...
pass
```
### 2. إدارة الحالة
استخدم نماذج Pydantic لتعريف حالتك. يضمن هذا أمان الأنواع ويوضح البيانات المتاحة في كل مرحلة.
- **اجعلها بسيطة**: خزّن فقط ما تحتاجه للاستمرار بين المراحل.
- **استخدم بيانات منظمة**: تجنب القواميس غير المنظمة قدر الإمكان.
### 3. الأطقم كوحدات عمل
فوّض المهام المعقدة إلى الأطقم. يجب أن يكون الطاقم مركّزًا على هدف محدد (مثل "البحث في موضوع"، "كتابة مقال مدونة").
- **لا تبالغ في هندسة الأطقم**: اجعلها مركّزة.
- **مرر الحالة بشكل صريح**: مرر البيانات الضرورية من حالة التدفق إلى مدخلات الطاقم.
```python
@listen(gather_input)
def run_research_crew(self):
crew = ResearchCrew()
result = crew.kickoff(inputs={"topic": self.state.user_input})
self.state.research_results = result.raw
```
## عناصر التحكم الأولية
استفد من عناصر التحكم الأولية في CrewAI لإضافة المتانة والتحكم إلى أطقمك.
### 1. حواجز المهام
استخدم [حواجز المهام](/ar/concepts/tasks#task-guardrails) للتحقق من مخرجات المهام قبل قبولها. يضمن هذا أن وكلاءك ينتجون نتائج عالية الجودة.
```python
def validate_content(result: TaskOutput) -> Tuple[bool, Any]:
if len(result.raw) < 100:
return (False, "Content is too short. Please expand.")
return (True, result.raw)
task = Task(
...,
guardrail=validate_content
)
```
### 2. المخرجات المنظمة
استخدم دائمًا المخرجات المنظمة (`output_pydantic` أو `output_json`) عند تمرير البيانات بين المهام أو إلى تطبيقك. يمنع هذا أخطاء التحليل ويضمن أمان الأنواع.
```python
class ResearchResult(BaseModel):
summary: str
sources: List[str]
task = Task(
...,
output_pydantic=ResearchResult
)
```
### 3. خطافات LLM
استخدم [خطافات LLM](/ar/learn/llm-hooks) لفحص أو تعديل الرسائل قبل إرسالها إلى LLM، أو لتنقية الاستجابات.
```python
@before_llm_call
def log_request(context):
print(f"Agent {context.agent.role} is calling the LLM...")
```
## أنماط النشر
عند نشر تدفقك، ضع في اعتبارك ما يلي:
### CrewAI Enterprise
أسهل طريقة لنشر تدفقك هي استخدام CrewAI Enterprise. تتعامل مع البنية التحتية والمصادقة والمراقبة نيابة عنك.
راجع [دليل النشر](/ar/enterprise/guides/deploy-to-amp) للبدء.
```bash
crewai deploy create
```
### التنفيذ غير المتزامن
للمهام طويلة التشغيل، استخدم `kickoff_async` لتجنب حظر واجهتك البرمجية.
### الاستمرارية
استخدم مزيّن `@persist` لحفظ حالة تدفقك في قاعدة بيانات. يتيح لك هذا استئناف التنفيذ إذا تعطلت العملية أو إذا كنت بحاجة لانتظار مدخلات بشرية.
```python
@persist
class ProductionFlow(Flow[AppState]):
# ...
```
## الخلاصة
- **ابدأ بتدفق.**
- **حدد حالة واضحة.**
- **استخدم الأطقم للمهام المعقدة.**
- **انشر مع API واستمرارية.**

View File

@@ -1,155 +0,0 @@
---
title: 'مستودعات الوكلاء'
description: 'تعرّف على كيفية استخدام مستودعات الوكلاء لمشاركة وإعادة استخدام وكلائك عبر الفرق والمشاريع'
icon: 'people-group'
mode: "wide"
---
تتيح مستودعات الوكلاء لمستخدمي المؤسسات تخزين ومشاركة وإعادة استخدام تعريفات الوكلاء عبر الفرق والمشاريع. تُمكّن هذه الميزة المؤسسات من الاحتفاظ بمكتبة مركزية من الوكلاء الموحدين، مما يعزز الاتساق ويقلل من ازدواجية الجهود.
<Frame>
![Agent Repositories](/images/enterprise/agent-repositories.png)
</Frame>
## فوائد مستودعات الوكلاء
- **التوحيد**: الحفاظ على تعريفات وكلاء متسقة عبر مؤسستك
- **إعادة الاستخدام**: إنشاء وكيل مرة واحدة واستخدامه في أطقم ومشاريع متعددة
- **الحوكمة**: تطبيق سياسات على مستوى المؤسسة لتهيئات الوكلاء
- **التعاون**: تمكين الفرق من المشاركة والبناء على عمل بعضهم البعض
## إنشاء واستخدام مستودعات الوكلاء
1. يجب أن يكون لديك حساب في CrewAI، جرّب [الخطة المجانية](https://app.crewai.com).
2. أنشئ وكلاء بأدوار وأهداف محددة لسير عملك.
3. هيّئ الأدوات والقدرات لكل مساعد متخصص.
4. انشر الوكلاء عبر المشاريع من خلال الواجهة المرئية أو تكامل API.
<Frame>
![Agent Repositories](/images/enterprise/create-agent-repository.png)
</Frame>
### تحميل الوكلاء من المستودعات
يمكنك تحميل الوكلاء من المستودعات في الكود باستخدام معامل `from_repository` للتشغيل محليًا:
```python
from crewai import Agent
# إنشاء وكيل بتحميله من مستودع
# يتم تحميل الوكيل بجميع إعداداته المحددة مسبقًا
researcher = Agent(
from_repository="market-research-agent"
)
```
### تجاوز إعدادات المستودع
يمكنك تجاوز إعدادات محددة من المستودع بتوفيرها في التهيئة:
```python
researcher = Agent(
from_repository="market-research-agent",
goal="Research the latest trends in AI development", # تجاوز هدف المستودع
verbose=True # إضافة إعداد غير موجود في المستودع
)
```
### مثال: إنشاء طاقم مع وكلاء المستودع
```python
from crewai import Crew, Agent, Task
# تحميل الوكلاء من المستودعات
researcher = Agent(
from_repository="market-research-agent"
)
writer = Agent(
from_repository="content-writer-agent"
)
# إنشاء المهام
research_task = Task(
description="Research the latest trends in AI",
agent=researcher
)
writing_task = Task(
description="Write a comprehensive report based on the research",
agent=writer
)
# إنشاء الطاقم
crew = Crew(
agents=[researcher, writer],
tasks=[research_task, writing_task],
verbose=True
)
# تشغيل الطاقم
result = crew.kickoff()
```
### مثال: استخدام `kickoff()` مع وكلاء المستودع
يمكنك أيضًا استخدام وكلاء المستودع مباشرة مع طريقة `kickoff()` للتفاعلات الأبسط:
```python
from crewai import Agent
from pydantic import BaseModel
from typing import List
# تعريف تنسيق مخرجات منظم
class MarketAnalysis(BaseModel):
key_trends: List[str]
opportunities: List[str]
recommendation: str
# تحميل وكيل من المستودع
analyst = Agent(
from_repository="market-analyst-agent",
verbose=True
)
# الحصول على استجابة حرة
result = analyst.kickoff("Analyze the AI market in 2025")
print(result.raw) # الوصول إلى الاستجابة الخام
# الحصول على مخرجات منظمة
structured_result = analyst.kickoff(
"Provide a structured analysis of the AI market in 2025",
response_format=MarketAnalysis
)
# الوصول إلى البيانات المنظمة
print(f"Key Trends: {structured_result.pydantic.key_trends}")
print(f"Recommendation: {structured_result.pydantic.recommendation}")
```
## أفضل الممارسات
1. **اصطلاح التسمية**: استخدم أسماء واضحة ووصفية لوكلاء المستودع
2. **التوثيق**: أدرج أوصافًا شاملة لكل وكيل
3. **إدارة الأدوات**: تأكد من توفر الأدوات المشار إليها بواسطة وكلاء المستودع في بيئتك
4. **التحكم في الوصول**: أدر الصلاحيات لضمان أن أعضاء الفريق المصرّح لهم فقط يمكنهم تعديل وكلاء المستودع
## إدارة المؤسسة
للتبديل بين المؤسسات أو عرض مؤسستك الحالية، استخدم واجهة سطر أوامر CrewAI:
```bash
# عرض المؤسسة الحالية
crewai org current
# التبديل إلى مؤسسة مختلفة
crewai org switch <org_id>
# عرض جميع المؤسسات المتاحة
crewai org list
```
<Note>
عند تحميل الوكلاء من المستودعات، يجب أن تكون مصادقًا ومتحولًا إلى المؤسسة الصحيحة. إذا تلقيت أخطاء، تحقق من حالة المصادقة وإعدادات المؤسسة باستخدام أوامر CLI أعلاه.
</Note>

View File

@@ -1,104 +0,0 @@
---
title: الأتمتة
description: "إدارة ونشر ومراقبة أطقمك المباشرة (الأتمتة) في مكان واحد."
icon: "rocket"
mode: "wide"
---
## نظرة عامة
الأتمتة هي مركز العمليات المباشرة لأطقمك المنشورة. استخدمها للنشر من GitHub أو ملف ZIP، وإدارة متغيرات البيئة، وإعادة النشر عند الحاجة، ومراقبة حالة كل أتمتة.
<Frame>
![Automations Overview](/images/enterprise/automations-overview.png)
</Frame>
## طرق النشر
### النشر من GitHub
استخدم هذا للمشاريع ذات التحكم في الإصدارات والنشر المستمر.
<Steps>
<Step title="ربط GitHub">
انقر على <b>Configure GitHub</b> وصرّح بالوصول.
</Step>
<Step title="اختيار المستودع والفرع">
اختر <b>المستودع</b> و<b>الفرع</b> الذي تريد النشر منه.
</Step>
<Step title="تفعيل النشر التلقائي (اختياري)">
فعّل <b>النشر التلقائي للالتزامات الجديدة</b> لإرسال التحديثات مع كل دفع.
</Step>
<Step title="إضافة متغيرات البيئة">
أضف المتغيرات السرية فرديًا أو استخدم <b>العرض الجماعي</b> لمتغيرات متعددة.
</Step>
<Step title="النشر">
انقر على <b>Deploy</b> لإنشاء الأتمتة المباشرة.
</Step>
</Steps>
<Frame>
![GitHub Deployment](/images/enterprise/deploy-from-github.png)
</Frame>
### النشر من ZIP
انشر بسرعة بدون Git — ارفع حزمة مضغوطة من مشروعك.
<Steps>
<Step title="اختيار الملف">
اختر أرشيف ZIP من جهازك.
</Step>
<Step title="إضافة متغيرات البيئة">
وفّر أي متغيرات أو مفاتيح مطلوبة.
</Step>
<Step title="النشر">
انقر على <b>Deploy</b> لإنشاء الأتمتة المباشرة.
</Step>
</Steps>
<Frame>
![ZIP Deployment](/images/enterprise/deploy-from-zip.png)
</Frame>
## لوحة تحكم الأتمتة
يعرض الجدول جميع الأتمتة المباشرة مع التفاصيل الرئيسية:
- **CREW**: اسم الأتمتة
- **STATUS**: متصل / فشل / قيد التنفيذ
- **URL**: نقطة نهاية التشغيل/الحالة
- **TOKEN**: رمز الأتمتة
- **ACTIONS**: إعادة النشر، الحذف، والمزيد
استخدم عناصر التحكم في أعلى اليمين للتصفية والبحث:
- البحث بالاسم
- التصفية حسب <b>الحالة</b>
- التصفية حسب <b>المصدر</b> (GitHub / Studio / ZIP)
بعد النشر، يمكنك عرض تفاصيل الأتمتة واستخدام القائمة المنسدلة **الخيارات** لـ `الدردشة مع هذا الطاقم`، `تصدير مكون React` و`التصدير كـ MCP`.
<Frame>
![Automations Table](/images/enterprise/automations-table.png)
</Frame>
## أفضل الممارسات
- فضّل نشر GitHub للتحكم في الإصدارات وCI/CD
- استخدم إعادة النشر للتقدم بعد تحديثات الكود أو التهيئة أو اضبطه على النشر التلقائي مع كل دفع
## ذات صلة
<CardGroup cols={3}>
<Card title="نشر طاقم" href="/ar/enterprise/guides/deploy-to-amp" icon="rocket">
انشر طاقمًا من GitHub أو ملف ZIP.
</Card>
<Card title="مشغلات الأتمتة" href="/ar/enterprise/guides/automation-triggers" icon="trigger">
شغّل الأتمتة عبر webhooks أو API.
</Card>
<Card title="أتمتة Webhook" href="/ar/enterprise/guides/webhook-automation" icon="webhook">
بث الأحداث والتحديثات في الوقت الفعلي إلى أنظمتك.
</Card>
</CardGroup>

View File

@@ -1,88 +0,0 @@
---
title: استوديو الطاقم
description: "إنشاء أتمتة جديدة بمساعدة الذكاء الاصطناعي ومحرر مرئي واختبار متكامل."
icon: "pencil"
mode: "wide"
---
## نظرة عامة
استوديو الطاقم هو مساحة عمل تفاعلية بمساعدة الذكاء الاصطناعي لإنشاء أتمتة جديدة من الصفر باستخدام اللغة الطبيعية ومحرر سير عمل مرئي.
<Frame>
![Crew Studio Overview](/images/enterprise/crew-studio-overview.png)
</Frame>
## الإنشاء المبني على الأوامر النصية
- صِف الأتمتة التي تريدها؛ يقوم الذكاء الاصطناعي بإنشاء الوكلاء والمهام والأدوات.
- استخدم الإدخال الصوتي عبر أيقونة الميكروفون إذا فضّلت ذلك.
- ابدأ من أوامر مدمجة لحالات الاستخدام الشائعة.
<Frame>
![Prompt Builder](/images/enterprise/crew-studio-prompt.png)
</Frame>
## المحرر المرئي
يعكس اللوح سير العمل كعُقد وأسهم مع ثلاث لوحات داعمة تتيح لك تهيئة سير العمل بسهولة بدون كتابة كود؛ ما يُعرف بـ "**البرمجة الحدسية لوكلاء الذكاء الاصطناعي**".
يمكنك استخدام وظيفة السحب والإفلات لإضافة الوكلاء والمهام والأدوات إلى اللوح أو استخدام قسم الدردشة لبناء الوكلاء. يتشارك كلا النهجين الحالة ويمكن استخدامهما بالتبادل.
- **أفكار AI (يسار)**: الاستدلال المتدفق أثناء تصميم سير العمل
- **اللوح (المركز)**: الوكلاء والمهام كعقد متصلة
- **الموارد (يمين)**: مكونات السحب والإفلات (وكلاء، مهام، أدوات)
<Frame>
![Visual Canvas](/images/enterprise/crew-studio-canvas.png)
</Frame>
## التنفيذ والتصحيح
انتقل إلى عرض <b>التنفيذ</b> لتشغيل سير العمل ومراقبته:
- الجدول الزمني للأحداث
- سجلات مفصلة (التفاصيل، الرسائل، البيانات الخام)
- اختبارات محلية قبل النشر
<Frame>
![Execution View](/images/enterprise/crew-studio-execution.png)
</Frame>
## النشر والتصدير
- <b>انشر</b> لنشر أتمتة مباشرة
- <b>حمّل</b> المصدر كملف ZIP للتطوير المحلي أو التخصيص
<Frame>
![Publish & Download](/images/enterprise/crew-studio-publish.png)
</Frame>
بعد النشر، يمكنك عرض تفاصيل الأتمتة واستخدام القائمة المنسدلة **الخيارات** لـ `الدردشة مع هذا الطاقم`، `تصدير مكون React` و`التصدير كـ MCP`.
<Frame>
![Published Automation](/images/enterprise/crew-studio-published.png)
</Frame>
## أفضل الممارسات
- كرر بسرعة في الاستوديو؛ انشر فقط عندما يكون مستقرًا
- اقصر الأدوات على الحد الأدنى من الصلاحيات المطلوبة
- استخدم التتبعات للتحقق من السلوك والأداء
## ذات صلة
<CardGroup cols={4}>
<Card title="تفعيل استوديو الطاقم" href="/ar/enterprise/guides/enable-crew-studio" icon="palette">
تفعيل استوديو الطاقم.
</Card>
<Card title="بناء طاقم" href="/ar/enterprise/guides/build-crew" icon="paintbrush">
بناء طاقم.
</Card>
<Card title="نشر طاقم" href="/ar/enterprise/guides/deploy-to-amp" icon="rocket">
نشر طاقم من GitHub أو ملف ZIP.
</Card>
<Card title="تصدير مكون React" href="/ar/enterprise/guides/react-component-export" icon="download">
تصدير مكون React.
</Card>
</CardGroup>

View File

@@ -1,558 +0,0 @@
---
title: "إدارة HITL للتدفقات"
description: "مراجعة بشرية بمستوى المؤسسات للتدفقات مع إشعارات البريد الإلكتروني أولاً وقواعد التوجيه وإمكانيات الاستجابة التلقائية"
icon: "users-gear"
mode: "wide"
---
<Note>
تتطلب ميزات إدارة Flow HITL مزيّن `@human_feedback`، المتاح في **CrewAI الإصدار 1.8.0 أو أحدث**. تنطبق هذه الميزات تحديدًا على **التدفقات (Flows)**، وليس الأطقم (Crews).
</Note>
يوفر CrewAI Enterprise نظامًا شاملًا لإدارة الإنسان في الحلقة (HITL) للتدفقات يحوّل سير عمل الذكاء الاصطناعي إلى عمليات تعاونية بين الإنسان والذكاء الاصطناعي. تستخدم المنصة **بنية البريد الإلكتروني أولاً** التي تمكّن أي شخص لديه عنوان بريد إلكتروني من الرد على طلبات المراجعة — بدون الحاجة لحساب على المنصة.
## نظرة عامة
<CardGroup cols={3}>
<Card title="تصميم البريد الإلكتروني أولاً" icon="envelope">
يمكن للمستجيبين الرد مباشرة على رسائل الإشعار لتقديم الملاحظات
</Card>
<Card title="توجيه مرن" icon="route">
توجيه الطلبات إلى بريد إلكتروني محدد بناءً على أنماط الطرق أو حالة التدفق
</Card>
<Card title="استجابة تلقائية" icon="clock">
تهيئة استجابات احتياطية تلقائية عندما لا يرد أي شخص في الوقت المحدد
</Card>
</CardGroup>
### الفوائد الرئيسية
- **نموذج ذهني بسيط**: عناوين البريد الإلكتروني عالمية؛ لا حاجة لإدارة مستخدمين أو أدوار المنصة
- **مستجيبون خارجيون**: يمكن لأي شخص لديه بريد إلكتروني الرد، حتى غير مستخدمي المنصة
- **تعيين ديناميكي**: سحب بريد المعيّن مباشرة من حالة التدفق (مثل `sales_rep_email`)
- **تهيئة مخفضة**: إعدادات أقل للتهيئة، وقت أسرع للقيمة
- **البريد الإلكتروني كقناة رئيسية**: يفضل معظم المستخدمين الرد عبر البريد الإلكتروني بدلاً من تسجيل الدخول إلى لوحة التحكم
## إعداد نقاط المراجعة البشرية في التدفقات
هيّئ نقاط تفتيش المراجعة البشرية داخل تدفقاتك باستخدام مزيّن `@human_feedback`. عندما يصل التنفيذ إلى نقطة مراجعة، يتوقف النظام ويُخطر المعيّن عبر البريد الإلكتروني وينتظر الاستجابة.
```python
from crewai.flow.flow import Flow, start, listen, or_
from crewai.flow.human_feedback import human_feedback, HumanFeedbackResult
class ContentApprovalFlow(Flow):
@start()
def generate_content(self):
return "Generated marketing copy for Q1 campaign..."
@human_feedback(
message="Please review this content for brand compliance:",
emit=["approved", "rejected", "needs_revision"],
)
@listen(or_("generate_content", "needs_revision"))
def review_content(self):
return "Marketing copy for review..."
@listen("approved")
def publish_content(self, result: HumanFeedbackResult):
print(f"Publishing approved content. Reviewer notes: {result.feedback}")
@listen("rejected")
def archive_content(self, result: HumanFeedbackResult):
print(f"Content rejected. Reason: {result.feedback}")
```
للحصول على تفاصيل التنفيذ الكاملة، راجع دليل [التغذية الراجعة البشرية في التدفقات](/ar/learn/human-feedback-in-flows).
### معاملات المزيّن
| المعامل | النوع | الوصف |
|-----------|------|-------------|
| `message` | `str` | الرسالة المعروضة للمراجع البشري |
| `emit` | `list[str]` | خيارات الاستجابة الصالحة (تُعرض كأزرار في الواجهة) |
## تهيئة المنصة
الوصول إلى تهيئة HITL من: **النشر** ← **الإعدادات** ← **تهيئة الإنسان في الحلقة**
<Frame>
<img src="/images/enterprise/hitl-settings-overview.png" alt="HITL Configuration Settings" />
</Frame>
### إشعارات البريد الإلكتروني
تبديل لتفعيل أو تعطيل إشعارات البريد الإلكتروني لطلبات HITL.
| الإعداد | الافتراضي | الوصف |
|---------|---------|-------------|
| إشعارات البريد الإلكتروني | مفعّل | إرسال رسائل عند طلب الملاحظات |
<Note>
عند التعطيل، يجب على المستجيبين استخدام واجهة لوحة التحكم أو يجب تهيئة webhooks لأنظمة إشعارات مخصصة.
</Note>
### هدف SLA
تعيين وقت استجابة مستهدف لأغراض التتبع والمقاييس.
| الإعداد | الوصف |
|---------|-------------|
| هدف SLA (دقائق) | وقت الاستجابة المستهدف. يُستخدم لمقاييس لوحة التحكم وتتبع SLA |
اتركه فارغًا لتعطيل تتبع SLA.
## إشعارات واستجابات البريد الإلكتروني
يستخدم نظام HITL بنية البريد الإلكتروني أولاً حيث يمكن للمستجيبين الرد مباشرة على رسائل الإشعار.
### كيف تعمل استجابات البريد الإلكتروني
<Steps>
<Step title="إرسال الإشعار">
عند إنشاء طلب HITL، يُرسل بريد إلكتروني إلى المستجيب المعيّن مع محتوى المراجعة والسياق.
</Step>
<Step title="عنوان الرد">
يتضمن البريد عنوان رد خاص مع رمز موقّع للمصادقة.
</Step>
<Step title="رد المستخدم">
يرد المستجيب ببساطة على البريد بملاحظاته — بدون حاجة لتسجيل الدخول.
</Step>
<Step title="التحقق من الرمز">
تستقبل المنصة الرد، وتتحقق من الرمز الموقّع، وتطابق بريد المرسل.
</Step>
<Step title="استئناف التدفق">
تُسجل الملاحظات ويستمر التدفق مع مدخلات الإنسان.
</Step>
</Steps>
### تنسيق الاستجابة
يمكن للمستجيبين الرد بـ:
- **خيار emit**: إذا تطابق الرد مع خيار `emit` (مثل "approved")، يُستخدم مباشرة
- **نص حر**: أي نص استجابة يُمرر إلى التدفق كملاحظات
- **نص عادي**: يُستخدم السطر الأول من نص الرد كملاحظات
### رسائل التأكيد
بعد معالجة الرد، يستلم المستجيب رسالة تأكيد تشير إلى ما إذا تم إرسال الملاحظات بنجاح أو حدث خطأ.
### أمان رمز البريد
- الرموز موقّعة تشفيريًا للأمان
- تنتهي صلاحية الرموز بعد 7 أيام
- يجب أن يتطابق بريد المرسل مع البريد المصرّح به في الرمز
- تُرسل رسائل تأكيد/خطأ بعد المعالجة
## قواعد التوجيه
توجيه طلبات HITL إلى عناوين بريد إلكتروني محددة بناءً على أنماط الطرق.
<Frame>
<img src="/images/enterprise/hitl-settings-routing-rules.png" alt="HITL Routing Rules Configuration" />
</Frame>
### هيكل القاعدة
```json
{
"name": "Approvals to Finance",
"match": {
"method_name": "approve_*"
},
"assign_to_email": "finance@company.com",
"assign_from_input": "manager_email"
}
```
### أنماط المطابقة
| النمط | الوصف | مثال المطابقة |
|---------|-------------|---------------|
| `approve_*` | حرف بدل (أي أحرف) | `approve_payment`، `approve_vendor` |
| `review_?` | حرف واحد | `review_a`، `review_1` |
| `validate_payment` | مطابقة تامة | `validate_payment` فقط |
### أولوية التعيين
1. **تعيين ديناميكي** (`assign_from_input`): إذا تم تهيئته، يسحب البريد من حالة التدفق
2. **بريد ثابت** (`assign_to_email`): يرجع إلى البريد المهيأ
3. **منشئ النشر**: إذا لم تتطابق أي قاعدة، يُستخدم بريد منشئ النشر
### مثال التعيين الديناميكي
إذا كانت حالة تدفقك تحتوي على `{"sales_rep_email": "alice@company.com"}`، هيّئ:
```json
{
"name": "Route to Sales Rep",
"match": {
"method_name": "review_*"
},
"assign_from_input": "sales_rep_email"
}
```
سيتم تعيين الطلب إلى `alice@company.com` تلقائيًا.
<Tip>
**حالة استخدام**: اسحب المعيّن من CRM أو قاعدة البيانات أو خطوة تدفق سابقة لتوجيه المراجعات ديناميكيًا إلى الشخص المناسب.
</Tip>
## الاستجابة التلقائية
الاستجابة تلقائيًا لطلبات HITL إذا لم يستجب أي شخص خلال المهلة المحددة. يضمن هذا عدم تعليق التدفقات إلى أجل غير مسمى.
### التهيئة
| الإعداد | الوصف |
|---------|-------------|
| مفعّل | تبديل لتفعيل الاستجابة التلقائية |
| المهلة (دقائق) | الوقت المنتظر قبل الاستجابة التلقائية |
| النتيجة الافتراضية | قيمة الاستجابة (يجب أن تطابق خيار `emit`) |
<Frame>
<img src="/images/enterprise/hitl-settings-auto-respond.png" alt="HITL Auto-Response Configuration" />
</Frame>
### حالات الاستخدام
- **الامتثال لـ SLA**: ضمان عدم تعليق التدفقات إلى أجل غير مسمى
- **الموافقة الافتراضية**: الموافقة التلقائية على الطلبات منخفضة المخاطر بعد انتهاء المهلة
- **التراجع السلس**: المتابعة بافتراضي آمن عندما يكون المراجعون غير متاحين
<Warning>
استخدم الاستجابة التلقائية بحذر. فعّلها فقط للمراجعات غير الحرجة حيث تكون الاستجابة الافتراضية مقبولة.
</Warning>
## عملية المراجعة
### واجهة لوحة التحكم
توفر واجهة مراجعة HITL تجربة نظيفة ومركّزة للمراجعين:
- **عرض Markdown**: تنسيق غني لمحتوى المراجعة مع تمييز الصيغة
- **لوحة السياق**: عرض حالة التدفق وتاريخ التنفيذ والمعلومات ذات الصلة
- **إدخال الملاحظات**: تقديم ملاحظات وتعليقات مفصلة مع قرارك
- **إجراءات سريعة**: أزرار خيارات emit بنقرة واحدة مع تعليقات اختيارية
<Frame>
<img src="/images/enterprise/hitl-list-pending-feedbacks.png" alt="HITL Pending Requests List" />
</Frame>
### طرق الاستجابة
يمكن للمراجعين الاستجابة عبر ثلاث قنوات:
| الطريقة | الوصف |
|--------|-------------|
| **الرد عبر البريد** | الرد مباشرة على رسالة الإشعار |
| **لوحة التحكم** | استخدام واجهة لوحة تحكم المؤسسة |
| **API/Webhook** | استجابة برمجية عبر API |
### السجل ومسار التدقيق
يتم تتبع كل تفاعل HITL بجدول زمني كامل:
- سجل القرارات (موافقة/رفض/مراجعة)
- هوية المراجع والطابع الزمني
- الملاحظات والتعليقات المقدمة
- طريقة الاستجابة (بريد/لوحة تحكم/API)
- مقاييس وقت الاستجابة
## التحليلات والمراقبة
تتبع أداء HITL مع تحليلات شاملة.
### لوحة تحكم الأداء
<Frame>
<img src="/images/enterprise/hitl-metrics.png" alt="HITL Metrics Dashboard" />
</Frame>
<CardGroup cols={2}>
<Card title="أوقات الاستجابة" icon="stopwatch">
مراقبة متوسط وميديان أوقات الاستجابة حسب المراجع أو التدفق.
</Card>
<Card title="اتجاهات الحجم" icon="chart-bar">
تحليل أنماط حجم المراجعة لتحسين قدرة الفريق.
</Card>
<Card title="توزيع القرارات" icon="chart-pie">
عرض معدلات الموافقة/الرفض عبر أنواع المراجعة المختلفة.
</Card>
<Card title="تتبع SLA" icon="chart-line">
تتبع نسبة المراجعات المكتملة ضمن أهداف SLA.
</Card>
</CardGroup>
### التدقيق والامتثال
إمكانيات تدقيق جاهزة للمؤسسات للمتطلبات التنظيمية:
- سجل قرارات كامل مع الطوابع الزمنية
- التحقق من هوية المراجع
- سجلات تدقيق غير قابلة للتغيير
- إمكانيات التصدير لتقارير الامتثال
## حالات الاستخدام الشائعة
<AccordionGroup>
<Accordion title="المراجعات الأمنية" icon="shield-halved">
**حالة الاستخدام**: أتمتة استبيانات الأمان الداخلية مع التحقق البشري
- يولّد الذكاء الاصطناعي الردود على الاستبيانات الأمنية
- يراجع فريق الأمن ويتحقق من الدقة عبر البريد الإلكتروني
- يتم تجميع الردود المعتمدة في التقديم النهائي
- مسار تدقيق كامل للامتثال
</Accordion>
<Accordion title="الموافقة على المحتوى" icon="file-lines">
**حالة الاستخدام**: محتوى تسويقي يتطلب مراجعة قانونية/العلامة التجارية
- يولّد الذكاء الاصطناعي نصوص تسويقية أو محتوى وسائل التواصل
- التوجيه إلى بريد فريق العلامة التجارية لمراجعة النبرة/الأسلوب
- النشر التلقائي عند الموافقة
</Accordion>
<Accordion title="الموافقات المالية" icon="money-bill">
**حالة الاستخدام**: تقارير النفقات، شروط العقود، تخصيصات الميزانية
- يعالج الذكاء الاصطناعي مسبقًا ويصنف الطلبات المالية
- التوجيه بناءً على عتبات المبالغ باستخدام التعيين الديناميكي
- الحفاظ على مسار تدقيق كامل للامتثال المالي
</Accordion>
<Accordion title="التعيين الديناميكي من CRM" icon="database">
**حالة الاستخدام**: توجيه المراجعات إلى مالكي الحسابات من CRM
- يجلب التدفق بريد مالك الحساب من CRM
- تخزين البريد في حالة التدفق (مثل `account_owner_email`)
- استخدام `assign_from_input` للتوجيه إلى الشخص المناسب تلقائيًا
</Accordion>
<Accordion title="ضمان الجودة" icon="magnifying-glass">
**حالة الاستخدام**: التحقق من مخرجات الذكاء الاصطناعي قبل التسليم للعميل
- يولّد الذكاء الاصطناعي محتوى أو ردود موجهة للعميل
- يراجع فريق ضمان الجودة عبر إشعار البريد الإلكتروني
- حلقات الملاحظات تحسّن أداء الذكاء الاصطناعي بمرور الوقت
</Accordion>
</AccordionGroup>
## واجهة Webhooks API
عندما تتوقف تدفقاتك للملاحظات البشرية، يمكنك تهيئة webhooks لإرسال بيانات الطلب إلى تطبيقك. يتيح هذا:
- بناء واجهات موافقة مخصصة
- التكامل مع الأدوات الداخلية (Jira، ServiceNow، لوحات تحكم مخصصة)
- توجيه الموافقات إلى أنظمة طرف ثالث
- إشعارات تطبيقات الجوال
- أنظمة القرار المؤتمتة
<Frame>
<img src="/images/enterprise/hitl-settings-webhook.png" alt="HITL Webhook Configuration" />
</Frame>
### تهيئة Webhooks
<Steps>
<Step title="الانتقال إلى الإعدادات">
اذهب إلى **النشر** ← **الإعدادات** ← **الإنسان في الحلقة**
</Step>
<Step title="توسيع قسم Webhooks">
انقر لتوسيع تهيئة **Webhooks**
</Step>
<Step title="إضافة عنوان Webhook">
أدخل عنوان webhook الخاص بك (يجب أن يكون HTTPS في الإنتاج)
</Step>
<Step title="حفظ التهيئة">
انقر على **حفظ التهيئة** للتفعيل
</Step>
</Steps>
يمكنك تهيئة webhooks متعددة. يستقبل كل webhook نشط جميع أحداث HITL.
### أحداث Webhook
ستستقبل نقطة النهاية طلبات HTTP POST لهذه الأحداث:
| نوع الحدث | متى يُطلق |
|------------|----------------|
| `new_request` | يتوقف تدفق ويطلب ملاحظات بشرية |
### حمولة Webhook
تستقبل جميع webhooks حمولة JSON بهذا الهيكل:
```json
{
"event": "new_request",
"request": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"flow_id": "flow_abc123",
"method_name": "review_article",
"message": "Please review this article for publication.",
"emit_options": ["approved", "rejected", "request_changes"],
"state": {
"article_id": 12345,
"author": "john@example.com",
"category": "technology"
},
"metadata": {},
"created_at": "2026-01-14T12:00:00Z"
},
"deployment": {
"id": 456,
"name": "Content Review Flow",
"organization_id": 789
},
"callback_url": "https://api.crewai.com/...",
"assigned_to_email": "reviewer@company.com"
}
```
### الرد على الطلبات
لإرسال الملاحظات، **أرسل POST إلى `callback_url`** المضمّن في حمولة webhook.
```http
POST {callback_url}
Content-Type: application/json
{
"feedback": "Approved. Great article!",
"source": "my_custom_app"
}
```
### الأمان
<Info>
جميع طلبات webhook موقّعة تشفيريًا باستخدام HMAC-SHA256 لضمان الأصالة ومنع التلاعب.
</Info>
#### أمان Webhook
- **توقيعات HMAC-SHA256**: يتضمن كل webhook توقيعًا تشفيريًا
- **أسرار لكل webhook**: لكل webhook سر توقيع فريد
- **مشفرة أثناء التخزين**: أسرار التوقيع مشفرة في قاعدة البيانات
- **التحقق من الطابع الزمني**: يمنع هجمات الإعادة
#### ترويسات التوقيع
يتضمن كل طلب webhook هذه الترويسات:
| الترويسة | الوصف |
|--------|-------------|
| `X-Signature` | توقيع HMAC-SHA256: `sha256=<hex_digest>` |
| `X-Timestamp` | الطابع الزمني Unix عند توقيع الطلب |
#### التحقق
تحقق بحساب:
```python
import hmac
import hashlib
expected = hmac.new(
signing_secret.encode(),
f"{timestamp}.{payload}".encode(),
hashlib.sha256
).hexdigest()
if hmac.compare_digest(expected, signature):
# توقيع صالح
```
### معالجة الأخطاء
يجب أن تعيد نقطة نهاية webhook كود حالة 2xx لتأكيد الاستلام:
| استجابتك | سلوكنا |
|---------------|--------------|
| 2xx | تم تسليم Webhook بنجاح |
| 4xx/5xx | مسجل كفشل، بدون إعادة محاولة |
| مهلة (30 ثانية) | مسجل كفشل، بدون إعادة محاولة |
## الأمان والتحكم في الوصول المبني على الأدوار
### الوصول إلى لوحة التحكم
يُتحكم في وصول HITL على مستوى النشر:
| الصلاحية | القدرة |
|------------|------------|
| `manage_human_feedback` | تهيئة إعدادات HITL، عرض جميع الطلبات |
| `respond_to_human_feedback` | الرد على الطلبات، عرض الطلبات المعيّنة |
### تصريح استجابة البريد الإلكتروني
للردود عبر البريد:
1. يشفّر رمز الرد البريد المصرّح به
2. يجب أن يتطابق بريد المرسل مع بريد الرمز
3. يجب ألا يكون الرمز منتهي الصلاحية (7 أيام افتراضيًا)
4. يجب أن يكون الطلب لا يزال معلقًا
### مسار التدقيق
يتم تسجيل جميع إجراءات HITL:
- إنشاء الطلب
- تغييرات التعيين
- إرسال الاستجابة (مع المصدر: لوحة تحكم/بريد/API)
- حالة استئناف التدفق
## استكشاف الأخطاء وإصلاحها
### عدم إرسال الرسائل
1. تحقق من تفعيل "إشعارات البريد الإلكتروني" في التهيئة
2. تحقق من مطابقة قواعد التوجيه لاسم الطريقة
3. تحقق من صلاحية بريد المعيّن
4. تحقق من احتياطي منشئ النشر إذا لم تتطابق أي قواعد توجيه
### عدم معالجة ردود البريد
1. تحقق من عدم انتهاء صلاحية الرمز (7 أيام افتراضيًا)
2. تحقق من مطابقة بريد المرسل للبريد المعيّن
3. تأكد من أن الطلب لا يزال معلقًا (لم يتم الرد عليه بعد)
### عدم استئناف التدفق
1. تحقق من حالة الطلب في لوحة التحكم
2. تحقق من إمكانية الوصول إلى callback URL
3. تأكد من أن النشر لا يزال قيد التشغيل
## أفضل الممارسات
<Tip>
**ابدأ ببساطة**: ابدأ بإشعارات البريد الإلكتروني لمنشئ النشر، ثم أضف قواعد التوجيه مع نضوج سير عملك.
</Tip>
1. **استخدم التعيين الديناميكي**: اسحب عناوين بريد المعيّنين من حالة التدفق للتوجيه المرن.
2. **هيّئ الاستجابة التلقائية**: أعد استجابة احتياطية للمراجعات غير الحرجة لمنع تعليق التدفقات.
3. **راقب أوقات الاستجابة**: استخدم التحليلات لتحديد الاختناقات وتحسين عملية المراجعة.
4. **اجعل رسائل المراجعة واضحة**: اكتب رسائل واضحة وقابلة للتنفيذ في مزيّن `@human_feedback`.
5. **اختبر تدفق البريد**: أرسل طلبات اختبار للتحقق من تسليم البريد قبل الانتقال للإنتاج.
## الموارد ذات الصلة
<CardGroup cols={2}>
<Card title="التغذية الراجعة البشرية في التدفقات" icon="code" href="/ar/learn/human-feedback-in-flows">
دليل التنفيذ لمزيّن `@human_feedback`
</Card>
<Card title="دليل سير عمل Flow HITL" icon="route" href="/ar/enterprise/guides/human-in-the-loop">
دليل خطوة بخطوة لإعداد سير عمل HITL
</Card>
<Card title="تهيئة RBAC" icon="shield-check" href="/ar/enterprise/features/rbac">
تهيئة التحكم في الوصول المبني على الأدوار لمؤسستك
</Card>
<Card title="بث Webhook" icon="bolt" href="/ar/enterprise/features/webhook-streaming">
إعداد إشعارات الأحداث في الوقت الفعلي
</Card>
</CardGroup>

View File

@@ -1,251 +0,0 @@
---
title: حاجز الهلوسة
description: "منع واكتشاف هلوسات الذكاء الاصطناعي في مهام CrewAI"
icon: "shield-check"
mode: "wide"
---
## نظرة عامة
حاجز الهلوسة هو ميزة مؤسسية تتحقق من المحتوى المولّد بالذكاء الاصطناعي لضمان أنه مبني على الحقائق ولا يحتوي على هلوسات. يحلل مخرجات المهام مقابل سياق مرجعي ويوفر ملاحظات مفصلة عند اكتشاف محتوى محتمل الهلوسة.
## ما هي الهلوسات؟
تحدث هلوسات الذكاء الاصطناعي عندما تولّد نماذج اللغة محتوى يبدو معقولاً لكنه غير صحيح من الناحية الواقعية أو غير مدعوم بالسياق المقدم. يساعد حاجز الهلوسة في منع هذه المشكلات من خلال:
- مقارنة المخرجات مع السياق المرجعي
- تقييم الأمانة للمادة المصدرية
- توفير ملاحظات مفصلة حول المحتوى المشكل
- دعم عتبات مخصصة لصرامة التحقق
## الاستخدام الأساسي
### إعداد الحاجز
```python
from crewai.tasks.hallucination_guardrail import HallucinationGuardrail
from crewai import LLM
# الاستخدام الأساسي - سيستخدم expected_output للمهمة كسياق
guardrail = HallucinationGuardrail(
llm=LLM(model="gpt-4o-mini")
)
# مع سياق مرجعي صريح
context_guardrail = HallucinationGuardrail(
context="AI helps with various tasks including analysis and generation.",
llm=LLM(model="gpt-4o-mini")
)
```
### الإضافة إلى المهام
```python
from crewai import Task
# إنشاء مهمتك مع الحاجز
task = Task(
description="Write a summary about AI capabilities",
expected_output="A factual summary based on the provided context",
agent=my_agent,
guardrail=guardrail # إضافة الحاجز للتحقق من المخرجات
)
```
## التهيئة المتقدمة
### التحقق بعتبة مخصصة
للتحقق الأكثر صرامة، يمكنك تعيين عتبة أمانة مخصصة (مقياس 0-10):
```python
# حاجز صارم يتطلب درجة أمانة عالية
strict_guardrail = HallucinationGuardrail(
context="Quantum computing uses qubits that exist in superposition states.",
llm=LLM(model="gpt-4o-mini"),
threshold=8.0 # يتطلب درجة >= 8 لاجتياز التحقق
)
```
### تضمين سياق استجابة الأدوات
عندما تستخدم مهمتك أدوات، يمكنك تضمين استجابات الأدوات لتحقق أكثر دقة:
```python
# حاجز مع سياق استجابة الأدوات
weather_guardrail = HallucinationGuardrail(
context="Current weather information for the requested location",
llm=LLM(model="gpt-4o-mini"),
tool_response="Weather API returned: Temperature 22°C, Humidity 65%, Clear skies"
)
```
## كيف يعمل
### عملية التحقق
1. **تحليل السياق**: يقارن الحاجز مخرجات المهمة مع السياق المرجعي المقدم
2. **تسجيل الأمانة**: يستخدم مقيّمًا داخليًا لتعيين درجة أمانة (0-10)
3. **تحديد الحكم**: يحدد ما إذا كان المحتوى أمينًا أو يحتوي على هلوسات
4. **التحقق من العتبة**: إذا تم تعيين عتبة مخصصة، يتحقق مقابل تلك الدرجة
5. **توليد الملاحظات**: يوفر أسبابًا مفصلة عند فشل التحقق
### منطق التحقق
- **الوضع الافتراضي**: يستخدم التحقق المبني على الحكم (FAITHFUL مقابل HALLUCINATED)
- **وضع العتبة**: يتطلب أن تلبي درجة الأمانة العتبة المحددة أو تتجاوزها
- **معالجة الأخطاء**: يتعامل بسلاسة مع أخطاء التقييم ويوفر ملاحظات إعلامية
## نتائج الحاجز
يعيد الحاجز نتائج منظمة تشير إلى حالة التحقق:
```python
# مثال على هيكل نتيجة الحاجز
{
"valid": False,
"feedback": "Content appears to be hallucinated (score: 4.2/10, verdict: HALLUCINATED). The output contains information not supported by the provided context."
}
```
### خصائص النتيجة
- **valid**: قيمة منطقية تشير إلى ما إذا اجتازت المخرجات التحقق
- **feedback**: شرح مفصل عند فشل التحقق، يتضمن:
- درجة الأمانة
- تصنيف الحكم
- أسباب محددة للفشل
## التكامل مع نظام المهام
### التحقق التلقائي
عند إضافة حاجز إلى مهمة، يتحقق تلقائيًا من المخرجات قبل اعتبار المهمة مكتملة:
```python
# تدفق التحقق من مخرجات المهمة
task_output = agent.execute_task(task)
validation_result = guardrail(task_output)
if validation_result.valid:
# المهمة تكتمل بنجاح
return task_output
else:
# المهمة تفشل مع ملاحظات التحقق
raise ValidationError(validation_result.feedback)
```
### تتبع الأحداث
يتكامل الحاجز مع نظام أحداث CrewAI لتوفير المراقبة:
- **بدء التحقق**: عند بدء تقييم الحاجز
- **اكتمال التحقق**: عند انتهاء التقييم بالنتائج
- **فشل التحقق**: عند حدوث أخطاء تقنية أثناء التقييم
## أفضل الممارسات
### إرشادات السياق
<Steps>
<Step title="توفير سياق شامل">
أدرج جميع المعلومات الواقعية ذات الصلة التي يجب أن يبني عليها الذكاء الاصطناعي مخرجاته:
```python
context = """
Company XYZ was founded in 2020 and specializes in renewable energy solutions.
They have 150 employees and generated $50M revenue in 2023.
Their main products include solar panels and wind turbines.
"""
```
</Step>
<Step title="الحفاظ على صلة السياق">
أدرج فقط المعلومات المرتبطة مباشرة بالمهمة لتجنب الارتباك:
```python
# جيد: سياق مركّز
context = "The current weather in New York is 18°C with light rain."
# تجنب: معلومات غير ذات صلة
context = "The weather is 18°C. The city has 8 million people. Traffic is heavy."
```
</Step>
<Step title="تحديث السياق بانتظام">
تأكد من أن السياق المرجعي يعكس معلومات حالية ودقيقة.
</Step>
</Steps>
### اختيار العتبة
<Steps>
<Step title="البدء بالتحقق الافتراضي">
ابدأ بدون عتبات مخصصة لفهم الأداء الأساسي.
</Step>
<Step title="الضبط بناءً على المتطلبات">
- **محتوى عالي الأهمية**: استخدم عتبة 8-10 للدقة القصوى
- **محتوى عام**: استخدم عتبة 6-7 للتحقق المتوازن
- **محتوى إبداعي**: استخدم عتبة 4-5 أو التحقق الافتراضي المبني على الحكم
</Step>
<Step title="المراقبة والتكرار">
تتبع نتائج التحقق واضبط العتبات بناءً على الإيجابيات/السلبيات الكاذبة.
</Step>
</Steps>
## اعتبارات الأداء
### التأثير على زمن التنفيذ
- **عبء التحقق**: يضيف كل حاجز حوالي 1-3 ثوانٍ لكل مهمة
- **كفاءة LLM**: اختر نماذج فعالة للتقييم (مثل gpt-4o-mini)
### تحسين التكلفة
- **اختيار النموذج**: استخدم نماذج أصغر وفعالة لتقييم الحاجز
- **حجم السياق**: اجعل السياق المرجعي موجزًا لكن شاملًا
- **التخزين المؤقت**: فكّر في تخزين نتائج التحقق مؤقتًا للمحتوى المتكرر
## استكشاف الأخطاء وإصلاحها
<Accordion title="فشل التحقق دائمًا">
**الأسباب المحتملة:**
- السياق مقيّد جدًا أو غير مرتبط بمخرجات المهمة
- العتبة معينة عالية جدًا لنوع المحتوى
- السياق المرجعي يحتوي على معلومات قديمة
**الحلول:**
- مراجعة وتحديث السياق ليتطابق مع متطلبات المهمة
- خفض العتبة أو استخدام التحقق الافتراضي المبني على الحكم
- التأكد من أن السياق حالي ودقيق
</Accordion>
<Accordion title="إيجابيات كاذبة (محتوى صالح يُعلّم كغير صالح)">
**الأسباب المحتملة:**
- العتبة عالية جدًا للمهام الإبداعية أو التفسيرية
- السياق لا يغطي جميع الجوانب الصالحة للمخرجات
- نموذج التقييم محافظ بشكل مفرط
**الحلول:**
- خفض العتبة أو استخدام التحقق الافتراضي
- توسيع السياق ليشمل محتوى مقبول أوسع
- الاختبار مع نماذج تقييم مختلفة
</Accordion>
<Accordion title="أخطاء التقييم">
**الأسباب المحتملة:**
- مشكلات في الاتصال بالشبكة
- نموذج LLM غير متاح أو محدود المعدل
- مخرجات مهمة أو سياق غير صالح
**الحلول:**
- التحقق من الاتصال بالشبكة وحالة خدمة LLM
- تنفيذ منطق إعادة المحاولة للأعطال المؤقتة
- التحقق من تنسيق مخرجات المهمة قبل تقييم الحاجز
</Accordion>
<Card title="هل تحتاج مساعدة؟" icon="headset" href="mailto:support@crewai.com">
تواصل مع فريق الدعم للمساعدة في تهيئة حاجز الهلوسة أو استكشاف الأخطاء وإصلاحها.
</Card>

View File

@@ -1,45 +0,0 @@
---
title: السوق
description: "اكتشف وثبّت وأدِر الأصول القابلة لإعادة الاستخدام لطواقم مؤسستك."
icon: "store"
mode: "wide"
---
## نظرة عامة
يوفر السوق واجهة منظمة لاكتشاف عمليات التكامل والأدوات الداخلية والأصول القابلة لإعادة الاستخدام التي تسرّع تطوير الطواقم.
<Frame>
![نظرة عامة على السوق](/images/enterprise/marketplace-overview.png)
</Frame>
## قابلية الاكتشاف
- تصفح حسب الفئة والقدرة
- ابحث عن الأصول بالاسم أو الكلمة المفتاحية
## التثبيت والتفعيل
- تثبيت بنقرة واحدة للأصول المعتمدة
- تفعيل أو تعطيل لكل طاقم حسب الحاجة
- تهيئة متغيرات البيئة والنطاقات المطلوبة
<Frame>
![التثبيت والتهيئة](/images/enterprise/marketplace-install.png)
</Frame>
يمكنك أيضاً تنزيل القوالب مباشرة من السوق بالنقر على زر `Download` لاستخدامها محلياً أو تعديلها حسب احتياجاتك.
## ذو صلة
<CardGroup cols={3}>
<Card title="الأدوات والتكاملات" href="/ar/enterprise/features/tools-and-integrations" icon="wrench">
اربط التطبيقات الخارجية وأدِر الأدوات الداخلية التي يمكن لوكلائك استخدامها.
</Card>
<Card title="مستودع الأدوات" href="/ar/enterprise/guides/tool-repository#tool-repository" icon="toolbox">
انشر وثبّت الأدوات لتعزيز قدرات طواقمك.
</Card>
<Card title="مستودع الوكلاء" href="/ar/enterprise/features/agent-repositories" icon="people-group">
خزّن وشارك وأعد استخدام تعريفات الوكلاء عبر الفرق والمشاريع.
</Card>
</CardGroup>

View File

@@ -1,342 +0,0 @@
---
title: إخفاء البيانات الشخصية في التتبعات
description: "إخفاء البيانات الحساسة تلقائياً من تتبعات تنفيذ الطواقم والتدفقات"
icon: "lock"
mode: "wide"
---
## نظرة عامة
إخفاء البيانات الشخصية (PII Redaction) هو ميزة في CrewAI AMP تكتشف تلقائياً وتُقنّع معلومات التعريف الشخصية (PII) في تتبعات تنفيذ الطواقم والتدفقات. يضمن ذلك عدم كشف البيانات الحساسة مثل أرقام بطاقات الائتمان وأرقام الضمان الاجتماعي وعناوين البريد الإلكتروني والأسماء في تتبعات CrewAI AMP. يمكنك أيضاً إنشاء مُعرّفات مخصصة لحماية البيانات الخاصة بمؤسستك.
<Info>
إخفاء البيانات الشخصية متاح في خطة Enterprise.
يجب أن يكون إصدار النشر 1.8.0 أو أعلى.
</Info>
<Frame>
![نظرة عامة على إخفاء البيانات الشخصية](/images/enterprise/pii_mask_recognizer_trace_example.png)
</Frame>
## أهمية إخفاء البيانات الشخصية
عند تشغيل وكلاء الذكاء الاصطناعي في بيئة الإنتاج، غالباً ما تمر معلومات حساسة عبر طواقمك:
- بيانات العملاء من تكاملات CRM
- معلومات مالية من معالجات الدفع
- تفاصيل شخصية من إرسالات النماذج
- بيانات الموظفين الداخلية
بدون إخفاء مناسب، تظهر هذه البيانات في التتبعات، مما يجعل الامتثال للوائح مثل GDPR وHIPAA وPCI-DSS أمراً صعباً. يحل إخفاء البيانات الشخصية هذه المشكلة عن طريق إقناع البيانات الحساسة تلقائياً قبل تخزينها في التتبعات.
## كيف يعمل
1. **الاكتشاف** - مسح بيانات أحداث التتبع بحثاً عن أنماط PII المعروفة
2. **التصنيف** - تحديد نوع البيانات الحساسة (بطاقة ائتمان، SSN، بريد إلكتروني، إلخ.)
3. **الإقناع/الإخفاء** - استبدال البيانات الحساسة بقيم مُقنّعة بناءً على تهيئتك
```
Original: "Contact john.doe@company.com or call 555-123-4567"
Redacted: "Contact <EMAIL_ADDRESS> or call <PHONE_NUMBER>"
```
## تفعيل إخفاء البيانات الشخصية
<Info>
يجب أن تكون على خطة Enterprise وأن يكون إصدار النشر 1.8.0 أو أعلى لاستخدام هذه الميزة.
</Info>
<Steps>
<Step title="الانتقال إلى إعدادات الطاقم">
في لوحة تحكم CrewAI AMP، اختر طاقمك المنشور وانتقل إلى أحد عمليات النشر/الأتمتة، ثم انتقل إلى **Settings** → **PII Protection**.
</Step>
<Step title="تفعيل حماية البيانات الشخصية">
فعّل **PII Redaction for Traces**. سيؤدي ذلك إلى تفعيل المسح والإخفاء التلقائي لبيانات التتبع.
<Info>
تحتاج إلى تفعيل إخفاء البيانات الشخصية يدوياً لكل عملية نشر.
</Info>
<Frame>
![تفعيل إخفاء البيانات الشخصية](/images/enterprise/pii_mask_recognizer_enable.png)
</Frame>
</Step>
<Step title="تهيئة أنواع الكيانات">
اختر أنواع البيانات الشخصية التي تريد اكتشافها وإخفاءها. يمكن تفعيل أو تعطيل كل كيان بشكل فردي.
<Frame>
![تهيئة الكيانات](/images/enterprise/pii_mask_recognizer_supported_entities.png)
</Frame>
</Step>
<Step title="الحفظ">
احفظ تهيئتك. سيكون إخفاء البيانات الشخصية نشطاً في جميع عمليات تنفيذ الطاقم اللاحقة، دون الحاجة لإعادة النشر.
</Step>
</Steps>
## أنواع الكيانات المدعومة
يدعم CrewAI أنواع كيانات PII التالية، منظمة حسب الفئة.
### الكيانات العالمية
| الكيان | الوصف | مثال |
|--------|-------|------|
| `CREDIT_CARD` | أرقام بطاقات الائتمان/الخصم | "4111-1111-1111-1111" |
| `CRYPTO` | عناوين محافظ العملات الرقمية | "bc1qxy2kgd..." |
| `DATE_TIME` | التواريخ والأوقات | "January 15, 2024" |
| `EMAIL_ADDRESS` | عناوين البريد الإلكتروني | "john@example.com" |
| `IBAN_CODE` | أرقام الحسابات المصرفية الدولية | "DE89 3704 0044 0532 0130 00" |
| `IP_ADDRESS` | عناوين IPv4 وIPv6 | "192.168.1.1" |
| `LOCATION` | المواقع الجغرافية | "New York City" |
| `MEDICAL_LICENSE` | أرقام التراخيص الطبية | "MD12345" |
| `NRP` | الجنسيات أو المجموعات الدينية أو السياسية | - |
| `PERSON` | الأسماء الشخصية | "John Doe" |
| `PHONE_NUMBER` | أرقام الهواتف بتنسيقات مختلفة | "+1 (555) 123-4567" |
| `URL` | عناوين URL | "https://example.com" |
### كيانات خاصة بالولايات المتحدة
| الكيان | الوصف | مثال |
|--------|-------|------|
| `US_BANK_NUMBER` | أرقام الحسابات المصرفية الأمريكية | "1234567890" |
| `US_DRIVER_LICENSE` | أرقام رخص القيادة الأمريكية | "D1234567" |
| `US_ITIN` | رقم تعريف دافع الضرائب الفردي | "900-70-0000" |
| `US_PASSPORT` | أرقام جوازات السفر الأمريكية | "123456789" |
| `US_SSN` | أرقام الضمان الاجتماعي | "123-45-6789" |
## إجراءات الإخفاء
لكل كيان مُفعّل، يمكنك تهيئة كيفية إخفاء البيانات:
| الإجراء | الوصف | مثال على المخرجات |
|---------|-------|-------------------|
| `mask` | الاستبدال بتسمية نوع الكيان | `<CREDIT_CARD>` |
| `redact` | إزالة النص بالكامل | *(فارغ)* |
## المُعرّفات المخصصة
بالإضافة إلى الكيانات المدمجة، يمكنك إنشاء **مُعرّفات مخصصة** لاكتشاف أنماط PII الخاصة بمؤسستك.
<Frame>
![المُعرّفات المخصصة](/images/enterprise/pii_mask_recognizer.png)
</Frame>
### أنواع المُعرّفات
لديك خياران للمُعرّفات المخصصة:
| النوع | الأفضل لـ | مثال على حالة الاستخدام |
|-------|-----------|------------------------|
| **قائم على النمط (Regex)** | بيانات منظمة بتنسيقات متوقعة | مبالغ الرواتب، معرّفات الموظفين، رموز المشاريع |
| **قائمة الحظر (Deny-list)** | مطابقة النصوص بالضبط | أسماء الشركات، الأسماء الرمزية الداخلية، مصطلحات محددة |
### إنشاء مُعرّف مخصص
<Steps>
<Step title="الانتقال إلى المُعرّفات المخصصة">
انتقل إلى **Settings** → **Organization** → **Add Recognizer** في إعدادات مؤسستك.
</Step>
<Step title="تهيئة المُعرّف">
<Frame>
![تهيئة المُعرّف](/images/enterprise/pii_mask_recognizer_create.png)
</Frame>
هيّئ الحقول التالية:
- **Name**: اسم وصفي للمُعرّف
- **Entity Type**: تسمية الكيان التي ستظهر في المخرجات المُخفاة (مثل `EMPLOYEE_ID`، `SALARY`)
- **Type**: اختر بين Regex Pattern أو Deny List
- **Pattern/Values**: نمط Regex أو قائمة نصوص للمطابقة
- **Confidence Threshold**: الحد الأدنى للنتيجة (0.0-1.0) المطلوبة لتفعيل الإخفاء عند المطابقة. القيم الأعلى (مثل 0.8) تقلل الإيجابيات الخاطئة لكن قد تفوّت بعض المطابقات. القيم الأقل (مثل 0.5) تلتقط المزيد من المطابقات لكن قد تُفرط في الإخفاء. القيمة الافتراضية هي 0.8.
- **Context Words** (اختياري): كلمات تزيد ثقة الاكتشاف عند وجودها بالقرب
</Step>
<Step title="الحفظ">
احفظ المُعرّف. سيكون متاحاً للتفعيل في عمليات النشر الخاصة بك.
</Step>
</Steps>
### فهم أنواع الكيانات
يحدد **Entity Type** كيفية ظهور المحتوى المُطابق في التتبعات المُخفاة:
```
Entity Type: SALARY
Pattern: salary:\s*\$\s*\d+
Input: "Employee salary: $50,000"
Output: "Employee <SALARY>"
```
### استخدام كلمات السياق
تحسّن كلمات السياق الدقة عن طريق زيادة الثقة عند ظهور مصطلحات محددة بالقرب من النمط المُطابق:
```
Context Words: "project", "code", "internal"
Entity Type: PROJECT_CODE
Pattern: PRJ-\d{4}
```
عندما تظهر كلمة "project" أو "code" بالقرب من "PRJ-1234"، يكون لدى المُعرّف ثقة أعلى بأنها مطابقة حقيقية، مما يقلل الإيجابيات الخاطئة.
## عرض التتبعات المُخفاة
بمجرد تفعيل إخفاء البيانات الشخصية، ستعرض تتبعاتك قيماً مُخفاة بدلاً من البيانات الحساسة:
```
Task Output: "Customer <PERSON> placed order #12345.
Contact email: <EMAIL_ADDRESS>, phone: <PHONE_NUMBER>.
Payment processed for card ending in <CREDIT_CARD>."
```
القيم المُخفاة مُعلّمة بوضوح بأقواس زاوية وتسمية نوع الكيان (مثل `<EMAIL_ADDRESS>`)، مما يسهّل فهم البيانات التي تمت حمايتها مع السماح لك بتصحيح الأخطاء ومراقبة سلوك الطاقم.
## أفضل الممارسات
### اعتبارات الأداء
<Steps>
<Step title="فعّل الكيانات المطلوبة فقط">
كل كيان مُفعّل يضيف عبء معالجة. فعّل فقط الكيانات ذات الصلة ببياناتك.
</Step>
<Step title="استخدم أنماطاً محددة">
للمُعرّفات المخصصة، استخدم أنماطاً محددة لتقليل الإيجابيات الخاطئة وتحسين الأداء. أنماط Regex هي الأفضل عند تحديد أنماط معينة في التتبعات مثل الرواتب ومعرّفات الموظفين ورموز المشاريع وغيرها. مُعرّفات قائمة الحظر هي الأفضل عند تحديد نصوص بعينها في التتبعات مثل أسماء الشركات والأسماء الرمزية الداخلية وغيرها.
</Step>
<Step title="استفد من كلمات السياق">
تحسّن كلمات السياق الدقة عن طريق تفعيل الاكتشاف فقط عندما يتطابق النص المحيط.
</Step>
</Steps>
## استكشاف الأخطاء وإصلاحها
<Accordion title="البيانات الشخصية لا تُخفى">
**الأسباب المحتملة:**
- نوع الكيان غير مُفعّل في التهيئة
- النمط لا يتطابق مع تنسيق البيانات
- المُعرّف المخصص يحتوي على أخطاء في الصياغة
**الحلول:**
- تحقق من أن الكيان مُفعّل في Settings → Security
- اختبر أنماط Regex مع بيانات نموذجية
- تحقق من السجلات بحثاً عن أخطاء التهيئة
</Accordion>
<Accordion title="إخفاء بيانات أكثر من اللازم">
**الأسباب المحتملة:**
- أنواع كيانات واسعة جداً مُفعّلة (مثل `DATE_TIME` تلتقط التواريخ في كل مكان)
- أنماط المُعرّف المخصص عامة جداً
**الحلول:**
- عطّل الكيانات التي تسبب إيجابيات خاطئة
- اجعل الأنماط المخصصة أكثر تحديداً
- أضف كلمات سياق لتحسين الدقة
</Accordion>
<Accordion title="مشاكل الأداء">
**الأسباب المحتملة:**
- عدد كبير جداً من الكيانات المُفعّلة
- الكيانات القائمة على NLP (مثل `PERSON` و`LOCATION` و`NRP`) مكلفة حسابياً لأنها تستخدم نماذج تعلم الآلة
**الحلول:**
- فعّل فقط الكيانات التي تحتاجها فعلاً
- فكّر في استخدام بدائل قائمة على الأنماط حيثما أمكن
- راقب أوقات معالجة التتبعات في لوحة التحكم
</Accordion>
---
## مثال عملي: مطابقة نمط الراتب
يوضح هذا المثال كيفية إنشاء مُعرّف مخصص لاكتشاف وإقناع معلومات الرواتب في تتبعاتك.
### حالة الاستخدام
يعالج طاقمك بيانات موظفين أو بيانات مالية تتضمن معلومات رواتب بتنسيقات مثل:
- `salary: $50,000`
- `salary: $125,000.00`
- `salary:$1,500.50`
تريد إقناع هذه القيم تلقائياً لحماية بيانات التعويضات الحساسة.
### التهيئة
<Frame>
![تهيئة مُعرّف الراتب](/images/enterprise/pii_mask_custom_recognizer_salary.png)
</Frame>
| الحقل | القيمة |
|-------|--------|
| **Name** | `SALARY` |
| **Entity Type** | `SALARY` |
| **Type** | Regex Pattern |
| **Regex Pattern** | `salary:\s*\$\s*\d{1,3}(,\d{3})*(\.\d{2})?` |
| **Action** | Mask |
| **Confidence Threshold** | `0.8` |
| **Context Words** | `salary, compensation, pay, wage, income` |
### تحليل نمط Regex
| مكون النمط | المعنى |
|------------|--------|
| `salary:` | يطابق النص الحرفي "salary:" |
| `\s*` | يطابق صفر أو أكثر من أحرف المسافات البيضاء |
| `\$` | يطابق علامة الدولار (مُهرّبة) |
| `\s*` | يطابق صفر أو أكثر من أحرف المسافات البيضاء بعد $ |
| `\d{1,3}` | يطابق 1-3 أرقام (مثل "1"، "50"، "125") |
| `(,\d{3})*` | يطابق الآلاف المفصولة بفواصل (مثل ",000"، ",500,000") |
| `(\.\d{2})?` | يطابق اختيارياً السنتات (مثل ".00"، ".50") |
### أمثلة على النتائج
```
Original: "Employee record shows salary: $125,000.00 annually"
Redacted: "Employee record shows <SALARY> annually"
Original: "Base salary:$50,000 with bonus potential"
Redacted: "Base <SALARY> with bonus potential"
```
<Tip>
إضافة كلمات سياق مثل "salary" و"compensation" و"pay" و"wage" و"income" تساعد في زيادة ثقة الاكتشاف عند ظهور هذه المصطلحات بالقرب من النمط المُطابق، مما يقلل الإيجابيات الخاطئة.
</Tip>
### تفعيل المُعرّف لعمليات النشر
<Warning>
إنشاء مُعرّف مخصص على مستوى المؤسسة لا يفعّله تلقائياً لعمليات النشر. يجب عليك تفعيل كل مُعرّف يدوياً لكل عملية نشر تريد تطبيقه عليها.
</Warning>
بعد إنشاء المُعرّف المخصص، فعّله لكل عملية نشر:
<Steps>
<Step title="الانتقال إلى عملية النشر">
انتقل إلى عملية النشر/الأتمتة وافتح **Settings** → **PII Protection**.
</Step>
<Step title="اختيار المُعرّفات المخصصة">
تحت **Mask Recognizers**، سترى المُعرّفات المحددة على مستوى مؤسستك. حدد المربع بجانب المُعرّفات التي تريد تفعيلها.
<Frame>
![تفعيل المُعرّف المخصص](/images/enterprise/pii_mask_recognizers_options.png)
</Frame>
</Step>
<Step title="حفظ التهيئة">
احفظ تغييراتك. سيكون المُعرّف نشطاً في جميع عمليات التنفيذ اللاحقة لعملية النشر هذه.
</Step>
</Steps>
<Info>
كرر هذه العملية لكل عملية نشر تحتاج فيها إلى المُعرّف المخصص. يمنحك ذلك تحكماً دقيقاً في المُعرّفات النشطة في البيئات المختلفة (مثل بيئة التطوير مقابل بيئة الإنتاج).
</Info>

View File

@@ -1,256 +0,0 @@
---
title: "التحكم في الوصول القائم على الأدوار (RBAC)"
description: "تحكم في الوصول إلى الطواقم والأدوات والبيانات باستخدام الأدوار والنطاقات والصلاحيات الدقيقة."
icon: "shield"
mode: "wide"
---
## نظرة عامة
يتيح RBAC في CrewAI AMP إدارة وصول آمنة وقابلة للتوسع من خلال طبقتين:
1. **صلاحيات الميزات** — تتحكم في ما يمكن لكل دور القيام به عبر المنصة (إدارة، قراءة، أو بدون وصول)
2. **صلاحيات على مستوى الكيان** — وصول دقيق للأتمتات الفردية ومتغيرات البيئة واتصالات LLM ومستودعات Git
<Frame>
<img src="/images/enterprise/users_and_roles.png" alt="نظرة عامة على RBAC في CrewAI AMP" />
</Frame>
## المستخدمون والأدوار
يُعيَّن لكل عضو في مساحة عمل CrewAI دور يحدد صلاحيات الوصول عبر الميزات المختلفة.
يمكنك:
- استخدام الأدوار المحددة مسبقاً (Owner، Member)
- إنشاء أدوار مخصصة مصممة لصلاحيات محددة
- تعيين الأدوار في أي وقت عبر لوحة الإعدادات
يمكنك تهيئة المستخدمين والأدوار في Settings → Roles.
<Steps>
<Step title="فتح إعدادات الأدوار">
انتقل إلى <b>Settings → Roles</b> في CrewAI AMP.
</Step>
<Step title="اختيار نوع الدور">
استخدم دوراً محدداً مسبقاً (<b>Owner</b>، <b>Member</b>) أو انقر على{" "}
<b>Create role</b> لتحديد دور مخصص.
</Step>
<Step title="التعيين للأعضاء">
اختر المستخدمين وعيّن لهم الدور. يمكنك تغيير ذلك في أي وقت.
</Step>
</Steps>
### الأدوار المحددة مسبقاً
| الدور | الوصف |
| :---------- | :-------------------------------------------------------------------- |
| **Owner** | وصول كامل لجميع الميزات والإعدادات. لا يمكن تقييده. |
| **Member** | وصول للقراءة لمعظم الميزات، وصول إدارة لمتغيرات البيئة واتصالات LLM ومشاريع Studio. لا يمكنه تعديل إعدادات المؤسسة أو الإعدادات الافتراضية. |
### ملخص التهيئة
| المجال | مكان التهيئة | الخيارات |
| :-------------------- | :--------------------------------- | :-------------------------------------- |
| المستخدمون والأدوار | Settings → Roles | محددة مسبقاً: Owner، Member؛ أدوار مخصصة |
| رؤية الأتمتة | Automation → Settings → Visibility | خاص؛ قائمة بيضاء للمستخدمين/الأدوار |
---
## مصفوفة صلاحيات الميزات
لكل دور مستوى صلاحية لكل منطقة ميزة. المستويات الثلاثة هي:
- **إدارة (Manage)** — وصول كامل للقراءة/الكتابة (إنشاء، تعديل، حذف)
- **قراءة (Read)** — وصول للعرض فقط
- **بدون وصول (No access)** — الميزة مخفية/غير قابلة للوصول
| الميزة | Owner | Member (افتراضي) | المستويات المتاحة | الوصف |
| :------------------------ | :------ | :--------------- | :--------------------------------- | :-------------------------------------------------------------- |
| `usage_dashboards` | Manage | Read | Manage / Read / No access | عرض مقاييس وتحليلات الاستخدام |
| `crews_dashboards` | Manage | Read | Manage / Read / No access | عرض لوحات النشر والوصول إلى تفاصيل الأتمتة |
| `invitations` | Manage | Read | Manage / Read / No access | دعوة أعضاء جدد إلى المؤسسة |
| `training_ui` | Manage | Read | Manage / Read / No access | الوصول إلى واجهات التدريب/الضبط الدقيق |
| `tools` | Manage | Read | Manage / Read / No access | إنشاء وإدارة الأدوات |
| `agents` | Manage | Read | Manage / Read / No access | إنشاء وإدارة الوكلاء |
| `environment_variables` | Manage | Manage | Manage / No access | إنشاء وإدارة متغيرات البيئة |
| `llm_connections` | Manage | Manage | Manage / No access | تهيئة اتصالات مزودي LLM |
| `default_settings` | Manage | No access | Manage / No access | تعديل الإعدادات الافتراضية على مستوى المؤسسة |
| `organization_settings` | Manage | No access | Manage / No access | إدارة الفوترة والخطط وتهيئة المؤسسة |
| `studio_projects` | Manage | Manage | Manage / No access | إنشاء وتعديل المشاريع في Studio |
<Tip>
عند إنشاء دور مخصص، يمكن ضبط معظم الميزات على **Manage** أو **Read** أو **No access**. ومع ذلك، فإن `environment_variables` و`llm_connections` و`default_settings` و`organization_settings` و`studio_projects` تدعم فقط **Manage** أو **No access** — لا يوجد خيار للقراءة فقط لهذه الميزات.
</Tip>
---
## النشر من GitHub أو Zip
من أكثر أسئلة RBAC شيوعاً: _"ما الصلاحيات التي يحتاجها عضو الفريق للنشر؟"_
### النشر من GitHub
لنشر أتمتة من مستودع GitHub، يحتاج المستخدم إلى:
1. **`crews_dashboards`**: على الأقل `Read` — مطلوب للوصول إلى لوحة الأتمتات حيث يتم إنشاء عمليات النشر
2. **الوصول إلى مستودع Git** (إذا كان RBAC على مستوى الكيان لمستودعات Git مفعلاً): يجب منح دور المستخدم الوصول إلى مستودع Git المحدد عبر صلاحيات مستوى الكيان
3. **`studio_projects`: `Manage`** — إذا كان يبني الطاقم في Studio قبل النشر
### النشر من Zip
لنشر أتمتة من ملف Zip، يحتاج المستخدم إلى:
1. **`crews_dashboards`**: على الأقل `Read` — مطلوب للوصول إلى لوحة الأتمتات
2. **تفعيل نشر Zip**: يجب ألا تكون المؤسسة قد عطلت نشر Zip في إعدادات المؤسسة
### مرجع سريع: الحد الأدنى من الصلاحيات للنشر
| الإجراء | صلاحيات الميزات المطلوبة | متطلبات إضافية |
| :------------------- | :----------------------------------- | :----------------------------------------------- |
| النشر من GitHub | `crews_dashboards: Read` | وصول كيان مستودع Git (إذا كان Git RBAC مفعلاً) |
| النشر من Zip | `crews_dashboards: Read` | يجب تفعيل نشر Zip على مستوى المؤسسة |
| البناء في Studio | `studio_projects: Manage` | — |
| تهيئة مفاتيح LLM | `llm_connections: Manage` | — |
| ضبط متغيرات البيئة | `environment_variables: Manage` | وصول مستوى الكيان (إذا كان RBAC الكيان مفعلاً) |
---
## التحكم في الوصول على مستوى الأتمتة (صلاحيات الكيان)
بالإضافة إلى الأدوار على مستوى المؤسسة، يدعم CrewAI صلاحيات دقيقة على مستوى الكيان تقيد الوصول إلى موارد فردية.
### رؤية الأتمتة
تدعم الأتمتات إعدادات رؤية تقيد الوصول حسب المستخدم أو الدور. هذا مفيد لـ:
- الحفاظ على خصوصية الأتمتات الحساسة أو التجريبية
- إدارة الرؤية عبر الفرق الكبيرة أو المتعاونين الخارجيين
- اختبار الأتمتات في سياقات معزولة
يمكن تهيئة عمليات النشر كخاصة، مما يعني أن المستخدمين والأدوار المدرجين في القائمة البيضاء فقط سيتمكنون من التفاعل معها.
يمكنك تهيئة التحكم في الوصول على مستوى الأتمتة في Automation → Settings → علامة تبويب Visibility.
<Steps>
<Step title="فتح علامة تبويب الرؤية">
انتقل إلى <b>Automation → Settings → Visibility</b>.
</Step>
<Step title="ضبط الرؤية">
اختر <b>Private</b> لتقييد الوصول. يحتفظ مالك المؤسسة دائماً
بالوصول.
</Step>
<Step title="القائمة البيضاء للوصول">
أضف مستخدمين وأدواراً محددة مسموح لهم بالعرض والتشغيل والوصول
إلى السجلات/المقاييس/الإعدادات.
</Step>
<Step title="الحفظ والتحقق">
احفظ التغييرات، ثم تأكد من أن المستخدمين غير المدرجين في القائمة البيضاء لا يمكنهم عرض أو تشغيل
الأتمتة.
</Step>
</Steps>
### الرؤية الخاصة: نتائج الوصول
| الإجراء | المالك | مستخدم/دور في القائمة البيضاء | غير مدرج في القائمة البيضاء |
| :--------------------------- | :---- | :---------------------------- | :-------------------------- |
| عرض الأتمتة | ✓ | ✓ | ✗ |
| تشغيل الأتمتة/API | ✓ | ✓ | ✗ |
| الوصول إلى السجلات/المقاييس/الإعدادات | ✓ | ✓ | ✗ |
<Tip>
يتمتع مالك المؤسسة دائماً بالوصول. في الوضع الخاص، يمكن فقط للمستخدمين
والأدوار المدرجين في القائمة البيضاء العرض والتشغيل والوصول إلى السجلات/المقاييس/الإعدادات.
</Tip>
<Frame>
<img src="/images/enterprise/visibility.png" alt="إعدادات رؤية الأتمتة في CrewAI AMP" />
</Frame>
### أنواع صلاحيات النشر
عند منح وصول على مستوى الكيان لأتمتة محددة، يمكنك تعيين أنواع الصلاحيات التالية:
| الصلاحية | ما تسمح به |
| :------------------- | :-------------------------------------------------- |
| `run` | تنفيذ الأتمتة واستخدام API الخاص بها |
| `traces` | عرض تتبعات التنفيذ والسجلات |
| `manage_settings` | تعديل، إعادة نشر، استرجاع، أو حذف الأتمتة |
| `human_in_the_loop` | الرد على طلبات الإنسان في الحلقة (HITL) |
| `full_access` | جميع ما سبق |
### RBAC على مستوى الكيان لموارد أخرى
عند تفعيل RBAC على مستوى الكيان، يمكن أيضاً التحكم في الوصول لهذه الموارد حسب المستخدم أو الدور:
| المورد | يتم التحكم فيه بواسطة | الوصف |
| :-------------------- | :--------------------------------- | :------------------------------------------------------------- |
| متغيرات البيئة | علامة ميزة RBAC الكيان | تقييد أي الأدوار/المستخدمين يمكنهم عرض أو إدارة متغيرات بيئة محددة |
| اتصالات LLM | علامة ميزة RBAC الكيان | تقييد الوصول لتهيئات مزودي LLM محددة |
| مستودعات Git | إعداد RBAC لمستودعات Git بالمؤسسة | تقييد أي الأدوار/المستخدمين يمكنهم الوصول لمستودعات متصلة محددة |
---
## أنماط الأدوار الشائعة
بينما يأتي CrewAI بدوري Owner وMember، تستفيد معظم الفرق من إنشاء أدوار مخصصة. إليك الأنماط الشائعة:
### دور المطور
دور لأعضاء الفريق الذين يبنون وينشرون الأتمتات لكن لا يديرون إعدادات المؤسسة.
| الميزة | الصلاحية |
| :------------------------ | :---------- |
| `usage_dashboards` | Read |
| `crews_dashboards` | Manage |
| `invitations` | Read |
| `training_ui` | Read |
| `tools` | Manage |
| `agents` | Manage |
| `environment_variables` | Manage |
| `llm_connections` | Manage |
| `default_settings` | No access |
| `organization_settings` | No access |
| `studio_projects` | Manage |
### دور المشاهد / أصحاب المصلحة
دور للمعنيين غير التقنيين الذين يحتاجون لمراقبة الأتمتات وعرض النتائج.
| الميزة | الصلاحية |
| :------------------------ | :---------- |
| `usage_dashboards` | Read |
| `crews_dashboards` | Read |
| `invitations` | No access |
| `training_ui` | Read |
| `tools` | Read |
| `agents` | Read |
| `environment_variables` | No access |
| `llm_connections` | No access |
| `default_settings` | No access |
| `organization_settings` | No access |
| `studio_projects` | No access |
### دور مسؤول العمليات / المنصة
دور لمشغلي المنصة الذين يديرون إعدادات البنية التحتية لكن قد لا يبنون الوكلاء.
| الميزة | الصلاحية |
| :------------------------ | :---------- |
| `usage_dashboards` | Manage |
| `crews_dashboards` | Manage |
| `invitations` | Manage |
| `training_ui` | Read |
| `tools` | Read |
| `agents` | Read |
| `environment_variables` | Manage |
| `llm_connections` | Manage |
| `default_settings` | Manage |
| `organization_settings` | Read |
| `studio_projects` | No access |
---
<Card title="تحتاج مساعدة؟" icon="headset" href="mailto:support@crewai.com">
تواصل مع فريق الدعم للمساعدة في أسئلة RBAC.
</Card>

View File

@@ -1,261 +0,0 @@
---
title: الأدوات والتكاملات
description: "اربط التطبيقات الخارجية وأدِر الأدوات الداخلية التي يمكن لوكلائك استخدامها."
icon: "wrench"
mode: "wide"
---
## نظرة عامة
الأدوات والتكاملات هي المركز الرئيسي لربط تطبيقات الجهات الخارجية وإدارة الأدوات الداخلية التي يمكن لوكلائك استخدامها أثناء التشغيل.
<Frame>
![نظرة عامة على الأدوات والتكاملات](/images/enterprise/crew_connectors.png)
</Frame>
## استكشاف
<Tabs>
<Tab title="التكاملات" icon="plug">
## تطبيقات الوكلاء (التكاملات)
اربط تطبيقات المؤسسات (مثل Gmail وGoogle Drive وHubSpot وSlack) عبر OAuth لتمكين إجراءات الوكلاء.
{" "}
<Steps>
<Step title="الاتصال">
انقر على <b>Connect</b> في أحد التطبيقات وأكمل عملية OAuth.
</Step>
<Step title="التهيئة">
عدّل اختيارياً النطاقات والمشغلات وتوفر الإجراءات.
</Step>
<Step title="الاستخدام في الوكلاء">
تصبح الخدمات المتصلة متاحة كأدوات لوكلائك.
</Step>
</Steps>
{" "}
<Frame>![شبكة التكاملات](/images/enterprise/agent-apps.png)</Frame>
### ربط حسابك
1. انتقل إلى <Link href="https://app.crewai.com/crewai_plus/connectors">Integrations</Link>
2. انقر على <b>Connect</b> في الخدمة المطلوبة
3. أكمل تدفق OAuth وامنح النطاقات
4. انسخ رمز Enterprise من <Link href="https://app.crewai.com/crewai_plus/settings/integrations">Integration Settings</Link>
{" "}
<Frame>
![رمز Enterprise](/images/enterprise/enterprise_action_auth_token.png)
</Frame>
### تثبيت أدوات التكامل
لاستخدام التكاملات محلياً، تحتاج إلى تثبيت أحدث حزمة `crewai-tools`.
```bash
uv add crewai-tools
```
### إعداد متغيرات البيئة
{" "}
<Note>
لاستخدام التكاملات مع `Agent(apps=[])` يجب تعيين متغير البيئة
`CREWAI_PLATFORM_INTEGRATION_TOKEN` برمز Enterprise الخاص بك.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
أو أضفه إلى ملف `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
### مثال على الاستخدام
{" "}
<Tip>
استخدم النهج المبسط الجديد لدمج تطبيقات المؤسسات. ما عليك سوى تحديد
التطبيق وإجراءاته مباشرة في تهيئة Agent.
</Tip>
```python
from crewai import Agent, Task, Crew
# Create an agent with Gmail capabilities
email_agent = Agent(
role="Email Manager",
goal="Manage and organize email communications",
backstory="An AI assistant specialized in email management and communication.",
apps=['gmail', 'gmail/send_email'] # Using canonical name 'gmail'
)
# Task to send an email
email_task = Task(
description="Draft and send a follow-up email to john@example.com about the project update",
agent=email_agent,
expected_output="Confirmation that email was sent successfully"
)
# Run the task
crew = Crew(
agents=[email_agent],
tasks=[email_task]
)
# Run the crew
crew.kickoff()
```
### تصفية الأدوات
```python
from crewai import Agent, Task, Crew
# Create agent with specific Gmail actions only
gmail_agent = Agent(
role="Gmail Manager",
goal="Manage gmail communications and notifications",
backstory="An AI assistant that helps coordinate gmail communications.",
apps=['gmail/fetch_emails'] # Using canonical name with specific action
)
notification_task = Task(
description="Find the email from john@example.com",
agent=gmail_agent,
expected_output="Email found from john@example.com"
)
crew = Crew(
agents=[gmail_agent],
tasks=[notification_task]
)
```
في الطاقم المنشور، يمكنك تحديد الإجراءات المتاحة لكل تكامل من صفحة إعدادات الخدمة.
{" "}
<Frame>
![تصفية الإجراءات](/images/enterprise/filtering_enterprise_action_tools.png)
</Frame>
### عمليات النشر المحددة النطاق (مؤسسات متعددة المستخدمين)
يمكنك تحديد نطاق كل تكامل لمستخدم معين. على سبيل المثال، طاقم يتصل بـ Google يمكنه استخدام حساب Gmail لمستخدم محدد.
{" "}
<Tip>مفيد عندما تحتاج فرق/مستخدمون مختلفون للحفاظ على فصل الوصول إلى البيانات.</Tip>
استخدم `user_bearer_token` لتحديد نطاق المصادقة للمستخدم الطالب. إذا لم يكن المستخدم مسجل الدخول، فلن يستخدم الطاقم التكاملات المتصلة. وإلا فسيعود إلى رمز الحامل الافتراضي المهيأ لعملية النشر.
{" "}
<Frame>![رمز حامل المستخدم](/images/enterprise/user_bearer_token.png)</Frame>
{" "}
<div id="catalog"></div>
### الكتالوج
#### الاتصالات والتعاون
- Gmail — إدارة الرسائل الإلكترونية والمسودات
- Slack — إشعارات وتنبيهات مساحة العمل
- Microsoft — تكامل Office 365 وTeams
#### إدارة المشاريع
- Jira — تتبع المشكلات وإدارة المشاريع
- ClickUp — إدارة المهام والإنتاجية
- Asana — تنسيق مهام ومشاريع الفريق
- Notion — إدارة الصفحات وقواعد البيانات
- Linear — تتبع مشاريع البرمجيات والأخطاء
- GitHub — إدارة المستودعات والمشكلات
#### إدارة علاقات العملاء
- Salesforce — إدارة حسابات وفرص CRM
- HubSpot — إدارة خط أنابيب المبيعات وجهات الاتصال
- Zendesk — إدارة تذاكر دعم العملاء
#### الأعمال والمالية
- Stripe — معالجة المدفوعات وإدارة العملاء
- Shopify — إدارة متجر ومنتجات التجارة الإلكترونية
#### الإنتاجية والتخزين
- Google Sheets — مزامنة بيانات جداول البيانات
- Google Calendar — إدارة الأحداث والجداول
- Box — تخزين الملفات وإدارة المستندات
...والمزيد قادم!
</Tab>
<Tab title="الأدوات الداخلية" icon="toolbox">
## الأدوات الداخلية
أنشئ أدوات مخصصة محلياً، وانشرها في مستودع أدوات CrewAI AMP واستخدمها في وكلائك.
{" "}
<Tip>
قبل تشغيل الأوامر أدناه، تأكد من تسجيل الدخول إلى حساب CrewAI AMP
بتشغيل هذا الأمر: ```bash crewai login ```
</Tip>
{" "}
<Frame>
![تفاصيل الأداة الداخلية](/images/enterprise/tools-integrations-internal.png)
</Frame>
{" "}
<Steps>
<Step title="الإنشاء">
أنشئ أداة جديدة محلياً. ```bash crewai tool create your-tool ```
</Step>
<Step title="النشر">
انشر الأداة في مستودع أدوات CrewAI AMP. ```bash crewai tool
publish ```
</Step>
<Step title="التثبيت">
ثبّت الأداة من مستودع أدوات CrewAI AMP. ```bash crewai tool
install your-tool ```
</Step>
</Steps>
الإدارة:
- الاسم والوصف
- الرؤية (خاص / عام)
- متغيرات البيئة المطلوبة
- سجل الإصدارات والتنزيلات
- وصول الفرق والأدوار
{" "}
<Frame>![تفاصيل الأداة الداخلية](/images/enterprise/tool-configs.png)</Frame>
</Tab>
</Tabs>
## ذو صلة
<CardGroup cols={2}>
<Card
title="مستودع الأدوات"
href="/ar/enterprise/guides/tool-repository#tool-repository"
icon="toolbox"
>
أنشئ وانشر وأدِر إصدارات الأدوات المخصصة لمؤسستك.
</Card>
<Card
title="أتمتة Webhook"
href="/ar/enterprise/guides/webhook-automation"
icon="bolt"
>
أتمت سير العمل وتكامل مع المنصات والخدمات الخارجية.
</Card>
</CardGroup>

View File

@@ -1,148 +0,0 @@
---
title: التتبعات
description: "استخدام التتبعات لمراقبة طواقمك"
icon: "timeline"
mode: "wide"
---
## نظرة عامة
توفر التتبعات رؤية شاملة لعمليات تنفيذ طواقمك، مما يساعدك على مراقبة الأداء وتصحيح الأخطاء وتحسين سير عمل وكلاء الذكاء الاصطناعي.
## ما هي التتبعات؟
التتبعات في CrewAI AMP هي سجلات تنفيذ مفصلة تلتقط كل جانب من جوانب عمل طاقمك، من المدخلات الأولية إلى المخرجات النهائية. تسجل:
- أفكار الوكلاء واستدلالاتهم
- تفاصيل تنفيذ المهام
- استخدام الأدوات ومخرجاتها
- مقاييس استهلاك الرموز
- أوقات التنفيذ
- تقديرات التكلفة
<Frame>![نظرة عامة على التتبعات](/images/enterprise/traces-overview.png)</Frame>
## الوصول إلى التتبعات
<Steps>
<Step title="الانتقال إلى علامة تبويب التتبعات">
في لوحة تحكم CrewAI AMP، انقر على **Traces** لعرض جميع سجلات التنفيذ.
</Step>
<Step title="اختيار عملية تنفيذ">
سترى قائمة بجميع عمليات تنفيذ الطاقم، مرتبة حسب التاريخ. انقر على أي عملية تنفيذ لعرض تتبعها المفصل.
</Step>
</Steps>
## فهم واجهة التتبع
تنقسم واجهة التتبع إلى عدة أقسام، يقدم كل منها رؤى مختلفة حول تنفيذ طاقمك:
### 1. ملخص التنفيذ
يعرض القسم العلوي مقاييس عالية المستوى حول التنفيذ:
- **إجمالي الرموز**: عدد الرموز المستهلكة عبر جميع المهام
- **رموز الطلب**: الرموز المستخدمة في الطلبات إلى LLM
- **رموز الإكمال**: الرموز المُنشأة في استجابات LLM
- **الطلبات**: عدد استدعاءات API المُجراة
- **وقت التنفيذ**: المدة الإجمالية لتشغيل الطاقم
- **التكلفة المقدرة**: التكلفة التقريبية بناءً على استخدام الرموز
<Frame>![ملخص التنفيذ](/images/enterprise/trace-summary.png)</Frame>
### 2. المهام والوكلاء
يعرض هذا القسم جميع المهام والوكلاء الذين كانوا جزءاً من تنفيذ الطاقم:
- اسم المهمة وتعيين الوكيل
- الوكلاء ونماذج LLM المستخدمة لكل مهمة
- الحالة (مكتملة/فاشلة)
- وقت التنفيذ الفردي للمهمة
<Frame>![قائمة المهام](/images/enterprise/trace-tasks.png)</Frame>
### 3. المخرجات النهائية
يعرض النتيجة النهائية التي أنتجها الطاقم بعد اكتمال جميع المهام.
<Frame>![المخرجات النهائية](/images/enterprise/final-output.png)</Frame>
### 4. الجدول الزمني للتنفيذ
تمثيل مرئي لوقت بدء وانتهاء كل مهمة، يساعدك على تحديد نقاط الاختناق أو أنماط التنفيذ المتوازي.
<Frame>![الجدول الزمني للتنفيذ](/images/enterprise/trace-timeline.png)</Frame>
### 5. عرض المهمة المفصل
عند النقر على مهمة محددة في الجدول الزمني أو قائمة المهام، سترى:
<Frame>![عرض المهمة المفصل](/images/enterprise/trace-detailed-task.png)</Frame>
- **مفتاح المهمة**: معرّف فريد للمهمة
- **معرّف المهمة**: معرّف تقني في النظام
- **الحالة**: الحالة الحالية (مكتملة/قيد التشغيل/فاشلة)
- **الوكيل**: الوكيل الذي نفّذ المهمة
- **LLM**: نموذج اللغة المستخدم لهذه المهمة
- **وقت البدء/الانتهاء**: متى بدأت المهمة واكتملت
- **وقت التنفيذ**: مدة هذه المهمة المحددة
- **وصف المهمة**: ما طُلب من الوكيل تنفيذه
- **المخرجات المتوقعة**: تنسيق المخرجات المطلوب
- **المدخلات**: أي مدخلات مقدمة لهذه المهمة من مهام سابقة
- **المخرجات**: النتيجة الفعلية التي أنتجها الوكيل
## استخدام التتبعات لتصحيح الأخطاء
التتبعات لا تقدر بثمن لاستكشاف المشكلات في طواقمك:
<Steps>
<Step title="تحديد نقاط الفشل">
عندما لا ينتج تنفيذ الطاقم النتائج المتوقعة، افحص التتبع لمعرفة أين حدث الخطأ. ابحث عن:
- المهام الفاشلة
- قرارات الوكيل غير المتوقعة
- أخطاء استخدام الأدوات
- التعليمات المُساء فهمها
<Frame>
![نقاط الفشل](/images/enterprise/failure.png)
</Frame>
</Step>
<Step title="تحسين الأداء">
استخدم مقاييس التنفيذ لتحديد نقاط اختناق الأداء:
- المهام التي استغرقت وقتاً أطول من المتوقع
- الاستخدام المفرط للرموز
- عمليات الأدوات المكررة
- استدعاءات API غير الضرورية
</Step>
<Step title="تحسين كفاءة التكلفة">
حلل استخدام الرموز وتقديرات التكلفة لتحسين كفاءة طاقمك:
- فكّر في استخدام نماذج أصغر للمهام الأبسط
- صقل الطلبات لتكون أكثر إيجازاً
- خزّن المعلومات المُوصول إليها بشكل متكرر مؤقتاً
- نظّم المهام لتقليل العمليات المكررة
</Step>
</Steps>
## الأداء والتجميع
يجمّع CrewAI تحميلات التتبع لتقليل العبء في عمليات التشغيل ذات الحجم الكبير:
- يقوم TraceBatchManager بتخزين الأحداث مؤقتاً وإرسالها في دفعات عبر عميل Plus API
- يقلل حركة الشبكة ويحسّن الموثوقية في الاتصالات غير المستقرة
- يُفعّل تلقائياً في مستمع التتبع الافتراضي؛ لا حاجة لتهيئة
يوفر ذلك تتبعاً أكثر استقراراً تحت الحمل مع الحفاظ على بيانات القياس المفصلة للمهام/الوكلاء.
<Card title="تحتاج مساعدة؟" icon="headset" href="mailto:support@crewai.com">
تواصل مع فريق الدعم للمساعدة في تحليل التتبعات أو أي ميزات أخرى في
CrewAI AMP.
</Card>

View File

@@ -1,172 +0,0 @@
---
title: بث Webhook
description: "استخدام بث Webhook لإرسال الأحداث إلى webhook الخاص بك"
icon: "webhook"
mode: "wide"
---
## نظرة عامة
يتيح لك بث أحداث Enterprise تلقي تحديثات webhook في الوقت الفعلي حول طواقمك وتدفقاتك المنشورة على CrewAI AMP، مثل استدعاءات النماذج واستخدام الأدوات وخطوات التدفق.
## الاستخدام
عند استخدام Kickoff API، أضف كائن `webhooks` إلى طلبك، على سبيل المثال:
```json
{
"inputs": { "foo": "bar" },
"webhooks": {
"events": ["crew_kickoff_started", "llm_call_started"],
"url": "https://your.endpoint/webhook",
"realtime": false,
"authentication": {
"strategy": "bearer",
"token": "my-secret-token"
}
}
}
```
إذا تم تعيين `realtime` إلى `true`، يتم تسليم كل حدث بشكل فردي وفوري، على حساب أداء الطاقم/التدفق.
## تنسيق Webhook
يرسل كل webhook قائمة بالأحداث:
```json
{
"events": [
{
"id": "event-id",
"execution_id": "crew-run-id",
"timestamp": "2025-02-16T10:58:44.965Z",
"type": "llm_call_started",
"data": {
"model": "gpt-4",
"messages": [
{ "role": "system", "content": "You are an assistant." },
{ "role": "user", "content": "Summarize this article." }
]
}
}
]
}
```
يختلف هيكل كائن `data` حسب نوع الحدث. راجع [قائمة الأحداث](https://github.com/crewAIInc/crewAI/tree/main/lib/crewai/src/crewai/events/types) على GitHub.
نظراً لأن الطلبات تُرسل عبر HTTP، لا يمكن ضمان ترتيب الأحداث. إذا كنت تحتاج الترتيب، استخدم حقل `timestamp`.
## الأحداث المدعومة
يدعم CrewAI كلاً من أحداث النظام والأحداث المخصصة في بث أحداث Enterprise. تُرسل هذه الأحداث إلى نقطة نهاية webhook المُهيأة أثناء تنفيذ الطاقم والتدفق.
### أحداث التدفق:
- `flow_created`
- `flow_started`
- `flow_finished`
- `flow_plot`
- `method_execution_started`
- `method_execution_finished`
- `method_execution_failed`
### أحداث الوكيل:
- `agent_execution_started`
- `agent_execution_completed`
- `agent_execution_error`
- `lite_agent_execution_started`
- `lite_agent_execution_completed`
- `lite_agent_execution_error`
- `agent_logs_started`
- `agent_logs_execution`
- `agent_evaluation_started`
- `agent_evaluation_completed`
- `agent_evaluation_failed`
### أحداث الطاقم:
- `crew_kickoff_started`
- `crew_kickoff_completed`
- `crew_kickoff_failed`
- `crew_train_started`
- `crew_train_completed`
- `crew_train_failed`
- `crew_test_started`
- `crew_test_completed`
- `crew_test_failed`
- `crew_test_result`
### أحداث المهام:
- `task_started`
- `task_completed`
- `task_failed`
- `task_evaluation`
### أحداث استخدام الأدوات:
- `tool_usage_started`
- `tool_usage_finished`
- `tool_usage_error`
- `tool_validate_input_error`
- `tool_selection_error`
- `tool_execution_error`
### أحداث LLM:
- `llm_call_started`
- `llm_call_completed`
- `llm_call_failed`
- `llm_stream_chunk`
### أحداث حواجز LLM:
- `llm_guardrail_started`
- `llm_guardrail_completed`
### أحداث الذاكرة:
- `memory_query_started`
- `memory_query_completed`
- `memory_query_failed`
- `memory_save_started`
- `memory_save_completed`
- `memory_save_failed`
- `memory_retrieval_started`
- `memory_retrieval_completed`
### أحداث المعرفة:
- `knowledge_search_query_started`
- `knowledge_search_query_completed`
- `knowledge_search_query_failed`
- `knowledge_query_started`
- `knowledge_query_completed`
- `knowledge_query_failed`
### أحداث الاستدلال:
- `agent_reasoning_started`
- `agent_reasoning_completed`
- `agent_reasoning_failed`
تتطابق أسماء الأحداث مع ناقل الأحداث الداخلي. راجع GitHub للقائمة الكاملة للأحداث.
يمكنك إصدار أحداثك المخصصة الخاصة، وسيتم تسليمها عبر تدفق webhook جنباً إلى جنب مع أحداث النظام.
<CardGroup>
<Card
title="GitHub"
icon="github"
href="https://github.com/crewAIInc/crewAI/tree/main/src/crewai/utilities/events"
>
القائمة الكاملة للأحداث
</Card>
<Card title="تحتاج مساعدة؟" icon="headset" href="mailto:support@crewai.com">
تواصل مع فريق الدعم للمساعدة في تكامل webhook أو
استكشاف الأخطاء.
</Card>
</CardGroup>

View File

@@ -1,321 +0,0 @@
---
title: "نظرة عامة على المشغلات"
description: "فهم كيفية عمل مشغلات CrewAI AMP وكيفية إدارتها وأين تجد أدلة التكامل الخاصة بكل خدمة"
icon: "face-smile"
mode: "wide"
---
تربط مشغلات CrewAI AMP أتمتاتك بالأحداث الفورية عبر الأدوات التي تستخدمها فرقك بالفعل. بدلاً من الاستعلام المتكرر عن الأنظمة أو الاعتماد على التشغيل اليدوي، تستمع المشغلات للتغييرات — رسائل بريد إلكتروني جديدة، تحديثات التقويم، تغييرات حالة CRM — وتطلق فوراً الطاقم أو التدفق الذي تحدده.
<Frame>
![نظرة عامة على مشغلات الأتمتة](/images/enterprise/crew_connectors.png)
</Frame>
### أدلة التكامل
تقدم الأدلة المفصلة شرحاً لعملية الإعداد وأمثلة على سير العمل لكل تكامل:
<CardGroup cols={2}>
<Card title="مشغل Gmail" icon="envelope">
<a href="/ar/enterprise/guides/gmail-trigger">فعّل الطواقم عند وصول رسائل بريد إلكتروني أو تحديث سلاسل المحادثات.</a>
</Card>
{" "}
<Card title="مشغل Google Calendar" icon="calendar-days">
<a href="/ar/enterprise/guides/google-calendar-trigger">
استجب لأحداث التقويم عند إنشائها أو تحديثها أو إلغائها.
</a>
</Card>
{" "}
<Card title="مشغل Google Drive" icon="folder-open">
<a href="/ar/enterprise/guides/google-drive-trigger">
تعامل مع تحميلات وتعديلات وحذف ملفات Drive.
</a>
</Card>
{" "}
<Card title="مشغل Outlook" icon="envelope-open">
<a href="/ar/enterprise/guides/outlook-trigger">
أتمت الاستجابات لرسائل Outlook الجديدة وتحديثات التقويم.
</a>
</Card>
{" "}
<Card title="مشغل OneDrive" icon="cloud">
<a href="/ar/enterprise/guides/onedrive-trigger">
راقب نشاط الملفات وتغييرات المشاركة في OneDrive.
</a>
</Card>
{" "}
<Card title="مشغل Microsoft Teams" icon="comments">
<a href="/ar/enterprise/guides/microsoft-teams-trigger">
ابدأ سير العمل عند إنشاء محادثات Teams جديدة.
</a>
</Card>
{" "}
<Card title="مشغل HubSpot" icon="hubspot">
<a href="/ar/enterprise/guides/hubspot-trigger">
أطلق الأتمتات من سير عمل HubSpot وأحداث دورة الحياة.
</a>
</Card>
{" "}
<Card title="مشغل Salesforce" icon="salesforce">
<a href="/ar/enterprise/guides/salesforce-trigger">
اربط عمليات Salesforce بـ CrewAI لأتمتة CRM.
</a>
</Card>
{" "}
<Card title="مشغل Slack" icon="slack">
<a href="/ar/enterprise/guides/slack-trigger">
ابدأ الطواقم مباشرة من أوامر Slack.
</a>
</Card>
<Card title="مشغل Zapier" icon="bolt">
<a href="/ar/enterprise/guides/zapier-trigger">اربط CrewAI بآلاف التطبيقات المدعومة من Zapier.</a>
</Card>
</CardGroup>
## قدرات المشغلات
مع المشغلات، يمكنك:
- **الاستجابة للأحداث الفورية** - تنفيذ سير العمل تلقائياً عند استيفاء شروط محددة
- **التكامل مع الأنظمة الخارجية** - الاتصال بمنصات مثل Gmail وOutlook وOneDrive وJIRA وSlack وStripe والمزيد
- **توسيع نطاق الأتمتة** - التعامل مع أحداث كبيرة الحجم دون تدخل يدوي
- **الحفاظ على السياق** - الوصول إلى بيانات المشغل داخل طواقمك وتدفقاتك
## إدارة المشغلات
### عرض المشغلات المتاحة
للوصول إلى مشغلات الأتمتة وإدارتها:
1. انتقل إلى عملية النشر في لوحة تحكم CrewAI
2. انقر على علامة تبويب **Triggers** لعرض جميع تكاملات المشغلات المتاحة
<Frame caption="مثال على مشغلات الأتمتة المتاحة لنشر Gmail">
<img
src="/images/enterprise/list-available-triggers.png"
alt="قائمة مشغلات الأتمتة المتاحة"
/>
</Frame>
يعرض هذا العرض جميع تكاملات المشغلات المتاحة لعملية النشر، مع حالة الاتصال الحالية.
### تفعيل وتعطيل المشغلات
يمكن تفعيل أو تعطيل كل مشغل بسهولة باستخدام مفتاح التبديل:
<Frame caption="تفعيل أو تعطيل المشغلات بالتبديل">
<img
src="/images/enterprise/trigger-selected.png"
alt="تفعيل أو تعطيل المشغلات بالتبديل"
/>
</Frame>
- **مُفعّل (تبديل أزرق)**: المشغل نشط وسينفذ عملية النشر تلقائياً عند حدوث الأحداث المحددة
- **مُعطّل (تبديل رمادي)**: المشغل غير نشط ولن يستجيب للأحداث
انقر ببساطة على التبديل لتغيير حالة المشغل. تسري التغييرات فوراً.
### مراقبة عمليات تنفيذ المشغلات
تتبع أداء وسجل عمليات التنفيذ المُشغّلة:
<Frame caption="قائمة عمليات التنفيذ المُشغّلة بواسطة الأتمتة">
<img
src="/images/enterprise/list-executions.png"
alt="قائمة عمليات التنفيذ المُشغّلة بواسطة الأتمتة"
/>
</Frame>
## بناء أتمتات مدفوعة بالمشغلات
قبل بناء أتمتتك، من المفيد فهم هيكل حمولات المشغلات التي ستتلقاها طواقمك وتدفقاتك.
### قائمة فحص إعداد المشغل
قبل ربط مشغل بالإنتاج، تأكد من:
- ربط التكامل تحت **Tools & Integrations** وإكمال خطوات OAuth أو مفتاح API
- تفعيل تبديل المشغل في عملية النشر التي يجب أن تستجيب للأحداث
- توفير متغيرات البيئة المطلوبة (رموز API، معرّفات المستأجر، الأسرار المشتركة)
- إنشاء أو تحديث المهام التي يمكنها تحليل الحمولة الواردة في أول مهمة طاقم أو خطوة تدفق
- تحديد ما إذا كنت ستمرر سياق المشغل تلقائياً باستخدام `allow_crewai_trigger_context`
- إعداد المراقبة — سجلات webhook وسجل تنفيذ CrewAI والتنبيهات الخارجية الاختيارية
### اختبار المشغلات محلياً باستخدام CLI
يوفر CrewAI CLI أوامر قوية لمساعدتك في تطوير واختبار الأتمتات المدفوعة بالمشغلات دون النشر في الإنتاج.
#### عرض المشغلات المتاحة
اعرض جميع المشغلات المتاحة للتكاملات المتصلة:
```bash
crewai triggers list
```
يعرض هذا الأمر جميع المشغلات المتاحة بناءً على تكاملاتك المتصلة، ويظهر:
- اسم التكامل وحالة الاتصال
- أنواع المشغلات المتاحة
- أسماء وأوصاف المشغلات
#### محاكاة تنفيذ المشغل
اختبر طاقمك بحمولات مشغل واقعية قبل النشر:
```bash
crewai triggers run <trigger_name>
```
على سبيل المثال:
```bash
crewai triggers run microsoft_onedrive/file_changed
```
يقوم هذا الأمر بـ:
- تنفيذ طاقمك محلياً
- تمرير حمولة مشغل كاملة وواقعية
- محاكاة كيفية استدعاء طاقمك في الإنتاج بالضبط
<Warning>
**ملاحظات تطوير مهمة:**
- استخدم `crewai triggers run <trigger>` لمحاكاة تنفيذ المشغل أثناء التطوير
- استخدام `crewai run` لن يحاكي استدعاءات المشغل ولن يمرر حمولة المشغل
- بعد النشر، سيتم تنفيذ طاقمك بحمولة المشغل الفعلية
- إذا كان طاقمك يتوقع معاملات غير موجودة في حمولة المشغل، فقد يفشل التنفيذ
</Warning>
### المشغلات مع الطاقم
تعمل تعريفات طاقمك الحالية بسلاسة مع المشغلات، تحتاج فقط إلى مهمة لتحليل الحمولة المستلمة:
```python
@CrewBase
class MyAutomatedCrew:
@agent
def researcher(self) -> Agent:
return Agent(
config=self.agents_config['researcher'],
)
@task
def parse_trigger_payload(self) -> Task:
return Task(
config=self.tasks_config['parse_trigger_payload'],
agent=self.researcher(),
)
@task
def analyze_trigger_content(self) -> Task:
return Task(
config=self.tasks_config['analyze_trigger_data'],
agent=self.researcher(),
)
```
سيتلقى الطاقم تلقائياً حمولة المشغل ويمكنه الوصول إليها عبر آليات سياق CrewAI القياسية.
<Note>
يمكن أن تتضمن مدخلات الطاقم والتدفق `crewai_trigger_payload`. يحقن CrewAI
هذه الحمولة تلقائياً: - المهام: تُلحق بوصف المهمة الأولى افتراضياً ("Trigger Payload: {crewai_trigger_payload}") - التحكم
عبر `allow_crewai_trigger_context`: عيّن `True` للحقن دائماً، `False` لعدم
الحقن أبداً - التدفقات: أي دالة `@start()` تقبل معامل
`crewai_trigger_payload` ستستلمه
</Note>
### التكامل مع التدفقات
للتدفقات، لديك تحكم أكبر في كيفية التعامل مع بيانات المشغل:
#### الوصول إلى حمولة المشغل
جميع دوال `@start()` في تدفقاتك ستقبل معاملاً إضافياً يسمى `crewai_trigger_payload`:
```python
from crewai.flow import Flow, start, listen
class MyAutomatedFlow(Flow):
@start()
def handle_trigger(self, crewai_trigger_payload: dict = None):
"""
This start method can receive trigger data
"""
if crewai_trigger_payload:
# Process the trigger data
trigger_id = crewai_trigger_payload.get('id')
event_data = crewai_trigger_payload.get('payload', {})
# Store in flow state for use by other methods
self.state.trigger_id = trigger_id
self.state.trigger_type = event_data
return event_data
# Handle manual execution
return None
@listen(handle_trigger)
def process_data(self, trigger_data):
"""
Process the data from the trigger
"""
# ... process the trigger
```
#### تشغيل الطواقم من التدفقات
عند تشغيل طاقم داخل تدفق تم تشغيله بمشغل، مرر حمولة المشغل كما هي:
```python
@start()
def delegate_to_crew(self, crewai_trigger_payload: dict = None):
"""
Delegate processing to a specialized crew
"""
crew = MySpecializedCrew()
# Pass the trigger payload to the crew
result = crew.crew().kickoff(
inputs={
'a_custom_parameter': "custom_value",
'crewai_trigger_payload': crewai_trigger_payload
},
)
return result
```
## استكشاف الأخطاء وإصلاحها
**المشغل لا يعمل:**
- تحقق من أن المشغل مُفعّل في علامة تبويب Triggers الخاصة بعملية النشر
- تحقق من حالة اتصال التكامل تحت Tools & Integrations
- تأكد من تهيئة جميع متغيرات البيئة المطلوبة بشكل صحيح
**فشل التنفيذ:**
- تحقق من سجلات التنفيذ لتفاصيل الأخطاء
- استخدم `crewai triggers run <trigger_name>` للاختبار محلياً ورؤية هيكل الحمولة بالضبط
- تحقق من أن طاقمك يمكنه التعامل مع معامل `crewai_trigger_payload`
- تأكد من أن طاقمك لا يتوقع معاملات غير مضمنة في حمولة المشغل
**مشاكل التطوير:**
- اختبر دائماً باستخدام `crewai triggers run <trigger>` قبل النشر لرؤية الحمولة الكاملة
- تذكر أن `crewai run` لا يحاكي استدعاءات المشغل — استخدم `crewai triggers run` بدلاً من ذلك
- استخدم `crewai triggers list` للتحقق من المشغلات المتاحة لتكاملاتك المتصلة
- بعد النشر، سيتلقى طاقمك حمولة المشغل الفعلية، لذا اختبر بدقة محلياً أولاً
تحوّل مشغلات الأتمتة عمليات نشر CrewAI إلى أنظمة استجابة مدفوعة بالأحداث يمكنها التكامل بسلاسة مع عمليات عملك وأدواتك الحالية.

View File

@@ -1,54 +0,0 @@
---
title: "إعداد Azure OpenAI"
description: "تهيئة Azure OpenAI مع Crew Studio لاتصالات LLM المؤسسية"
icon: "microsoft"
mode: "wide"
---
يرشدك هذا الدليل خلال ربط Azure OpenAI مع Crew Studio لعمليات الذكاء الاصطناعي المؤسسية السلسة.
## عملية الإعداد
<Steps>
<Step title="الوصول إلى Azure AI Foundry">
1. في Azure، انتقل إلى [Azure AI Foundry](https://ai.azure.com/) > اختر نشر Azure OpenAI الخاص بك.
2. في القائمة اليسرى، انقر على `Deployments`. إذا لم يكن لديك نشر، أنشئ واحداً بالنموذج المطلوب.
3. بمجرد الإنشاء، اختر النشر وحدد موقع `Target URI` و`Key` على الجانب الأيمن من الصفحة. أبقِ هذه الصفحة مفتوحة، حيث ستحتاج هذه المعلومات.
<Frame>
<img src="/images/enterprise/azure-openai-studio.png" alt="Azure AI Foundry" />
</Frame>
</Step>
<Step title="تهيئة اتصال CrewAI AMP">
4. في علامة تبويب أخرى، افتح `CrewAI AMP > LLM Connections`. سمِّ اتصال LLM، واختر Azure كمزود، واختر نفس النموذج الذي اخترته في Azure.
5. في نفس الصفحة، أضف متغيرات البيئة من الخطوة 3:
- واحد بالاسم `AZURE_DEPLOYMENT_TARGET_URL` (باستخدام Target URI). يجب أن يبدو الرابط هكذا: https://your-deployment.openai.azure.com/openai/deployments/gpt-4o/chat/completions?api-version=2024-08-01-preview
- آخر بالاسم `AZURE_API_KEY` (باستخدام Key).
6. انقر على `Add Connection` لحفظ اتصال LLM.
</Step>
<Step title="ضبط التهيئة الافتراضية">
7. في `CrewAI AMP > Settings > Defaults > Crew Studio LLM Settings`، عيّن اتصال LLM والنموذج الجديدين كافتراضيين.
</Step>
<Step title="تهيئة الوصول إلى الشبكة">
8. تأكد من إعدادات الوصول إلى الشبكة:
- في Azure، انتقل إلى `Azure OpenAI > اختر النشر`.
- انتقل إلى `Resource Management > Networking`.
- تأكد من تفعيل `Allow access from all networks`. إذا كان هذا الإعداد مقيداً، فقد يُحظر وصول CrewAI إلى نقطة نهاية Azure OpenAI.
</Step>
</Steps>
## التحقق
أنت جاهز! سيستخدم Crew Studio الآن اتصال Azure OpenAI الخاص بك. اختبر الاتصال بإنشاء طاقم أو مهمة بسيطة للتأكد من أن كل شيء يعمل بشكل صحيح.
## استكشاف الأخطاء وإصلاحها
إذا واجهت مشكلات:
- تحقق من أن تنسيق Target URI يتطابق مع النمط المتوقع
- تحقق من صحة مفتاح API وأنه يملك الصلاحيات المناسبة
- تأكد من تهيئة الوصول إلى الشبكة للسماح باتصالات CrewAI
- تأكد من أن نموذج النشر يتطابق مع ما هيأته في CrewAI

View File

@@ -1,48 +0,0 @@
---
title: "بناء طاقم"
description: "الطاقم هو مجموعة من الوكلاء الذين يعملون معاً لإتمام مهمة."
icon: "people-arrows"
mode: "wide"
---
## نظرة عامة
يبسّط [CrewAI AMP](https://app.crewai.com) عملية **إنشاء** و**نشر** و**إدارة** وكلاء الذكاء الاصطناعي في بيئات الإنتاج.
## البدء
<iframe
className="w-full aspect-video rounded-xl"
src="https://www.youtube.com/embed/-kSOTtYzgEw"
title="بناء الطواقم باستخدام CrewAI CLI"
frameBorder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowFullScreen
></iframe>
### التثبيت والإعداد
<Card
title="اتبع دليل التثبيت القياسي"
icon="wrench"
href="/ar/installation"
>
اتبع دليل التثبيت القياسي لإعداد CrewAI CLI وإنشاء مشروعك
الأول.
</Card>
### بناء طاقمك
<Card title="دليل البدء السريع" icon="rocket" href="/ar/quickstart">
اتبع دليل البدء السريع لإنشاء أول طاقم وكلاء باستخدام تهيئة
YAML.
</Card>
## الدعم والموارد
للدعم الخاص بالمؤسسات أو الأسئلة، تواصل مع فريق الدعم المخصص على [support@crewai.com](mailto:support@crewai.com).
<Card title="حجز عرض توضيحي" icon="calendar" href="mailto:support@crewai.com">
احجز وقتاً مع فريقنا لمعرفة المزيد عن ميزات Enterprise وكيف يمكنها
إفادة مؤسستك.
</Card>

View File

@@ -1,39 +0,0 @@
---
title: "تصدير OpenTelemetry"
description: "تصدير التتبعات والسجلات من عمليات نشر CrewAI AMP إلى مجمّع OpenTelemetry الخاص بك"
icon: "magnifying-glass-chart"
mode: "wide"
---
يمكن لـ CrewAI AMP تصدير **التتبعات** و**السجلات** من OpenTelemetry من عمليات النشر مباشرة إلى مجمّعك الخاص. يتيح لك ذلك مراقبة أداء الوكلاء وتتبع استدعاءات LLM وتصحيح الأخطاء باستخدام مجموعة المراقبة الحالية.
تتبع بيانات القياس [اتفاقيات OpenTelemetry GenAI الدلالية](https://opentelemetry.io/docs/specs/semconv/gen-ai/) بالإضافة إلى سمات خاصة بـ CrewAI.
## المتطلبات المسبقة
<CardGroup cols={2}>
<Card title="حساب CrewAI AMP" icon="users">
يجب أن يكون لدى مؤسستك حساب CrewAI AMP نشط.
</Card>
<Card title="مجمّع OpenTelemetry" icon="server">
تحتاج إلى نقطة نهاية مجمّع متوافقة مع OpenTelemetry (مثل OTel Collector الخاص بك أو Datadog أو Grafana أو أي واجهة خلفية متوافقة مع OTLP).
</Card>
</CardGroup>
## إعداد مجمّع
1. في CrewAI AMP، انتقل إلى **Settings** > **OpenTelemetry Collectors**.
2. انقر على **Add Collector**.
3. اختر نوع التكامل — **OpenTelemetry Traces** أو **OpenTelemetry Logs**.
4. هيّئ الاتصال:
- **Endpoint** — نقطة نهاية OTLP لمجمّعك (مثل `https://otel-collector.example.com:4317`).
- **Service Name** — اسم لتعريف هذه الخدمة في منصة المراقبة.
- **Custom Headers** *(اختياري)* — أضف رؤوس المصادقة أو التوجيه كأزواج مفتاح-قيمة.
- **Certificate** *(اختياري)* — قدم شهادة TLS إذا كان مجمّعك يتطلبها.
5. انقر على **Save**.
<Frame>![تهيئة مجمّع OpenTelemetry](/images/crewai-otel-collector-config.png)</Frame>
<Tip>
يمكنك إضافة مجمّعات متعددة — على سبيل المثال، واحد للتتبعات وآخر للسجلات، أو الإرسال إلى واجهات خلفية مختلفة لأغراض مختلفة.
</Tip>

View File

@@ -1,136 +0,0 @@
---
title: "خوادم MCP المخصصة"
description: "اربط خوادم MCP الخاصة بك بـ CrewAI AMP مع وصول عام أو مصادقة بمفتاح API أو OAuth 2.0"
icon: "plug"
mode: "wide"
---
يدعم CrewAI AMP الاتصال بأي خادم MCP يُنفّذ [Model Context Protocol](https://modelcontextprotocol.io/). يمكنك إحضار خوادم عامة لا تتطلب مصادقة، وخوادم محمية بمفتاح API أو رمز حامل، وخوادم تستخدم OAuth 2.0 للوصول المفوّض الآمن.
## المتطلبات المسبقة
<CardGroup cols={2}>
<Card title="حساب CrewAI AMP" icon="user">
تحتاج إلى حساب [CrewAI AMP](https://app.crewai.com) نشط.
</Card>
<Card title="رابط خادم MCP" icon="link">
رابط خادم MCP الذي تريد الاتصال به. يجب أن يكون الخادم متاحاً من الإنترنت ويدعم نقل Streamable HTTP.
</Card>
</CardGroup>
## إضافة خادم MCP مخصص
<Steps>
<Step title="فتح الأدوات والتكاملات">
انتقل إلى **Tools & Integrations** في الشريط الجانبي الأيسر لـ CrewAI AMP، ثم اختر علامة تبويب **Connections**.
</Step>
<Step title="بدء إضافة خادم MCP مخصص">
انقر على زر **Add Custom MCP Server**. سيظهر مربع حوار مع نموذج التهيئة.
</Step>
<Step title="ملء المعلومات الأساسية">
- **Name** (مطلوب): اسم وصفي لخادم MCP (مثل "My Internal Tools Server").
- **Description**: ملخص اختياري لما يقدمه خادم MCP هذا.
- **Server URL** (مطلوب): الرابط الكامل لنقطة نهاية خادم MCP (مثل `https://my-server.example.com/mcp`).
</Step>
<Step title="اختيار طريقة المصادقة">
اختر إحدى طرق المصادقة الثلاث المتاحة بناءً على كيفية تأمين خادم MCP. راجع الأقسام أدناه لتفاصيل كل طريقة.
</Step>
<Step title="إضافة رؤوس مخصصة (اختياري)">
إذا كان خادم MCP يتطلب رؤوساً إضافية في كل طلب (مثل معرّفات المستأجر أو رؤوس التوجيه)، انقر على **+ Add Header** وقدم اسم الرأس وقيمته. يمكنك إضافة رؤوس مخصصة متعددة.
</Step>
<Step title="إنشاء الاتصال">
انقر على **Create MCP Server** لحفظ الاتصال. سيظهر خادم MCP المخصص الآن في قائمة الاتصالات وستكون أدواته متاحة للاستخدام في طواقمك.
</Step>
</Steps>
## طرق المصادقة
### بدون مصادقة
اختر هذا الخيار عندما يكون خادم MCP متاحاً للجمهور ولا يتطلب أي بيانات اعتماد. هذا شائع للخوادم مفتوحة المصدر أو الخوادم الداخلية العاملة خلف VPN.
### رمز المصادقة
استخدم هذه الطريقة عندما يكون خادم MCP محمياً بمفتاح API أو رمز حامل.
<Frame>
<img src="/images/enterprise/custom-mcp-auth-token.png" alt="خادم MCP مخصص برمز مصادقة" />
</Frame>
| الحقل | مطلوب | الوصف |
|-------|-------|-------|
| **Header Name** | نعم | اسم رأس HTTP الذي يحمل الرمز (مثل `X-API-Key`، `Authorization`). |
| **Value** | نعم | مفتاح API أو رمز الحامل الخاص بك. |
| **Add to** | لا | أين يتم إرفاق بيانات الاعتماد — **Header** (افتراضي) أو **Query parameter**. |
<Tip>
إذا كان خادمك يتوقع رمز `Bearer` في رأس `Authorization`، عيّن Header Name إلى `Authorization` والقيمة إلى `Bearer <your-token>`.
</Tip>
### OAuth 2.0
استخدم هذه الطريقة لخوادم MCP التي تتطلب تفويض OAuth 2.0. سيتعامل CrewAI مع تدفق OAuth الكامل، بما في ذلك تحديث الرمز.
<Frame>
<img src="/images/enterprise/custom-mcp-oauth.png" alt="خادم MCP مخصص مع OAuth 2.0" />
</Frame>
| الحقل | مطلوب | الوصف |
|-------|-------|-------|
| **Redirect URI** | — | مُعبأ مسبقاً وللقراءة فقط. انسخ هذا الرابط وسجّله كرابط إعادة توجيه مصرّح به في مزود OAuth. |
| **Authorization Endpoint** | نعم | الرابط الذي يُوجَّه إليه المستخدمون لتفويض الوصول (مثل `https://auth.example.com/oauth/authorize`). |
| **Token Endpoint** | نعم | الرابط المستخدم لتبادل رمز التفويض برمز وصول (مثل `https://auth.example.com/oauth/token`). |
| **Client ID** | نعم | معرّف عميل OAuth الصادر من مزودك. |
| **Client Secret** | لا | سر عميل OAuth. غير مطلوب للعملاء العامين باستخدام PKCE. |
| **Scopes** | لا | قائمة نطاقات مفصولة بمسافات للطلب (مثل `read write`). |
| **Token Auth Method** | لا | كيفية إرسال بيانات اعتماد العميل عند تبادل الرموز — **Standard (POST body)** أو **Basic Auth (header)**. الافتراضي هو Standard. |
| **PKCE Supported** | لا | فعّل إذا كان مزود OAuth يدعم Proof Key for Code Exchange. موصى به لتحسين الأمان. |
<Info>
**اكتشاف تهيئة OAuth**: إذا كان مزود OAuth يدعم OpenID Connect Discovery، انقر على رابط **Discover OAuth Config** لملء نقاط نهاية التفويض والرمز تلقائياً من رابط `/.well-known/openid-configuration` الخاص بالمزود.
</Info>
#### إعداد OAuth 2.0 خطوة بخطوة
<Steps>
<Step title="تسجيل رابط إعادة التوجيه">
انسخ **Redirect URI** المعروض في النموذج وأضفه كرابط إعادة توجيه مصرّح به في إعدادات تطبيق مزود OAuth.
</Step>
<Step title="إدخال نقاط النهاية وبيانات الاعتماد">
املأ **Authorization Endpoint** و**Token Endpoint** و**Client ID**، واختيارياً **Client Secret** و**Scopes**.
</Step>
<Step title="تهيئة طريقة تبادل الرمز">
اختر **Token Auth Method** المناسبة. معظم المزودين يستخدمون الافتراضي **Standard (POST body)**. بعض المزودين القدامى يتطلبون **Basic Auth (header)**.
</Step>
<Step title="تفعيل PKCE (موصى به)">
حدد **PKCE Supported** إذا كان مزودك يدعمه. يضيف PKCE طبقة أمان إضافية لتدفق رمز التفويض وموصى به لجميع التكاملات الجديدة.
</Step>
<Step title="الإنشاء والتفويض">
انقر على **Create MCP Server**. سيتم توجيهك إلى مزود OAuth لتفويض الوصول. بمجرد التفويض، سيخزن CrewAI الرموز ويحدّثها تلقائياً حسب الحاجة.
</Step>
</Steps>
## استخدام خادم MCP المخصص
بمجرد الاتصال، تظهر أدوات خادم MCP المخصص جنباً إلى جنب مع الاتصالات المدمجة في صفحة **Tools & Integrations**. يمكنك:
- **تعيين الأدوات للوكلاء** في طواقمك تماماً كأي أداة CrewAI أخرى.
- **إدارة الرؤية** للتحكم في أعضاء الفريق الذين يمكنهم استخدام الخادم.
- **تعديل أو إزالة** الاتصال في أي وقت من قائمة الاتصالات.
<Warning>
إذا أصبح خادم MCP غير قابل للوصول أو انتهت صلاحية بيانات الاعتماد، ستفشل استدعاءات الأدوات التي تستخدم ذلك الخادم. تأكد من استقرار رابط الخادم وتحديث بيانات الاعتماد.
</Warning>
<Card title="تحتاج مساعدة؟" icon="headset" href="mailto:support@crewai.com">
تواصل مع فريق الدعم للمساعدة في تهيئة خادم MCP المخصص أو استكشاف الأخطاء.
</Card>

View File

@@ -1,445 +0,0 @@
---
title: "النشر على AMP"
description: "انشر طاقمك أو تدفقك على CrewAI AMP"
icon: "rocket"
mode: "wide"
---
<Note>
بعد إنشاء طاقم أو تدفق محلياً (أو عبر Crew Studio)، الخطوة التالية هي
نشره على منصة CrewAI AMP. يغطي هذا الدليل طرق نشر متعددة
لمساعدتك في اختيار النهج الأفضل لسير عملك.
</Note>
## المتطلبات المسبقة
<CardGroup cols={2}>
<Card title="مشروع جاهز للنشر" icon="check-circle">
يجب أن يكون لديك طاقم أو تدفق يعمل بنجاح محلياً.
اتبع [دليل التحضير](/ar/enterprise/guides/prepare-for-deployment) للتحقق من بنية مشروعك.
</Card>
<Card title="مستودع GitHub" icon="github">
يجب أن يكون الكود في مستودع GitHub (لطريقة تكامل
GitHub)
</Card>
</CardGroup>
<Info>
**الطواقم مقابل التدفقات**: يمكن نشر كلا نوعي المشاريع كـ "أتمتات" على CrewAI AMP.
عملية النشر هي نفسها، لكن لهما بنى مشاريع مختلفة.
راجع [التحضير للنشر](/ar/enterprise/guides/prepare-for-deployment) للتفاصيل.
</Info>
## الخيار 1: النشر باستخدام CrewAI CLI
يوفر CLI أسرع طريقة لنشر الطواقم أو التدفقات المطورة محلياً على منصة AMP.
يكتشف CLI تلقائياً نوع مشروعك من `pyproject.toml` ويبني وفقاً لذلك.
<Steps>
<Step title="تثبيت CrewAI CLI">
إذا لم تكن قد فعلت بالفعل، ثبّت CrewAI CLI:
```bash
pip install crewai[tools]
```
<Tip>
يأتي CLI مع حزمة CrewAI الرئيسية، لكن الإضافة `[tools]` تضمن حصولك على جميع اعتماديات النشر.
</Tip>
</Step>
<Step title="المصادقة مع منصة Enterprise">
أولاً، تحتاج لمصادقة CLI مع منصة CrewAI AMP:
```bash
# إذا كان لديك حساب CrewAI AMP بالفعل، أو تريد إنشاء واحد:
crewai login
```
عند تشغيل أي من الأمرين، سيقوم CLI بـ:
1. عرض رابط ورمز جهاز فريد
2. فتح متصفحك على صفحة المصادقة
3. طلب تأكيد الجهاز
4. إتمام عملية المصادقة
عند المصادقة الناجحة، سترى رسالة تأكيد في الطرفية!
</Step>
<Step title="إنشاء عملية نشر">
من مجلد مشروعك، شغّل:
```bash
crewai deploy create
```
سيقوم هذا الأمر بـ:
1. اكتشاف معلومات مستودع GitHub
2. تحديد متغيرات البيئة في ملف `.env` المحلي
3. نقل هذه المتغيرات بأمان إلى منصة Enterprise
4. إنشاء عملية نشر جديدة بمعرّف فريد
عند الإنشاء الناجح، سترى رسالة مثل:
```shell
Deployment created successfully!
Name: your_project_name
Deployment ID: 01234567-89ab-cdef-0123-456789abcdef
Current Status: Deploy Enqueued
```
</Step>
<Step title="مراقبة تقدم النشر">
تتبع حالة النشر بـ:
```bash
crewai deploy status
```
للسجلات المفصلة لعملية البناء:
```bash
crewai deploy logs
```
<Tip>
يستغرق النشر الأول عادة حوالي دقيقة واحدة.
</Tip>
</Step>
</Steps>
## أوامر CLI إضافية
يقدم CrewAI CLI عدة أوامر لإدارة عمليات النشر:
```bash
# عرض جميع عمليات النشر
crewai deploy list
# الحصول على حالة النشر
crewai deploy status
# عرض سجلات النشر
crewai deploy logs
# دفع التحديثات بعد تغييرات الكود
crewai deploy push
# إزالة عملية نشر
crewai deploy remove <deployment_id>
```
## الخيار 2: النشر مباشرة عبر واجهة الويب
يمكنك أيضاً نشر طواقمك أو تدفقاتك مباشرة عبر واجهة ويب CrewAI AMP بربط حساب GitHub. لا يتطلب هذا النهج استخدام CLI على جهازك المحلي. تكتشف المنصة تلقائياً نوع مشروعك وتتعامل مع البناء بشكل مناسب.
<Steps>
<Step title="الدفع إلى GitHub">
تحتاج لدفع طاقمك إلى مستودع GitHub. إذا لم تكن قد أنشأت طاقماً بعد، يمكنك [اتباع هذا الدليل](/ar/quickstart).
</Step>
<Step title="ربط GitHub بـ CrewAI AMP">
1. سجّل الدخول إلى [CrewAI AMP](https://app.crewai.com)
2. انقر على زر "Connect GitHub"
<Frame>
![زر ربط GitHub](/images/enterprise/connect-github.png)
</Frame>
</Step>
<Step title="اختيار المستودع">
بعد ربط حساب GitHub، ستتمكن من اختيار المستودع للنشر:
<Frame>
![اختيار المستودع](/images/enterprise/select-repo.png)
</Frame>
</Step>
<Step title="تعيين متغيرات البيئة">
قبل النشر، ستحتاج لإعداد متغيرات البيئة للاتصال بمزود LLM أو خدمات أخرى:
1. يمكنك إضافة المتغيرات فردياً أو بشكل جماعي
2. أدخل متغيرات البيئة بتنسيق `KEY=VALUE` (واحد لكل سطر)
<Frame>
![تعيين متغيرات البيئة](/images/enterprise/set-env-variables.png)
</Frame>
<Info>
تستخدم حزم Python خاصة؟ ستحتاج لإضافة بيانات اعتماد السجل هنا أيضاً.
راجع [سجلات الحزم الخاصة](/ar/enterprise/guides/private-package-registry) للمتغيرات المطلوبة.
</Info>
</Step>
<Step title="نشر طاقمك">
1. انقر على زر "Deploy" لبدء عملية النشر
2. يمكنك مراقبة التقدم عبر شريط التقدم
3. يستغرق النشر الأول عادة حوالي دقيقة واحدة
<Frame>
![تقدم النشر](/images/enterprise/deploy-progress.png)
</Frame>
بمجرد اكتمال النشر، سترى:
- رابط طاقمك الفريد
- رمز Bearer لحماية API طاقمك
- زر "Delete" إذا كنت تحتاج لإزالة النشر
</Step>
</Steps>
## الخيار 3: إعادة النشر باستخدام API (تكامل CI/CD)
لعمليات النشر الآلية في خطوط أنابيب CI/CD، يمكنك استخدام CrewAI API لتشغيل إعادة نشر الطواقم الحالية. هذا مفيد بشكل خاص لـ GitHub Actions وJenkins أو سير عمل الأتمتة الأخرى.
<Steps>
<Step title="الحصول على رمز الوصول الشخصي">
انتقل إلى إعدادات حساب CrewAI AMP لإنشاء رمز API:
1. انتقل إلى [app.crewai.com](https://app.crewai.com)
2. انقر على **Settings** → **Account** → **Personal Access Token**
3. أنشئ رمزاً جديداً وانسخه بأمان
4. خزّن هذا الرمز كسر في نظام CI/CD
</Step>
<Step title="إيجاد UUID الأتمتة">
حدد موقع المعرّف الفريد لطاقمك المنشور:
1. انتقل إلى **Automations** في لوحة تحكم CrewAI AMP
2. اختر الأتمتة/الطاقم الحالي
3. انقر على **Additional Details**
4. انسخ **UUID** — يحدد هذا نشر طاقمك المحدد
</Step>
<Step title="تشغيل إعادة النشر عبر API">
استخدم نقطة نهاية Deploy API لتشغيل إعادة النشر:
```bash
curl -i -X POST \
-H "Authorization: Bearer YOUR_PERSONAL_ACCESS_TOKEN" \
https://app.crewai.com/crewai_plus/api/v1/crews/YOUR-AUTOMATION-UUID/deploy
# HTTP/2 200
# content-type: application/json
#
# {
# "uuid": "your-automation-uuid",
# "status": "Deploy Enqueued",
# "public_url": "https://your-crew-deployment.crewai.com",
# "token": "your-bearer-token"
# }
```
<Info>
إذا تم إنشاء أتمتتك متصلة بـ Git أولاً، سيسحب API تلقائياً أحدث التغييرات من مستودعك قبل إعادة النشر.
</Info>
</Step>
<Step title="مثال تكامل GitHub Actions">
إليك سير عمل GitHub Actions مع مشغلات نشر أكثر تعقيداً:
```yaml
name: Deploy CrewAI Automation
on:
push:
branches: [ main ]
pull_request:
types: [ labeled ]
release:
types: [ published ]
jobs:
deploy:
runs-on: ubuntu-latest
if: |
(github.event_name == 'push' && github.ref == 'refs/heads/main') ||
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'deploy')) ||
(github.event_name == 'release')
steps:
- name: Trigger CrewAI Redeployment
run: |
curl -X POST \
-H "Authorization: Bearer ${{ secrets.CREWAI_PAT }}" \
https://app.crewai.com/crewai_plus/api/v1/crews/${{ secrets.CREWAI_AUTOMATION_UUID }}/deploy
```
<Tip>
أضف `CREWAI_PAT` و`CREWAI_AUTOMATION_UUID` كأسرار مستودع. لعمليات نشر PR، أضف تسمية "deploy" لتشغيل سير العمل.
</Tip>
</Step>
</Steps>
## التفاعل مع أتمتتك المنشورة
بمجرد اكتمال النشر، يمكنك الوصول إلى طاقمك عبر:
1. **REST API**: تنشئ المنصة نقطة نهاية HTTPS فريدة بهذه المسارات الرئيسية:
- `/inputs`: يعرض معاملات الإدخال المطلوبة
- `/kickoff`: يبدأ التنفيذ بالمدخلات المقدمة
- `/status/{kickoff_id}`: يتحقق من حالة التنفيذ
2. **واجهة الويب**: زر [app.crewai.com](https://app.crewai.com) للوصول إلى:
- **علامة تبويب Status**: عرض معلومات النشر وتفاصيل نقطة نهاية API ورمز المصادقة
- **علامة تبويب Run**: تمثيل مرئي لبنية طاقمك
- **علامة تبويب Executions**: سجل جميع عمليات التنفيذ
- **علامة تبويب Metrics**: تحليلات الأداء
- **علامة تبويب Traces**: رؤى التنفيذ المفصلة
### تشغيل عملية تنفيذ
من لوحة تحكم Enterprise، يمكنك:
1. النقر على اسم طاقمك لفتح تفاصيله
2. اختيار "Trigger Crew" من واجهة الإدارة
3. إدخال المدخلات المطلوبة في النافذة المنبثقة
4. مراقبة التقدم أثناء مرور التنفيذ عبر خط الأنابيب
### المراقبة والتحليلات
توفر منصة Enterprise ميزات مراقبة شاملة:
- **إدارة التنفيذ**: تتبع عمليات التشغيل النشطة والمكتملة
- **التتبعات**: تحليلات مفصلة لكل عملية تنفيذ
- **المقاييس**: استخدام الرموز وأوقات التنفيذ والتكاليف
- **عرض الجدول الزمني**: تمثيل مرئي لتسلسل المهام
### ميزات متقدمة
تقدم منصة Enterprise أيضاً:
- **إدارة متغيرات البيئة**: تخزين وإدارة مفاتيح API بأمان
- **اتصالات LLM**: تهيئة التكاملات مع مزودي LLM المختلفين
- **مستودع الأدوات المخصصة**: إنشاء ومشاركة وتثبيت الأدوات
- **Crew Studio**: بناء الطواقم عبر واجهة محادثة دون كتابة كود
## استكشاف أخطاء النشر وإصلاحها
إذا فشل النشر، تحقق من هذه المشكلات الشائعة:
### فشل البناء
#### ملف uv.lock مفقود
**العرض**: فشل البناء مبكراً مع أخطاء حل الاعتماديات
**الحل**: أنشئ ملف القفل وارفعه:
```bash
uv lock
git add uv.lock
git commit -m "Add uv.lock for deployment"
git push
```
<Warning>
ملف `uv.lock` مطلوب لجميع عمليات النشر. بدونه، لا يمكن للمنصة
تثبيت اعتمادياتك بشكل موثوق.
</Warning>
#### بنية المشروع الخاطئة
**العرض**: أخطاء "Could not find entry point" أو "Module not found"
**الحل**: تحقق من أن مشروعك يتطابق مع البنية المتوقعة:
- **كل من الطواقم والتدفقات**: يجب أن تكون نقطة الدخول في `src/project_name/main.py`
- **الطواقم**: تستخدم دالة `run()` كنقطة دخول
- **التدفقات**: تستخدم دالة `kickoff()` كنقطة دخول
راجع [التحضير للنشر](/ar/enterprise/guides/prepare-for-deployment) لمخططات البنية المفصلة.
#### مُزخرف CrewBase مفقود
**العرض**: أخطاء "Crew not found" أو "Config not found" أو أخطاء تهيئة الوكيل/المهمة
**الحل**: تأكد من أن **جميع** فئات الطاقم تستخدم مُزخرف `@CrewBase`:
```python
from crewai.project import CrewBase, agent, crew, task
@CrewBase # This decorator is REQUIRED
class YourCrew():
"""Your crew description"""
@agent
def my_agent(self) -> Agent:
return Agent(
config=self.agents_config['my_agent'], # type: ignore[index]
verbose=True
)
# ... rest of crew definition
```
<Info>
ينطبق هذا على الطواقم المستقلة والطواقم المضمنة داخل مشاريع التدفق.
كل فئة طاقم تحتاج المُزخرف.
</Info>
#### نوع pyproject.toml غير صحيح
**العرض**: نجاح البناء لكن فشل وقت التشغيل، أو سلوك غير متوقع
**الحل**: تحقق من أن قسم `[tool.crewai]` يتطابق مع نوع مشروعك:
```toml
# For Crew projects:
[tool.crewai]
type = "crew"
# For Flow projects:
[tool.crewai]
type = "flow"
```
### فشل وقت التشغيل
#### فشل اتصال LLM
**العرض**: أخطاء مفتاح API، "model not found"، أو فشل المصادقة
**الحل**:
1. تحقق من صحة تعيين مفتاح API لمزود LLM في متغيرات البيئة
2. تأكد من تطابق أسماء متغيرات البيئة مع ما يتوقعه الكود
3. اختبر محلياً بنفس متغيرات البيئة بالضبط قبل النشر
#### أخطاء تنفيذ الطاقم
**العرض**: يبدأ الطاقم لكن يفشل أثناء التنفيذ
**الحل**:
1. تحقق من سجلات التنفيذ في لوحة تحكم AMP (علامة تبويب Traces)
2. تحقق من أن جميع الأدوات لديها مفاتيح API المطلوبة مُهيأة
3. تأكد من صحة تهيئات الوكلاء في `agents.yaml`
4. تحقق من تهيئات المهام في `tasks.yaml` بحثاً عن أخطاء الصياغة
<Card title="تحتاج مساعدة؟" icon="headset" href="mailto:support@crewai.com">
تواصل مع فريق الدعم للمساعدة في مشاكل النشر أو أسئلة حول
منصة AMP.
</Card>

View File

@@ -1,182 +0,0 @@
---
title: "تفعيل Crew Studio"
description: "تفعيل Crew Studio على CrewAI AMP"
icon: "comments"
mode: "wide"
---
<Tip>
Crew Studio هو أداة قوية **بدون كود/منخفضة الكود** تتيح لك بسرعة
بناء أو هيكلة الطواقم عبر واجهة محادثة.
</Tip>
## ما هو Crew Studio؟
Crew Studio هو طريقة مبتكرة لإنشاء طواقم وكلاء الذكاء الاصطناعي بدون كتابة كود.
<Frame>
![واجهة Crew Studio](/images/enterprise/crew-studio-interface.png)
</Frame>
مع Crew Studio، يمكنك:
- الدردشة مع مساعد الطاقم لوصف مشكلتك
- إنشاء الوكلاء والمهام تلقائياً
- اختيار الأدوات المناسبة
- تهيئة المدخلات الضرورية
- إنشاء كود قابل للتنزيل للتخصيص
- النشر مباشرة على منصة CrewAI AMP
## خطوات التهيئة
قبل البدء باستخدام Crew Studio، تحتاج لتهيئة اتصالات LLM:
<Steps>
<Step title="إعداد اتصال LLM">
انتقل إلى علامة تبويب **LLM Connections** في لوحة تحكم CrewAI AMP وأنشئ اتصال LLM جديداً.
<Note>
يمكنك استخدام أي مزود LLM تريده ويدعمه CrewAI.
</Note>
هيّئ اتصال LLM:
- أدخل `Connection Name` (مثل `OpenAI`)
- اختر مزود النموذج: `openai` أو `azure`
- اختر النماذج التي تريد استخدامها في طواقم Studio
- نوصي بـ `gpt-4o` و`o1-mini` و`gpt-4o-mini` على الأقل
- أضف مفتاح API كمتغير بيئة:
- لـ OpenAI: أضف `OPENAI_API_KEY` مع مفتاح API
- لـ Azure OpenAI: راجع [هذه المقالة](https://blog.crewai.com/configuring-azure-openai-with-crewai-a-comprehensive-guide/) لتفاصيل التهيئة
- انقر على `Add Connection` لحفظ التهيئة
<Frame>
![تهيئة اتصال LLM](/images/enterprise/llm-connection-config.png)
</Frame>
</Step>
<Step title="التحقق من إضافة الاتصال">
بمجرد إتمام الإعداد، سترى الاتصال الجديد مُضافاً إلى قائمة الاتصالات المتاحة.
<Frame>
![تم إضافة الاتصال](/images/enterprise/connection-added.png)
</Frame>
</Step>
<Step title="تهيئة إعدادات LLM الافتراضية">
في القائمة الرئيسية، انتقل إلى **Settings → Defaults** وهيّئ إعدادات LLM الافتراضية:
- اختر النماذج الافتراضية للوكلاء والمكونات الأخرى
- عيّن التهيئات الافتراضية لـ Crew Studio
انقر على `Save Settings` لتطبيق تغييراتك.
<Frame>
![تهيئة إعدادات LLM الافتراضية](/images/enterprise/llm-defaults.png)
</Frame>
</Step>
</Steps>
## استخدام Crew Studio
الآن بعد تهيئة اتصال LLM والإعدادات الافتراضية، أنت جاهز لبدء استخدام Crew Studio!
<Steps>
<Step title="الوصول إلى Studio">
انتقل إلى قسم **Studio** في لوحة تحكم CrewAI AMP.
</Step>
<Step title="بدء محادثة">
ابدأ محادثة مع مساعد الطاقم بوصف المشكلة التي تريد حلها:
```md
I need a crew that can research the latest AI developments and create a summary report.
```
سيطرح مساعد الطاقم أسئلة توضيحية لفهم متطلباتك بشكل أفضل.
</Step>
<Step title="مراجعة الطاقم المُنشأ">
راجع تهيئة الطاقم المُنشأ، بما في ذلك:
- الوكلاء وأدوارهم
- المهام المطلوب تنفيذها
- المدخلات المطلوبة
- الأدوات المستخدمة
هذه فرصتك لتنقيح التهيئة قبل المتابعة.
</Step>
<Step title="النشر أو التنزيل">
بمجرد رضاك عن التهيئة، يمكنك:
- تنزيل الكود المُنشأ للتخصيص المحلي
- نشر الطاقم مباشرة على منصة CrewAI AMP
- تعديل التهيئة وإعادة إنشاء الطاقم
</Step>
<Step title="اختبار طاقمك">
بعد النشر، اختبر طاقمك بمدخلات نموذجية للتأكد من أنه يعمل كما هو متوقع.
</Step>
</Steps>
<Tip>
للحصول على أفضل النتائج، قدم أوصافاً واضحة ومفصلة لما تريد أن
يحققه طاقمك. ضمّن مدخلات ومخرجات محددة متوقعة في
وصفك.
</Tip>
## مثال على سير العمل
إليك سير عمل نموذجي لإنشاء طاقم مع Crew Studio:
<Steps>
<Step title="وصف مشكلتك">
ابدأ بوصف مشكلتك:
```md
I need a crew that can analyze financial news and provide investment recommendations
```
</Step>
{" "}
<Step title="الإجابة على الأسئلة">
أجب على أسئلة التوضيح من مساعد الطاقم لتنقيح
متطلباتك.
</Step>
<Step title="مراجعة الخطة">
راجع خطة الطاقم المُنشأة، التي قد تتضمن:
- وكيل بحث لجمع الأخبار المالية
- وكيل تحليل لتفسير البيانات
- وكيل توصيات لتقديم نصائح استثمارية
</Step>
{" "}
<Step title="الموافقة أو التعديل">
وافق على الخطة أو اطلب تغييرات إذا لزم الأمر.
</Step>
{" "}
<Step title="التنزيل أو النشر">
نزّل الكود للتخصيص أو انشر مباشرة على المنصة.
</Step>
<Step title="الاختبار والتنقيح">
اختبر طاقمك بمدخلات نموذجية ونقّح حسب الحاجة.
</Step>
</Steps>
<Card title="تحتاج مساعدة؟" icon="headset" href="mailto:support@crewai.com">
تواصل مع فريق الدعم للمساعدة في Crew Studio أو أي ميزات أخرى في CrewAI
AMP.
</Card>

View File

@@ -1,97 +0,0 @@
---
title: "مشغل Gmail"
description: "تشغيل الأتمتات عند حدوث أحداث Gmail (مثل رسائل بريد إلكتروني جديدة، تسميات)."
icon: "envelope"
mode: "wide"
---
## نظرة عامة
استخدم مشغل Gmail لتشغيل طواقمك المنشورة عند حدوث أحداث Gmail في الحسابات المتصلة، مثل استلام رسالة بريد إلكتروني جديدة أو رسائل تطابق تسمية/فلتر.
<Tip>
تأكد من ربط Gmail في Tools & Integrations وتفعيل المشغل
لعملية النشر.
</Tip>
## تفعيل مشغل Gmail
1. افتح عملية النشر في CrewAI AMP
2. انتقل إلى علامة تبويب **Triggers**
3. حدد موقع **Gmail** وبدّل مفتاح التبديل للتفعيل
<Frame>
<img
src="/images/enterprise/trigger-selected.png"
alt="تفعيل أو تعطيل المشغلات بالتبديل"
/>
</Frame>
## مثال: معالجة الرسائل الجديدة
عند وصول رسالة بريد إلكتروني جديدة، سيرسل مشغل Gmail الحمولة إلى طاقمك أو تدفقك. فيما يلي مثال على طاقم يحلل ويعالج حمولة المشغل.
```python
@CrewBase
class GmailProcessingCrew:
@agent
def parser(self) -> Agent:
return Agent(
config=self.agents_config['parser'],
)
@task
def parse_gmail_payload(self) -> Task:
return Task(
config=self.tasks_config['parse_gmail_payload'],
agent=self.parser(),
)
@task
def act_on_email(self) -> Task:
return Task(
config=self.tasks_config['act_on_email'],
agent=self.parser(),
)
```
ستكون حمولة Gmail متاحة عبر آليات السياق القياسية.
### الاختبار المحلي
اختبر تكامل مشغل Gmail محلياً باستخدام CrewAI CLI:
```bash
# عرض جميع المشغلات المتاحة
crewai triggers list
# محاكاة مشغل Gmail بحمولة واقعية
crewai triggers run gmail/new_email_received
```
سينفذ أمر `crewai triggers run` طاقمك بحمولة Gmail كاملة، مما يتيح لك اختبار منطق التحليل قبل النشر.
<Warning>
استخدم `crewai triggers run gmail/new_email_received` (وليس `crewai run`) لمحاكاة
تنفيذ المشغل أثناء التطوير. بعد النشر، سيتلقى طاقمك
حمولة المشغل تلقائياً.
</Warning>
## مراقبة عمليات التنفيذ
تتبع سجل وأداء عمليات التشغيل المُشغّلة:
<Frame>
<img
src="/images/enterprise/list-executions.png"
alt="قائمة عمليات التنفيذ المُشغّلة بواسطة الأتمتة"
/>
</Frame>
## استكشاف الأخطاء وإصلاحها
- تأكد من ربط Gmail في Tools & Integrations
- تحقق من تفعيل مشغل Gmail في علامة تبويب Triggers
- اختبر محلياً بـ `crewai triggers run gmail/new_email_received` لرؤية هيكل الحمولة بالضبط
- تحقق من سجلات التنفيذ وتأكد من تمرير الحمولة كـ `crewai_trigger_payload`
- تذكر: استخدم `crewai triggers run` (وليس `crewai run`) لمحاكاة تنفيذ المشغل

View File

@@ -1,83 +0,0 @@
---
title: "مشغل Google Calendar"
description: "تشغيل الطواقم عند إنشاء أو تحديث أو إلغاء أحداث Google Calendar"
icon: "calendar"
mode: "wide"
---
## نظرة عامة
استخدم مشغل Google Calendar لإطلاق الأتمتات كلما تغيرت أحداث التقويم. تشمل حالات الاستخدام الشائعة إحاطة الفريق قبل اجتماع، وإخطار أصحاب المصلحة عند إلغاء حدث هام، أو تلخيص الجداول اليومية.
<Tip>
تأكد من ربط Google Calendar في **Tools & Integrations** وتفعيله
لعملية النشر التي تريد أتمتتها.
</Tip>
## تفعيل مشغل Google Calendar
1. افتح عملية النشر في CrewAI AMP
2. انتقل إلى علامة تبويب **Triggers**
3. حدد موقع **Google Calendar** وبدّل مفتاح التبديل للتفعيل
<Frame>
<img
src="/images/enterprise/calendar-trigger.png"
alt="تفعيل أو تعطيل المشغلات بالتبديل"
/>
</Frame>
## مثال: تلخيص تفاصيل الاجتماع
المقتطف أدناه يعكس مثال `calendar-event-crew.py` في مستودع المشغلات. يحلل الحمولة، ويحلل الحاضرين والتوقيت، وينتج ملخصاً للاجتماع للأدوات اللاحقة.
```python
from calendar_event_crew import GoogleCalendarEventTrigger
crew = GoogleCalendarEventTrigger().crew()
result = crew.kickoff({
"crewai_trigger_payload": calendar_payload,
})
print(result.raw)
```
استخدم `crewai_trigger_payload` تماماً كما يتم تسليمه من المشغل حتى يتمكن الطاقم من استخراج الحقول المناسبة.
## الاختبار المحلي
اختبر تكامل مشغل Google Calendar محلياً باستخدام CrewAI CLI:
```bash
# عرض جميع المشغلات المتاحة
crewai triggers list
# محاكاة مشغل Google Calendar بحمولة واقعية
crewai triggers run google_calendar/event_changed
```
سينفذ أمر `crewai triggers run` طاقمك بحمولة Calendar كاملة، مما يتيح لك اختبار منطق التحليل قبل النشر.
<Warning>
استخدم `crewai triggers run google_calendar/event_changed` (وليس `crewai run`) لمحاكاة
تنفيذ المشغل أثناء التطوير. بعد النشر، سيتلقى طاقمك
حمولة المشغل تلقائياً.
</Warning>
## مراقبة عمليات التنفيذ
تتبع قائمة **Executions** في لوحة تحكم النشر كل عملية تشغيل مُشغّلة وتعرض بيانات الحمولة الوصفية وملخصات المخرجات والأخطاء.
<Frame>
<img
src="/images/enterprise/list-executions.png"
alt="قائمة عمليات التنفيذ المُشغّلة بواسطة الأتمتة"
/>
</Frame>
## استكشاف الأخطاء وإصلاحها
- تأكد من ربط حساب Google الصحيح وتفعيل المشغل
- اختبر محلياً بـ `crewai triggers run google_calendar/event_changed` لرؤية هيكل الحمولة بالضبط
- تأكد من أن سير عملك يتعامل مع أحداث اليوم الكامل (الحمولات تستخدم `start.date` و`end.date` بدلاً من الطوابع الزمنية)
- تحقق من سجلات التنفيذ إذا كانت التذكيرات أو مصفوفات الحاضرين مفقودة — قد تحد صلاحيات التقويم من الحقول في الحمولة
- تذكر: استخدم `crewai triggers run` (وليس `crewai run`) لمحاكاة تنفيذ المشغل

View File

@@ -1,80 +0,0 @@
---
title: "مشغل Google Drive"
description: "الاستجابة لأحداث ملفات Google Drive بطواقم آلية"
icon: "folder"
mode: "wide"
---
## نظرة عامة
شغّل أتمتاتك عند إنشاء أو تحديث أو حذف ملفات في Google Drive. تشمل سير العمل النموذجية تلخيص المحتوى المُحمّل حديثاً، وتطبيق سياسات المشاركة، أو إخطار المالكين عند تغيير ملفات هامة.
<Tip>
اربط Google Drive في **Tools & Integrations** وتأكد من تفعيل المشغل
للأتمتة التي تريد مراقبتها.
</Tip>
## تفعيل مشغل Google Drive
1. افتح عملية النشر في CrewAI AMP
2. انتقل إلى علامة تبويب **Triggers**
3. حدد موقع **Google Drive** وبدّل مفتاح التبديل للتفعيل
<Frame>
<img
src="/images/enterprise/gdrive-trigger.png"
alt="تفعيل أو تعطيل المشغلات بالتبديل"
/>
</Frame>
## مثال: تلخيص نشاط الملفات
تحلل طواقم Drive النموذجية الحمولة لاستخراج بيانات الملف الوصفية وتقييم الصلاحيات ونشر ملخص.
```python
from drive_file_crew import GoogleDriveFileTrigger
crew = GoogleDriveFileTrigger().crew()
crew.kickoff({
"crewai_trigger_payload": drive_payload,
})
```
## الاختبار المحلي
اختبر تكامل مشغل Google Drive محلياً باستخدام CrewAI CLI:
```bash
# عرض جميع المشغلات المتاحة
crewai triggers list
# محاكاة مشغل Google Drive بحمولة واقعية
crewai triggers run google_drive/file_changed
```
سينفذ أمر `crewai triggers run` طاقمك بحمولة Drive كاملة، مما يتيح لك اختبار منطق التحليل قبل النشر.
<Warning>
استخدم `crewai triggers run google_drive/file_changed` (وليس `crewai run`) لمحاكاة
تنفيذ المشغل أثناء التطوير. بعد النشر، سيتلقى طاقمك
حمولة المشغل تلقائياً.
</Warning>
## مراقبة عمليات التنفيذ
تتبع سجل وأداء عمليات التشغيل المُشغّلة عبر قائمة **Executions** في لوحة تحكم النشر.
<Frame>
<img
src="/images/enterprise/list-executions.png"
alt="قائمة عمليات التنفيذ المُشغّلة بواسطة الأتمتة"
/>
</Frame>
## استكشاف الأخطاء وإصلاحها
- تحقق من ربط Google Drive وتفعيل مفتاح التبديل للمشغل
- اختبر محلياً بـ `crewai triggers run google_drive/file_changed` لرؤية هيكل الحمولة بالضبط
- إذا كانت الحمولة تفتقد بيانات الصلاحيات، تأكد من أن الحساب المتصل لديه صلاحية الوصول إلى الملف أو المجلد
- يرسل المشغل معرّفات الملفات فقط؛ استخدم Drive API إذا كنت تحتاج جلب المحتوى الثنائي أثناء تشغيل الطاقم
- تذكر: استخدم `crewai triggers run` (وليس `crewai run`) لمحاكاة تنفيذ المشغل

View File

@@ -1,61 +0,0 @@
---
title: "مشغل HubSpot"
description: "تشغيل طواقم CrewAI مباشرة من سير عمل HubSpot"
icon: "hubspot"
mode: "wide"
---
يقدم هذا الدليل عملية خطوة بخطوة لإعداد مشغلات HubSpot لـ CrewAI AMP، مما يتيح لك بدء الطواقم مباشرة من سير عمل HubSpot.
## المتطلبات المسبقة
- حساب CrewAI AMP
- حساب HubSpot مع ميزة [HubSpot Workflows](https://knowledge.hubspot.com/workflows/create-workflows)
## خطوات الإعداد
<Steps>
<Step title="ربط حساب HubSpot بـ CrewAI AMP">
- سجّل الدخول إلى `حساب CrewAI AMP > Triggers` - اختر `HubSpot` من
قائمة المشغلات المتاحة - اختر حساب HubSpot الذي تريد ربطه
بـ CrewAI AMP - اتبع التعليمات على الشاشة لتفويض وصول CrewAI AMP
إلى حساب HubSpot - ستظهر رسالة تأكيد بمجرد
ربط HubSpot بنجاح مع CrewAI AMP
</Step>
<Step title="إنشاء سير عمل HubSpot">
- سجّل الدخول إلى `حساب HubSpot > Automations > Workflows > New workflow`
- اختر نوع سير العمل المناسب لاحتياجاتك (مثل Start from scratch) -
في منشئ سير العمل، انقر على أيقونة Plus (+) لإضافة إجراء جديد. -
اختر `Integrated apps > CrewAI > Kickoff a Crew`. - اختر الطاقم الذي
تريد تشغيله. - انقر على `Save` لإضافة الإجراء إلى سير عملك
<Frame>
<img
src="/images/enterprise/hubspot-workflow-1.png"
alt="سير عمل HubSpot 1"
/>
</Frame>
</Step>
<Step title="استخدام نتائج الطاقم مع إجراءات أخرى">
- بعد خطوة Kickoff a Crew، انقر على أيقونة Plus (+) لإضافة
إجراء جديد. - على سبيل المثال، لإرسال إشعار بريد إلكتروني داخلي، اختر
`Communications > Send internal email notification` - في حقل Body،
انقر على `Insert data`، اختر `View properties or action outputs from > Action
outputs > Crew Result` لتضمين بيانات الطاقم في البريد الإلكتروني
<Frame>
<img
src="/images/enterprise/hubspot-workflow-2.png"
alt="سير عمل HubSpot 2"
/>
</Frame>
- هيّئ أي إجراءات إضافية حسب الحاجة - راجع خطوات
سير عملك للتأكد من إعداد كل شيء بشكل صحيح - فعّل سير العمل
<Frame>
<img
src="/images/enterprise/hubspot-workflow-3.png"
alt="سير عمل HubSpot 3"
/>
</Frame>
</Step>
</Steps>
لمزيد من المعلومات المفصلة حول الإجراءات المتاحة وخيارات التخصيص، راجع [وثائق HubSpot Workflows](https://knowledge.hubspot.com/workflows/create-workflows).

View File

@@ -1,157 +0,0 @@
---
title: "سير عمل HITL"
description: "تعلم كيفية تنفيذ سير عمل Human-In-The-Loop في CrewAI لتعزيز اتخاذ القرار"
icon: "user-check"
mode: "wide"
---
Human-In-The-Loop (HITL) هو نهج قوي يجمع بين الذكاء الاصطناعي والخبرة البشرية لتعزيز اتخاذ القرار وتحسين نتائج المهام. يوضح هذا الدليل كيفية تنفيذ HITL داخل CrewAI Enterprise.
## نهجا HITL في CrewAI
يقدم CrewAI نهجين لتنفيذ سير عمل Human-In-The-Loop:
| النهج | الأفضل لـ | الإصدار |
|-------|-----------|---------|
| **قائم على التدفق** (مُزخرف `@human_feedback`) | الإنتاج مع واجهة Enterprise، سير عمل البريد الإلكتروني أولاً، ميزات المنصة الكاملة | **1.8.0+** |
| **قائم على Webhook** | التكاملات المخصصة، الأنظمة الخارجية (Slack، Teams، إلخ.)، الإعدادات القديمة | جميع الإصدارات |
## HITL القائم على التدفق مع منصة Enterprise
<Note>
يتطلب مُزخرف `@human_feedback` **إصدار CrewAI 1.8.0 أو أعلى**.
</Note>
عند استخدام مُزخرف `@human_feedback` في تدفقاتك، يوفر CrewAI Enterprise **نظام HITL يعتمد على البريد الإلكتروني أولاً** يمكّن أي شخص لديه عنوان بريد إلكتروني من الاستجابة لطلبات المراجعة:
<CardGroup cols={2}>
<Card title="تصميم البريد الإلكتروني أولاً" icon="envelope">
يتلقى المستجيبون إشعارات بريد إلكتروني ويمكنهم الرد مباشرة — لا حاجة لتسجيل الدخول.
</Card>
<Card title="مراجعة من لوحة التحكم" icon="desktop">
راجع واستجب لطلبات HITL في لوحة تحكم Enterprise عند التفضيل.
</Card>
<Card title="توجيه مرن" icon="route">
وجّه الطلبات إلى عناوين بريد محددة بناءً على أنماط الدوال أو استخراجها من حالة التدفق.
</Card>
<Card title="استجابة تلقائية" icon="clock">
هيّئ استجابات احتياطية تلقائية عندما لا يرد أي شخص خلال المهلة الزمنية.
</Card>
</CardGroup>
### الفوائد الرئيسية
- **مستجيبون خارجيون**: أي شخص لديه بريد إلكتروني يمكنه الاستجابة، حتى غير مستخدمي المنصة
- **تعيين ديناميكي**: استخراج بريد المُعيَّن من حالة التدفق (مثل `account_owner_email`)
- **تهيئة بسيطة**: التوجيه عبر البريد الإلكتروني أسهل في الإعداد من إدارة المستخدمين/الأدوار
- **احتياطي منشئ النشر**: إذا لم تتطابق قاعدة توجيه، يتم إخطار منشئ النشر
<Tip>
لتفاصيل التنفيذ حول مُزخرف `@human_feedback`، راجع دليل [التغذية الراجعة البشرية في التدفقات](/ar/learn/human-feedback-in-flows).
</Tip>
## إعداد سير عمل HITL القائم على Webhook
للتكاملات المخصصة مع الأنظمة الخارجية مثل Slack وMicrosoft Teams أو تطبيقاتك الخاصة، يمكنك استخدام النهج القائم على Webhook:
<Steps>
<Step title="تهيئة المهمة">
هيّئ مهمتك مع تفعيل الإدخال البشري:
<Frame>
<img src="/images/enterprise/crew-human-input.png" alt="إدخال بشري للطاقم" />
</Frame>
</Step>
<Step title="تقديم رابط Webhook">
عند تشغيل طاقمك، أضف رابط webhook للإدخال البشري:
<Frame>
<img src="/images/enterprise/crew-webhook-url.png" alt="رابط Webhook للطاقم" />
</Frame>
</Step>
<Step title="استلام إشعار Webhook">
بمجرد إتمام الطاقم للمهمة التي تتطلب إدخالاً بشرياً، ستتلقى إشعار webhook يحتوي على:
- **معرّف التنفيذ**
- **معرّف المهمة**
- **مخرجات المهمة**
</Step>
<Step title="مراجعة مخرجات المهمة">
سيتوقف النظام في حالة `Pending Human Input`. راجع مخرجات المهمة بعناية.
</Step>
<Step title="إرسال التغذية الراجعة البشرية">
استدعِ نقطة نهاية الاستئناف لطاقمك بالمعلومات التالية:
<Frame>
<img src="/images/enterprise/crew-resume-endpoint.png" alt="نقطة نهاية استئناف الطاقم" />
</Frame>
<Warning>
**هام: يجب تقديم روابط Webhook مرة أخرى**:
**يجب** تقديم نفس روابط webhook (`taskWebhookUrl`، `stepWebhookUrl`، `crewWebhookUrl`) في استدعاء الاستئناف التي استخدمتها في استدعاء التشغيل. لا تُنقل تهيئات Webhook تلقائياً من التشغيل — يجب تضمينها صراحة في طلب الاستئناف لمواصلة تلقي الإشعارات لاكتمال المهام وخطوات الوكيل واكتمال الطاقم.
</Warning>
مثال على استدعاء الاستئناف مع webhooks:
```bash
curl -X POST {BASE_URL}/resume \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"execution_id": "abcd1234-5678-90ef-ghij-klmnopqrstuv",
"task_id": "research_task",
"human_feedback": "Great work! Please add more details.",
"is_approve": true,
"taskWebhookUrl": "https://your-server.com/webhooks/task",
"stepWebhookUrl": "https://your-server.com/webhooks/step",
"crewWebhookUrl": "https://your-server.com/webhooks/crew"
}'
```
<Warning>
**تأثير التغذية الراجعة على تنفيذ المهمة**:
من الضروري توخي الحذر عند تقديم التغذية الراجعة، حيث سيتم دمج محتوى التغذية الراجعة بالكامل كسياق إضافي لعمليات تنفيذ المهام اللاحقة.
</Warning>
وهذا يعني:
- جميع المعلومات في تغذيتك الراجعة تصبح جزءاً من سياق المهمة.
- التفاصيل غير ذات الصلة قد تؤثر سلباً عليها.
- التغذية الراجعة الموجزة وذات الصلة تساعد في الحفاظ على تركيز وكفاءة المهمة.
- راجع دائماً تغذيتك الراجعة بعناية قبل الإرسال للتأكد من أنها تحتوي فقط على معلومات ذات صلة توجه تنفيذ المهمة بشكل إيجابي.
</Step>
<Step title="التعامل مع التغذية الراجعة السلبية">
إذا قدمت تغذية راجعة سلبية:
- سيعيد الطاقم محاولة المهمة مع سياق إضافي من تغذيتك الراجعة.
- ستتلقى إشعار webhook آخر لمزيد من المراجعة.
- كرر الخطوات 4-6 حتى ترضى.
</Step>
<Step title="استمرار التنفيذ">
عندما ترسل تغذية راجعة إيجابية، سيستمر التنفيذ إلى الخطوات التالية.
</Step>
</Steps>
## أفضل الممارسات
- **كن محدداً**: قدم تغذية راجعة واضحة وقابلة للتنفيذ تعالج المهمة مباشرة
- **كن ذا صلة**: ضمّن فقط المعلومات التي ستساعد في تحسين تنفيذ المهمة
- **كن سريعاً**: استجب لمطالبات HITL بسرعة لتجنب تأخير سير العمل
- **راجع بعناية**: تحقق من تغذيتك الراجعة قبل الإرسال لضمان الدقة
## حالات الاستخدام الشائعة
سير عمل HITL ذو قيمة خاصة لـ:
- ضمان الجودة والتحقق
- سيناريوهات اتخاذ القرار المعقدة
- العمليات الحساسة أو عالية المخاطر
- المهام الإبداعية التي تتطلب حكماً بشرياً
- مراجعات الامتثال والتنظيم
## اعرف المزيد
<CardGroup cols={2}>
<Card title="إدارة HITL للتدفقات" icon="users-gear" href="/ar/enterprise/features/flow-hitl-management">
استكشف قدرات منصة Enterprise الكاملة لـ Flow HITL بما في ذلك إشعارات البريد الإلكتروني وقواعد التوجيه والاستجابة التلقائية والتحليلات.
</Card>
<Card title="التغذية الراجعة البشرية في التدفقات" icon="code" href="/ar/learn/human-feedback-in-flows">
دليل التنفيذ لمُزخرف `@human_feedback` في تدفقاتك.
</Card>
</CardGroup>

View File

@@ -1,178 +0,0 @@
---
title: "تشغيل الطاقم"
description: "تشغيل طاقم على CrewAI AMP"
icon: "flag-checkered"
mode: "wide"
---
## نظرة عامة
بمجرد نشر طاقمك على منصة CrewAI AMP، يمكنك بدء عمليات التنفيذ عبر واجهة الويب أو API. يغطي هذا الدليل كلا النهجين.
## الطريقة 1: استخدام واجهة الويب
### الخطوة 1: الانتقال إلى طاقمك المنشور
1. سجّل الدخول إلى [CrewAI AMP](https://app.crewai.com)
2. انقر على اسم الطاقم من قائمة مشاريعك
3. ستنتقل إلى صفحة تفاصيل الطاقم
<Frame>![لوحة تحكم الطاقم](/images/enterprise/crew-dashboard.png)</Frame>
### الخطوة 2: بدء التنفيذ
من صفحة تفاصيل طاقمك، لديك خياران لبدء التنفيذ:
#### الخيار أ: التشغيل السريع
1. انقر على رابط `Kickoff` في قسم Test Endpoints
2. أدخل معاملات الإدخال المطلوبة لطاقمك في محرر JSON
3. انقر على زر `Send Request`
<Frame>![نقطة نهاية التشغيل](/images/enterprise/kickoff-endpoint.png)</Frame>
#### الخيار ب: استخدام الواجهة المرئية
1. انقر على علامة تبويب `Run` في صفحة تفاصيل الطاقم
2. أدخل المدخلات المطلوبة في حقول النموذج
3. انقر على زر `Run Crew`
<Frame>![تشغيل الطاقم](/images/enterprise/run-crew.png)</Frame>
### الخطوة 3: مراقبة تقدم التنفيذ
بعد بدء التنفيذ:
1. ستتلقى استجابة تحتوي على `kickoff_id` - **انسخ هذا المعرّف**
2. هذا المعرّف ضروري لتتبع تنفيذك
<Frame>![نسخ معرّف المهمة](/images/enterprise/copy-task-id.png)</Frame>
### الخطوة 4: التحقق من حالة التنفيذ
لمراقبة تقدم تنفيذك:
1. انقر على نقطة نهاية "Status" في قسم Test Endpoints
2. الصق `kickoff_id` في الحقل المخصص
3. انقر على زر "Get Status"
<Frame>![الحصول على الحالة](/images/enterprise/get-status.png)</Frame>
ستعرض استجابة الحالة:
- حالة التنفيذ الحالية (`running`، `completed`، إلخ.)
- تفاصيل حول المهام الجارية
- أي مخرجات أُنتجت حتى الآن
### الخطوة 5: عرض النتائج النهائية
بمجرد اكتمال التنفيذ:
1. ستتغير الحالة إلى `completed`
2. يمكنك عرض نتائج ومخرجات التنفيذ الكاملة
3. لعرض أكثر تفصيلاً، تحقق من علامة تبويب `Executions` في صفحة تفاصيل الطاقم
## الطريقة 2: استخدام API
يمكنك أيضاً تشغيل الطواقم برمجياً باستخدام REST API لـ CrewAI AMP.
### المصادقة
جميع طلبات API تتطلب رمز حامل للمصادقة:
```bash
curl -H "Authorization: Bearer YOUR_CREW_TOKEN" https://your-crew-url.crewai.com
```
رمز الحامل متاح في علامة تبويب Status في صفحة تفاصيل طاقمك.
### التحقق من صحة الطاقم
قبل تنفيذ العمليات، يمكنك التحقق من أن طاقمك يعمل بشكل صحيح:
```bash
curl -H "Authorization: Bearer YOUR_CREW_TOKEN" https://your-crew-url.crewai.com
```
ستعيد الاستجابة الناجحة رسالة تشير إلى أن الطاقم يعمل:
```
Healthy%
```
### الخطوة 1: استرداد المدخلات المطلوبة
أولاً، حدد المدخلات التي يتطلبها طاقمك:
```bash
curl -X GET \
-H "Authorization: Bearer YOUR_CREW_TOKEN" \
https://your-crew-url.crewai.com/inputs
```
ستكون الاستجابة كائن JSON يحتوي على مصفوفة من معاملات الإدخال المطلوبة، على سبيل المثال:
```json
{ "inputs": ["topic", "current_year"] }
```
يوضح هذا المثال أن هذا الطاقم المحدد يتطلب مدخلين: `topic` و`current_year`.
### الخطوة 2: بدء التنفيذ
ابدأ التنفيذ بتقديم المدخلات المطلوبة:
```bash
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_CREW_TOKEN" \
-d '{"inputs": {"topic": "AI Agent Frameworks", "current_year": "2025"}}' \
https://your-crew-url.crewai.com/kickoff
```
ستتضمن الاستجابة `kickoff_id` الذي ستحتاجه للتتبع:
```json
{ "kickoff_id": "abcd1234-5678-90ef-ghij-klmnopqrstuv" }
```
### الخطوة 3: التحقق من حالة التنفيذ
راقب تقدم التنفيذ باستخدام kickoff_id:
```bash
curl -X GET \
-H "Authorization: Bearer YOUR_CREW_TOKEN" \
https://your-crew-url.crewai.com/status/abcd1234-5678-90ef-ghij-klmnopqrstuv
```
## التعامل مع عمليات التنفيذ
### عمليات التنفيذ طويلة المدة
لعمليات التنفيذ التي قد تستغرق وقتاً طويلاً:
1. فكّر في تنفيذ آلية استعلام دوري للتحقق من الحالة بشكل دوري
2. استخدم webhooks (إذا كانت متاحة) للإشعار عند اكتمال التنفيذ
3. نفّذ معالجة الأخطاء للمهلات الزمنية المحتملة
### سياق التنفيذ
يتضمن سياق التنفيذ:
- المدخلات المقدمة عند التشغيل
- متغيرات البيئة المُهيأة أثناء النشر
- أي حالة محفوظة بين المهام
### تصحيح أخطاء عمليات التنفيذ الفاشلة
إذا فشل التنفيذ:
1. تحقق من علامة تبويب "Executions" للسجلات المفصلة
2. راجع علامة تبويب "Traces" لتفاصيل التنفيذ خطوة بخطوة
3. ابحث عن استجابات LLM واستخدام الأدوات في تفاصيل التتبع
<Card title="تحتاج مساعدة؟" icon="headset" href="mailto:support@crewai.com">
تواصل مع فريق الدعم للمساعدة في مشاكل التنفيذ أو أسئلة حول
منصة Enterprise.
</Card>

View File

@@ -1,70 +0,0 @@
---
title: "مشغل Microsoft Teams"
description: "تشغيل الطواقم من نشاط محادثات Microsoft Teams"
icon: "microsoft"
mode: "wide"
---
## نظرة عامة
استخدم مشغل Microsoft Teams لبدء الأتمتات كلما أُنشئت محادثة جديدة. تشمل الأنماط الشائعة تلخيص الطلبات الواردة وتوجيه الرسائل العاجلة لفرق الدعم أو إنشاء مهام متابعة في أنظمة أخرى.
<Tip>
تأكد من ربط Microsoft Teams تحت **Tools & Integrations** و
تفعيله في علامة تبويب **Triggers** لعملية النشر.
</Tip>
## تفعيل مشغل Microsoft Teams
1. افتح عملية النشر في CrewAI AMP
2. انتقل إلى علامة تبويب **Triggers**
3. حدد موقع **Microsoft Teams** وبدّل مفتاح التبديل للتفعيل
<Frame caption="اتصال مشغل Microsoft Teams">
<img
src="/images/enterprise/msteams-trigger.png"
alt="تفعيل أو تعطيل المشغلات بالتبديل"
/>
</Frame>
## مثال: تلخيص سلسلة محادثة جديدة
```python
from teams_chat_created_crew import MicrosoftTeamsChatTrigger
crew = MicrosoftTeamsChatTrigger().crew()
result = crew.kickoff({
"crewai_trigger_payload": teams_payload,
})
print(result.raw)
```
يحلل الطاقم بيانات المحادثة الوصفية (الموضوع، وقت الإنشاء، قائمة الأعضاء) وينشئ خطة عمل للفريق المستقبل.
## الاختبار المحلي
اختبر تكامل مشغل Microsoft Teams محلياً باستخدام CrewAI CLI:
```bash
# عرض جميع المشغلات المتاحة
crewai triggers list
# محاكاة مشغل Microsoft Teams بحمولة واقعية
crewai triggers run microsoft_teams/teams_message_created
```
سينفذ أمر `crewai triggers run` طاقمك بحمولة Teams كاملة، مما يتيح لك اختبار منطق التحليل قبل النشر.
<Warning>
استخدم `crewai triggers run microsoft_teams/teams_message_created` (وليس `crewai
run`) لمحاكاة تنفيذ المشغل أثناء التطوير. بعد النشر، سيتلقى
طاقمك حمولة المشغل تلقائياً.
</Warning>
## استكشاف الأخطاء وإصلاحها
- تأكد من أن اتصال Teams نشط؛ يجب تحديثه إذا سحب المستأجر الصلاحيات
- اختبر محلياً بـ `crewai triggers run microsoft_teams/teams_message_created` لرؤية هيكل الحمولة بالضبط
- تأكد من أن اشتراك webhook في Microsoft 365 لا يزال صالحاً إذا توقفت الحمولات عن الوصول
- راجع سجلات التنفيذ لعدم تطابق شكل الحمولة — قد تحذف إشعارات Graph حقولاً عندما تكون المحادثة خاصة أو مقيدة
- تذكر: استخدم `crewai triggers run` (وليس `crewai run`) لمحاكاة تنفيذ المشغل

View File

@@ -1,69 +0,0 @@
---
title: "مشغل OneDrive"
description: "أتمتة الاستجابات لنشاط ملفات OneDrive"
icon: "cloud"
mode: "wide"
---
## نظرة عامة
ابدأ الأتمتات عند تغيير الملفات داخل OneDrive. يمكنك إنشاء ملخصات تدقيق وإخطار فرق الأمان بشأن المشاركة الخارجية أو تحديث أنظمة الأعمال اللاحقة ببيانات المستندات الوصفية الجديدة.
<Tip>
اربط OneDrive في **Tools & Integrations** وبدّل المشغل لعملية
النشر.
</Tip>
## تفعيل مشغل OneDrive
1. افتح عملية النشر في CrewAI AMP
2. انتقل إلى علامة تبويب **Triggers**
3. حدد موقع **OneDrive** وبدّل مفتاح التبديل للتفعيل
<Frame caption="اتصال مشغل Microsoft OneDrive">
<img
src="/images/enterprise/onedrive-trigger.png"
alt="تفعيل أو تعطيل المشغلات بالتبديل"
/>
</Frame>
## مثال: تدقيق صلاحيات الملفات
```python
from onedrive_file_crew import OneDriveFileTrigger
crew = OneDriveFileTrigger().crew()
crew.kickoff({
"crewai_trigger_payload": onedrive_payload,
})
```
يفحص الطاقم بيانات الملف الوصفية ونشاط المستخدم وتغييرات الصلاحيات لإنتاج ملخص متوافق مع متطلبات الامتثال.
## الاختبار المحلي
اختبر تكامل مشغل OneDrive محلياً باستخدام CrewAI CLI:
```bash
# عرض جميع المشغلات المتاحة
crewai triggers list
# محاكاة مشغل OneDrive بحمولة واقعية
crewai triggers run microsoft_onedrive/file_changed
```
سينفذ أمر `crewai triggers run` طاقمك بحمولة OneDrive كاملة، مما يتيح لك اختبار منطق التحليل قبل النشر.
<Warning>
استخدم `crewai triggers run microsoft_onedrive/file_changed` (وليس `crewai run`)
لمحاكاة تنفيذ المشغل أثناء التطوير. بعد النشر، سيتلقى طاقمك
حمولة المشغل تلقائياً.
</Warning>
## استكشاف الأخطاء وإصلاحها
- تأكد من أن الحساب المتصل لديه صلاحية قراءة بيانات الملف الوصفية المضمنة في webhook
- اختبر محلياً بـ `crewai triggers run microsoft_onedrive/file_changed` لرؤية هيكل الحمولة بالضبط
- إذا كان المشغل يعمل لكن الحمولة تفتقد `permissions`، تأكد من أن إعدادات المشاركة على مستوى الموقع تسمح لـ Graph بإرجاع هذا الحقل
- للمستأجرين الكبار، صفّ الإشعارات مسبقاً حتى يعمل الطاقم فقط على المجلدات ذات الصلة
- تذكر: استخدم `crewai triggers run` (وليس `crewai run`) لمحاكاة تنفيذ المشغل

View File

@@ -1,69 +0,0 @@
---
title: "مشغل Outlook"
description: "إطلاق الأتمتات من رسائل Outlook وتحديثات التقويم"
icon: "microsoft"
mode: "wide"
---
## نظرة عامة
أتمت الاستجابات عندما يسلّم Outlook رسالة جديدة أو عند إزالة حدث من التقويم. تقوم الفرق عادة بتوجيه التصعيدات وإنشاء تذاكر أو تنبيه الحاضرين بالإلغاءات.
<Tip>
اربط Outlook في **Tools & Integrations** وتأكد من تفعيل المشغل
لعملية النشر.
</Tip>
## تفعيل مشغل Outlook
1. افتح عملية النشر في CrewAI AMP
2. انتقل إلى علامة تبويب **Triggers**
3. حدد موقع **Outlook** وبدّل مفتاح التبديل للتفعيل
<Frame caption="اتصال مشغل Microsoft Outlook">
<img
src="/images/enterprise/outlook-trigger.png"
alt="تفعيل أو تعطيل المشغلات بالتبديل"
/>
</Frame>
## مثال: تلخيص رسالة بريد إلكتروني جديدة
```python
from outlook_message_crew import OutlookMessageTrigger
crew = OutlookMessageTrigger().crew()
crew.kickoff({
"crewai_trigger_payload": outlook_payload,
})
```
يستخرج الطاقم تفاصيل المرسل والموضوع ومعاينة النص والمرفقات قبل إنشاء استجابة منظمة.
## الاختبار المحلي
اختبر تكامل مشغل Outlook محلياً باستخدام CrewAI CLI:
```bash
# عرض جميع المشغلات المتاحة
crewai triggers list
# محاكاة مشغل Outlook بحمولة واقعية
crewai triggers run microsoft_outlook/email_received
```
سينفذ أمر `crewai triggers run` طاقمك بحمولة Outlook كاملة، مما يتيح لك اختبار منطق التحليل قبل النشر.
<Warning>
استخدم `crewai triggers run microsoft_outlook/email_received` (وليس `crewai run`)
لمحاكاة تنفيذ المشغل أثناء التطوير. بعد النشر، سيتلقى طاقمك
حمولة المشغل تلقائياً.
</Warning>
## استكشاف الأخطاء وإصلاحها
- تحقق من أن موصل Outlook لا يزال مفوّضاً؛ يجب تجديد الاشتراك دورياً
- اختبر محلياً بـ `crewai triggers run microsoft_outlook/email_received` لرؤية هيكل الحمولة بالضبط
- إذا كانت المرفقات مفقودة، تأكد من أن اشتراك webhook يتضمن علامة `includeResourceData`
- راجع سجلات التنفيذ عندما تفشل الأحداث في المطابقة — حمولات الإلغاء تفتقد قوائم الحاضرين حسب التصميم ويجب أن يأخذ الطاقم ذلك في الاعتبار
- تذكر: استخدم `crewai triggers run` (وليس `crewai run`) لمحاكاة تنفيذ المشغل

View File

@@ -1,311 +0,0 @@
---
title: "التحضير للنشر"
description: "تأكد من جاهزية طاقمك أو تدفقك للنشر على CrewAI AMP"
icon: "clipboard-check"
mode: "wide"
---
<Note>
قبل النشر على CrewAI AMP، من الضروري التحقق من صحة بنية مشروعك.
يمكن نشر كل من الطواقم والتدفقات كـ "أتمتات"، لكن لهما بنى مشاريع
ومتطلبات مختلفة يجب استيفاؤها لنجاح النشر.
</Note>
## فهم الأتمتات
في CrewAI AMP، **الأتمتات** هو المصطلح الشامل لمشاريع الذكاء الاصطناعي الوكيل القابلة للنشر. يمكن أن تكون الأتمتة إما:
- **طاقم**: فريق مستقل من وكلاء الذكاء الاصطناعي يعملون معاً على المهام
- **تدفق**: سير عمل مُنسّق يمكنه الجمع بين طواقم متعددة واستدعاءات LLM المباشرة والمنطق الإجرائي
فهم النوع الذي تنشره ضروري لأن لهما بنى مشاريع ونقاط دخول مختلفة.
## الطواقم مقابل التدفقات: الفروقات الرئيسية
<CardGroup cols={2}>
<Card title="مشاريع الطاقم" icon="users">
فرق وكلاء ذكاء اصطناعي مستقلة مع `crew.py` يحدد الوكلاء والمهام. الأفضل للمهام المركزة والتعاونية.
</Card>
<Card title="مشاريع التدفق" icon="diagram-project">
سير عمل مُنسّق مع طواقم مضمنة في مجلد `crews/`. الأفضل للعمليات المعقدة متعددة المراحل.
</Card>
</CardGroup>
| الجانب | الطاقم | التدفق |
|--------|--------|--------|
| **بنية المشروع** | `src/project_name/` مع `crew.py` | `src/project_name/` مع مجلد `crews/` |
| **موقع المنطق الرئيسي** | `src/project_name/crew.py` | `src/project_name/main.py` (فئة Flow) |
| **دالة نقطة الدخول** | `run()` في `main.py` | `kickoff()` في `main.py` |
| **نوع pyproject.toml** | `type = "crew"` | `type = "flow"` |
| **أمر CLI للإنشاء** | `crewai create crew name` | `crewai create flow name` |
| **موقع التهيئة** | `src/project_name/config/` | `src/project_name/crews/crew_name/config/` |
| **يمكن أن يحتوي طواقم أخرى** | لا | نعم (في مجلد `crews/`) |
## مرجع بنية المشروع
### بنية مشروع الطاقم
عند تشغيل `crewai create crew my_crew`، تحصل على هذه البنية:
```
my_crew/
├── .gitignore
├── pyproject.toml # Must have type = "crew"
├── README.md
├── .env
├── uv.lock # REQUIRED for deployment
└── src/
└── my_crew/
├── __init__.py
├── main.py # Entry point with run() function
├── crew.py # Crew class with @CrewBase decorator
├── tools/
│ ├── custom_tool.py
│ └── __init__.py
└── config/
├── agents.yaml # Agent definitions
└── tasks.yaml # Task definitions
```
<Warning>
بنية `src/project_name/` المتداخلة ضرورية للطواقم.
وضع الملفات في المستوى الخاطئ سيسبب فشل النشر.
</Warning>
### بنية مشروع التدفق
عند تشغيل `crewai create flow my_flow`، تحصل على هذه البنية:
```
my_flow/
├── .gitignore
├── pyproject.toml # Must have type = "flow"
├── README.md
├── .env
├── uv.lock # REQUIRED for deployment
└── src/
└── my_flow/
├── __init__.py
├── main.py # Entry point with kickoff() function + Flow class
├── crews/ # Embedded crews folder
│ └── poem_crew/
│ ├── __init__.py
│ ├── poem_crew.py # Crew with @CrewBase decorator
│ └── config/
│ ├── agents.yaml
│ └── tasks.yaml
└── tools/
├── __init__.py
└── custom_tool.py
```
<Info>
كلا الطواقم والتدفقات تستخدم بنية `src/project_name/`.
الفرق الرئيسي أن التدفقات لها مجلد `crews/` للطواقم المضمنة،
بينما الطواقم لها `crew.py` مباشرة في مجلد المشروع.
</Info>
## قائمة فحص ما قبل النشر
استخدم هذه القائمة للتحقق من جاهزية مشروعك للنشر.
### 1. التحقق من تهيئة pyproject.toml
يجب أن يتضمن `pyproject.toml` قسم `[tool.crewai]` الصحيح:
<Tabs>
<Tab title="للطواقم">
```toml
[tool.crewai]
type = "crew"
```
</Tab>
<Tab title="للتدفقات">
```toml
[tool.crewai]
type = "flow"
```
</Tab>
</Tabs>
<Warning>
إذا لم يتطابق `type` مع بنية مشروعك، سيفشل البناء أو
لن تعمل الأتمتة بشكل صحيح.
</Warning>
### 2. التأكد من وجود ملف uv.lock
يستخدم CrewAI `uv` لإدارة الاعتماديات. يضمن ملف `uv.lock` بناءً قابلاً للتكرار وهو **مطلوب** للنشر.
```bash
# إنشاء أو تحديث ملف القفل
uv lock
# التحقق من وجوده
ls -la uv.lock
```
إذا لم يكن الملف موجوداً، شغّل `uv lock` وارفعه إلى مستودعك:
```bash
uv lock
git add uv.lock
git commit -m "Add uv.lock for deployment"
git push
```
### 3. التحقق من استخدام مُزخرف CrewBase
**يجب أن تستخدم كل فئة طاقم مُزخرف `@CrewBase`.** ينطبق هذا على:
- مشاريع الطاقم المستقلة
- الطواقم المضمنة داخل مشاريع التدفق
```python
from crewai import Agent, Crew, Process, Task
from crewai.project import CrewBase, agent, crew, task
from crewai.agents.agent_builder.base_agent import BaseAgent
from typing import List
@CrewBase # This decorator is REQUIRED
class MyCrew():
"""My crew description"""
agents: List[BaseAgent]
tasks: List[Task]
@agent
def my_agent(self) -> Agent:
return Agent(
config=self.agents_config['my_agent'], # type: ignore[index]
verbose=True
)
@task
def my_task(self) -> Task:
return Task(
config=self.tasks_config['my_task'] # type: ignore[index]
)
@crew
def crew(self) -> Crew:
return Crew(
agents=self.agents,
tasks=self.tasks,
process=Process.sequential,
verbose=True,
)
```
<Warning>
إذا نسيت مُزخرف `@CrewBase`، سيفشل النشر بأخطاء حول
تهيئات الوكلاء أو المهام المفقودة.
</Warning>
### 4. التحقق من نقاط دخول المشروع
كل من الطواقم والتدفقات لها نقطة دخول في `src/project_name/main.py`:
<Tabs>
<Tab title="للطواقم">
تستخدم نقطة الدخول دالة `run()`:
```python
# src/my_crew/main.py
from my_crew.crew import MyCrew
def run():
"""Run the crew."""
inputs = {'topic': 'AI in Healthcare'}
result = MyCrew().crew().kickoff(inputs=inputs)
return result
if __name__ == "__main__":
run()
```
</Tab>
<Tab title="للتدفقات">
تستخدم نقطة الدخول دالة `kickoff()` مع فئة Flow:
```python
# src/my_flow/main.py
from crewai.flow import Flow, listen, start
from my_flow.crews.poem_crew.poem_crew import PoemCrew
class MyFlow(Flow):
@start()
def begin(self):
# Flow logic here
result = PoemCrew().crew().kickoff(inputs={...})
return result
def kickoff():
"""Run the flow."""
MyFlow().kickoff()
if __name__ == "__main__":
kickoff()
```
</Tab>
</Tabs>
### 5. تحضير متغيرات البيئة
قبل النشر، تأكد من أن لديك:
1. **مفاتيح API لـ LLM** جاهزة (OpenAI، Anthropic، Google، إلخ.)
2. **مفاتيح API للأدوات** إذا كنت تستخدم أدوات خارجية (Serper، إلخ.)
<Info>
إذا كان مشروعك يعتمد على حزم من **سجل PyPI خاص**، ستحتاج أيضاً لتهيئة
بيانات اعتماد مصادقة السجل كمتغيرات بيئة. راجع
دليل [سجلات الحزم الخاصة](/ar/enterprise/guides/private-package-registry) للتفاصيل.
</Info>
<Tip>
اختبر مشروعك محلياً بنفس متغيرات البيئة قبل النشر
لاكتشاف مشاكل التهيئة مبكراً.
</Tip>
## أوامر التحقق السريع
شغّل هذه الأوامر من جذر مشروعك للتحقق السريع من إعدادك:
```bash
# 1. Check project type in pyproject.toml
grep -A2 "\[tool.crewai\]" pyproject.toml
# 2. Verify uv.lock exists
ls -la uv.lock || echo "ERROR: uv.lock missing! Run 'uv lock'"
# 3. Verify src/ structure exists
ls -la src/*/main.py 2>/dev/null || echo "No main.py found in src/"
# 4. For Crews - verify crew.py exists
ls -la src/*/crew.py 2>/dev/null || echo "No crew.py (expected for Crews)"
# 5. For Flows - verify crews/ folder exists
ls -la src/*/crews/ 2>/dev/null || echo "No crews/ folder (expected for Flows)"
# 6. Check for CrewBase usage
grep -r "@CrewBase" . --include="*.py"
```
## أخطاء الإعداد الشائعة
| الخطأ | العرض | الإصلاح |
|-------|-------|---------|
| `uv.lock` مفقود | فشل البناء أثناء حل الاعتماديات | شغّل `uv lock` وارفعه |
| `type` خاطئ في pyproject.toml | نجاح البناء لكن فشل وقت التشغيل | غيّر إلى النوع الصحيح |
| مُزخرف `@CrewBase` مفقود | أخطاء "Config not found" | أضف المُزخرف لجميع فئات الطاقم |
| ملفات في الجذر بدل `src/` | نقطة الدخول غير موجودة | انقلها إلى `src/project_name/` |
| `run()` أو `kickoff()` مفقودة | لا يمكن بدء الأتمتة | أضف دالة الدخول الصحيحة |
## الخطوات التالية
بمجرد اجتياز مشروعك لجميع عناصر القائمة، أنت جاهز للنشر:
<Card title="النشر على AMP" icon="rocket" href="/ar/enterprise/guides/deploy-to-amp">
اتبع دليل النشر لنشر طاقمك أو تدفقك على CrewAI AMP باستخدام
CLI أو واجهة الويب أو تكامل CI/CD.
</Card>

View File

@@ -1,263 +0,0 @@
---
title: "سجلات الحزم الخاصة"
description: "تثبيت حزم Python الخاصة من سجلات PyPI المصادق عليها في CrewAI AMP"
icon: "lock"
mode: "wide"
---
<Note>
يغطي هذا الدليل كيفية تهيئة مشروع CrewAI لتثبيت حزم Python
من سجلات PyPI الخاصة (Azure DevOps Artifacts، GitHub Packages، GitLab، AWS CodeArtifact، إلخ.)
عند النشر على CrewAI AMP.
</Note>
## متى تحتاج هذا
إذا كان مشروعك يعتمد على حزم Python داخلية أو خاصة مستضافة على سجل خاص
بدلاً من PyPI العام، ستحتاج إلى:
1. إخبار UV **أين** يجد الحزمة (رابط فهرس)
2. إخبار UV **أي** حزم تأتي من ذلك الفهرس (تعيين مصدر)
3. تقديم **بيانات اعتماد** حتى يتمكن UV من المصادقة أثناء التثبيت
يستخدم CrewAI AMP [UV](https://docs.astral.sh/uv/) لحل وتثبيت الاعتماديات.
يدعم UV السجلات الخاصة المصادق عليها عبر تهيئة `pyproject.toml` مع
متغيرات بيئة لبيانات الاعتماد.
## الخطوة 1: تهيئة pyproject.toml
ثلاثة أجزاء تعمل معاً في `pyproject.toml`:
### 1أ. التصريح بالاعتمادية
أضف الحزمة الخاصة إلى `[project.dependencies]` كأي اعتمادية أخرى:
```toml
[project]
dependencies = [
"crewai[tools]>=0.100.1,<1.0.0",
"my-private-package>=1.2.0",
]
```
### 1ب. تعريف الفهرس
سجّل سجلك الخاص كفهرس مسمّى تحت `[[tool.uv.index]]`:
```toml
[[tool.uv.index]]
name = "my-private-registry"
url = "https://pkgs.dev.azure.com/my-org/_packaging/my-feed/pypi/simple/"
explicit = true
```
<Info>
حقل `name` مهم — يستخدمه UV لبناء أسماء متغيرات البيئة
للمصادقة (راجع [الخطوة 2](#step-2-set-authentication-credentials) أدناه).
تعيين `explicit = true` يعني أن UV لن يبحث في هذا الفهرس عن كل حزمة — فقط
الحزم التي تعيّنها صراحة له في `[tool.uv.sources]`. يتجنب ذلك الاستعلامات غير الضرورية
ضد سجلك الخاص ويحمي من هجمات ارتباك الاعتماديات.
</Info>
### 1ج. تعيين الحزمة للفهرس
أخبر UV أي حزم يجب حلها من فهرسك الخاص باستخدام `[tool.uv.sources]`:
```toml
[tool.uv.sources]
my-private-package = { index = "my-private-registry" }
```
### مثال كامل
```toml
[project]
name = "my-crew-project"
version = "0.1.0"
requires-python = ">=3.10,<=3.13"
dependencies = [
"crewai[tools]>=0.100.1,<1.0.0",
"my-private-package>=1.2.0",
]
[tool.crewai]
type = "crew"
[[tool.uv.index]]
name = "my-private-registry"
url = "https://pkgs.dev.azure.com/my-org/_packaging/my-feed/pypi/simple/"
explicit = true
[tool.uv.sources]
my-private-package = { index = "my-private-registry" }
```
بعد تحديث `pyproject.toml`، أعد إنشاء ملف القفل:
```bash
uv lock
```
<Warning>
ارفع دائماً `uv.lock` المُحدّث مع تغييرات `pyproject.toml`.
ملف القفل مطلوب للنشر — راجع [التحضير للنشر](/ar/enterprise/guides/prepare-for-deployment).
</Warning>
## الخطوة 2: تعيين بيانات اعتماد المصادقة
يصادق UV ضد الفهارس الخاصة باستخدام متغيرات بيئة تتبع اصطلاح تسمية
بناءً على اسم الفهرس الذي حددته في `pyproject.toml`:
```
UV_INDEX_{UPPER_NAME}_USERNAME
UV_INDEX_{UPPER_NAME}_PASSWORD
```
حيث `{UPPER_NAME}` هو اسم فهرسك محوّلاً إلى **أحرف كبيرة** مع **استبدال الشرطات بشرطات سفلية**.
على سبيل المثال، فهرس باسم `my-private-registry` يستخدم:
| المتغير | القيمة |
|---------|--------|
| `UV_INDEX_MY_PRIVATE_REGISTRY_USERNAME` | اسم مستخدم السجل أو اسم الرمز |
| `UV_INDEX_MY_PRIVATE_REGISTRY_PASSWORD` | كلمة مرور السجل أو الرمز/PAT |
<Warning>
هذه المتغيرات **يجب** إضافتها عبر إعدادات **Environment Variables** في CrewAI AMP —
إما عالمياً أو على مستوى النشر. لا يمكن تعيينها في ملفات `.env` أو ترميزها في مشروعك.
راجع [تعيين متغيرات البيئة في AMP](#setting-environment-variables-in-amp) أدناه.
</Warning>
## مرجع مزودي السجلات
يوضح الجدول أدناه تنسيق رابط الفهرس وقيم بيانات الاعتماد لمزودي السجلات الشائعين.
استبدل القيم المؤقتة بتفاصيل مؤسستك وخلاصتك الفعلية.
| المزود | رابط الفهرس | اسم المستخدم | كلمة المرور |
|--------|-------------|--------------|-------------|
| **Azure DevOps Artifacts** | `https://pkgs.dev.azure.com/{org}/_packaging/{feed}/pypi/simple/` | أي نص غير فارغ (مثل `token`) | Personal Access Token (PAT) بنطاق Packaging Read |
| **GitHub Packages** | `https://pypi.pkg.github.com/{owner}/simple/` | اسم مستخدم GitHub | Personal Access Token (classic) بنطاق `read:packages` |
| **GitLab Package Registry** | `https://gitlab.com/api/v4/projects/{project_id}/packages/pypi/simple/` | `__token__` | Project أو Personal Access Token بنطاق `read_api` |
| **AWS CodeArtifact** | استخدم الرابط من `aws codeartifact get-repository-endpoint` | `aws` | رمز من `aws codeartifact get-authorization-token` |
| **Google Artifact Registry** | `https://{region}-python.pkg.dev/{project}/{repo}/simple/` | `_json_key_base64` | مفتاح حساب الخدمة بتشفير Base64 |
| **JFrog Artifactory** | `https://{instance}.jfrog.io/artifactory/api/pypi/{repo}/simple/` | اسم المستخدم أو البريد الإلكتروني | مفتاح API أو رمز الهوية |
| **مستضاف ذاتياً (devpi، Nexus، إلخ.)** | رابط Simple API لسجلك | اسم مستخدم السجل | كلمة مرور السجل |
<Tip>
لـ **AWS CodeArtifact**، تنتهي صلاحية رمز التفويض دورياً.
ستحتاج لتحديث قيمة `UV_INDEX_*_PASSWORD` عند انتهاء صلاحيتها.
فكّر في أتمتة هذا في خط أنابيب CI/CD.
</Tip>
## تعيين متغيرات البيئة في AMP
يجب تهيئة بيانات اعتماد السجل الخاص كمتغيرات بيئة في CrewAI AMP.
لديك خياران:
<Tabs>
<Tab title="واجهة الويب">
1. سجّل الدخول إلى [CrewAI AMP](https://app.crewai.com)
2. انتقل إلى أتمتتك
3. افتح علامة تبويب **Environment Variables**
4. أضف كل متغير (`UV_INDEX_*_USERNAME` و`UV_INDEX_*_PASSWORD`) مع قيمته
راجع خطوة [النشر على AMP — تعيين متغيرات البيئة](/ar/enterprise/guides/deploy-to-amp#set-environment-variables) للتفاصيل.
</Tab>
<Tab title="النشر عبر CLI">
أضف المتغيرات إلى ملف `.env` المحلي قبل تشغيل `crewai deploy create`.
سينقلها CLI بأمان إلى المنصة:
```bash
# .env
OPENAI_API_KEY=sk-...
UV_INDEX_MY_PRIVATE_REGISTRY_USERNAME=token
UV_INDEX_MY_PRIVATE_REGISTRY_PASSWORD=your-pat-here
```
```bash
crewai deploy create
```
</Tab>
</Tabs>
<Warning>
**لا ترفع** أبداً بيانات الاعتماد إلى مستودعك. استخدم متغيرات بيئة AMP لجميع الأسرار.
يجب إدراج ملف `.env` في `.gitignore`.
</Warning>
لتحديث بيانات الاعتماد في نشر حالي، راجع [تحديث طاقمك — متغيرات البيئة](/ar/enterprise/guides/update-crew).
## كيف يعمل الكل معاً
عندما يبني CrewAI AMP أتمتتك، يعمل تدفق الحل هكذا:
<Steps>
<Step title="بدء البناء">
يسحب AMP مستودعك ويقرأ `pyproject.toml` و`uv.lock`.
</Step>
<Step title="UV يحل الاعتماديات">
يقرأ UV `[tool.uv.sources]` لتحديد أي فهرس يجب أن تأتي منه كل حزمة.
</Step>
<Step title="UV يصادق">
لكل فهرس خاص، يبحث UV عن `UV_INDEX_{NAME}_USERNAME` و`UV_INDEX_{NAME}_PASSWORD`
من متغيرات البيئة التي هيأتها في AMP.
</Step>
<Step title="تثبيت الحزم">
يحمّل UV ويثبّت جميع الحزم — العامة (من PyPI) والخاصة (من سجلك).
</Step>
<Step title="تشغيل الأتمتة">
يبدأ طاقمك أو تدفقك مع توفر جميع الاعتماديات.
</Step>
</Steps>
## استكشاف الأخطاء وإصلاحها
### أخطاء المصادقة أثناء البناء
**العرض**: فشل البناء بـ `401 Unauthorized` أو `403 Forbidden` عند حل حزمة خاصة.
**تحقق من**:
- أسماء متغيرات البيئة `UV_INDEX_*` تتطابق مع اسم فهرسك بالضبط (أحرف كبيرة، شرطات → شرطات سفلية)
- بيانات الاعتماد معيّنة في متغيرات بيئة AMP، وليس فقط في `.env` محلي
- الرمز/PAT لديه صلاحيات القراءة المطلوبة لخلاصة الحزم
- الرمز لم تنتهِ صلاحيته (ذو صلة خاصة لـ AWS CodeArtifact)
### الحزمة غير موجودة
**العرض**: `No matching distribution found for my-private-package`.
**تحقق من**:
- رابط الفهرس في `pyproject.toml` ينتهي بـ `/simple/`
- إدخال `[tool.uv.sources]` يعيّن اسم الحزمة الصحيح لاسم الفهرس الصحيح
- الحزمة منشورة فعلاً في سجلك الخاص
- شغّل `uv lock` محلياً بنفس بيانات الاعتماد للتحقق من عمل الحل
### تعارضات ملف القفل
**العرض**: فشل `uv lock` أو نتائج غير متوقعة بعد إضافة فهرس خاص.
**الحل**: عيّن بيانات الاعتماد محلياً وأعد الإنشاء:
```bash
export UV_INDEX_MY_PRIVATE_REGISTRY_USERNAME=token
export UV_INDEX_MY_PRIVATE_REGISTRY_PASSWORD=your-pat
uv lock
```
ثم ارفع `uv.lock` المُحدّث.
## أدلة ذات صلة
<CardGroup cols={3}>
<Card title="التحضير للنشر" icon="clipboard-check" href="/ar/enterprise/guides/prepare-for-deployment">
تحقق من بنية المشروع والاعتماديات قبل النشر.
</Card>
<Card title="النشر على AMP" icon="rocket" href="/ar/enterprise/guides/deploy-to-amp">
انشر طاقمك أو تدفقك وهيّئ متغيرات البيئة.
</Card>
<Card title="تحديث طاقمك" icon="arrows-rotate" href="/ar/enterprise/guides/update-crew">
حدّث متغيرات البيئة وادفع التغييرات إلى نشر قائم.
</Card>
</CardGroup>

View File

@@ -1,112 +0,0 @@
---
title: "تصدير مكون React"
description: "تعلم كيفية تصدير ودمج مكونات React من CrewAI AMP في تطبيقاتك"
icon: "react"
mode: "wide"
---
يشرح هذا الدليل كيفية تصدير طواقم CrewAI AMP كمكونات React ودمجها في تطبيقاتك.
## تصدير مكون React
<Steps>
<Step title="تصدير المكون">
انقر على القائمة (ثلاث نقاط على يمين طاقمك المنشور) واختر خيار التصدير واحفظ الملف محلياً. سنستخدم `CrewLead.jsx` في مثالنا.
<Frame>
<img src="/images/enterprise/export-react-component.png" alt="تصدير مكون React" />
</Frame>
</Step>
</Steps>
## إعداد بيئة React
لتشغيل مكون React هذا محلياً، ستحتاج لإعداد بيئة تطوير React ودمج هذا المكون في مشروع React.
<Steps>
<Step title="تثبيت Node.js">
- حمّل وثبّت Node.js من الموقع الرسمي: https://nodejs.org/
- اختر إصدار LTS (الدعم طويل المدى) للاستقرار.
</Step>
<Step title="إنشاء مشروع React جديد">
- افتح Command Prompt أو PowerShell
- انتقل إلى المجلد الذي تريد إنشاء مشروعك فيه
- شغّل الأمر التالي لإنشاء مشروع React جديد:
```bash
npx create-react-app my-crew-app
```
- انتقل إلى مجلد المشروع:
```bash
cd my-crew-app
```
</Step>
<Step title="تثبيت الاعتماديات اللازمة">
```bash
npm install react-dom
```
</Step>
<Step title="إنشاء مكون CrewLead">
- انقل الملف المُحمّل `CrewLead.jsx` إلى مجلد `src` في مشروعك.
</Step>
<Step title="تعديل App.js لاستخدام مكون CrewLead">
- افتح `src/App.js`
- استبدل محتوياته بشيء مثل هذا:
```jsx
import React from 'react';
import CrewLead from './CrewLead';
function App() {
return (
<div className="App">
<CrewLead baseUrl="YOUR_API_BASE_URL" bearerToken="YOUR_BEARER_TOKEN" />
</div>
);
}
export default App;
```
- استبدل `YOUR_API_BASE_URL` و`YOUR_BEARER_TOKEN` بالقيم الفعلية لـ API.
</Step>
<Step title="بدء خادم التطوير">
- في مجلد مشروعك، شغّل:
```bash
npm start
```
- سيبدأ خادم التطوير، ويجب أن يفتح متصفح الويب الافتراضي تلقائياً على `http://localhost:3000`، حيث سترى تطبيق React يعمل.
</Step>
</Steps>
## التخصيص
يمكنك بعد ذلك تخصيص `CrewLead.jsx` لإضافة اللون والعنوان وغيرها.
<Frame>
<img
src="/images/enterprise/customise-react-component.png"
alt="تخصيص مكون React"
/>
</Frame>
<Frame>
<img
src="/images/enterprise/customise-react-component-2.png"
alt="تخصيص مكون React"
/>
</Frame>
## الخطوات التالية
- خصّص تنسيق المكون ليتوافق مع تصميم تطبيقك
- أضف خصائص إضافية للتهيئة
- ادمج مع إدارة حالة تطبيقك
- أضف معالجة الأخطاء وحالات التحميل

View File

@@ -1,50 +0,0 @@
---
title: "مشغل Salesforce"
description: "تشغيل طواقم CrewAI من سير عمل Salesforce لأتمتة CRM"
icon: "salesforce"
mode: "wide"
---
يمكن تشغيل CrewAI AMP من Salesforce لأتمتة سير عمل إدارة علاقات العملاء وتعزيز عمليات المبيعات.
## نظرة عامة
Salesforce هي منصة رائدة لإدارة علاقات العملاء (CRM) تساعد الشركات على تبسيط عمليات المبيعات والخدمة والتسويق. من خلال إعداد مشغلات CrewAI من Salesforce، يمكنك:
- أتمتة تسجيل وتأهيل العملاء المحتملين
- إنشاء مواد مبيعات مخصصة
- تعزيز خدمة العملاء بردود مدعومة بالذكاء الاصطناعي
- تبسيط تحليل البيانات وإعداد التقارير
## عرض توضيحي
<iframe
className="w-full aspect-video rounded-xl"
src="https://www.youtube.com/embed/oJunVqjjfu4"
title="عرض توضيحي لمشغل CrewAI + Salesforce"
frameBorder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowFullScreen
></iframe>
## البدء
لإعداد مشغلات Salesforce:
1. **تواصل مع الدعم**: تواصل مع دعم CrewAI AMP للمساعدة في إعداد مشغل Salesforce
2. **مراجعة المتطلبات**: تأكد من أن لديك صلاحيات Salesforce اللازمة والوصول إلى API
3. **تهيئة الاتصال**: اعمل مع فريق الدعم لإنشاء الاتصال بين CrewAI ومثيل Salesforce الخاص بك
4. **اختبار المشغلات**: تحقق من عمل المشغلات بشكل صحيح مع حالات الاستخدام المحددة
## حالات الاستخدام
سيناريوهات Salesforce + CrewAI الشائعة تشمل:
- **معالجة العملاء المحتملين**: تحليل وتسجيل العملاء المحتملين الوافدين تلقائياً
- **إنشاء العروض**: إنشاء عروض مخصصة بناءً على بيانات الفرص
- **رؤى العملاء**: إنشاء تقارير تحليلية من سجل تفاعلات العملاء
- **أتمتة المتابعة**: إنشاء رسائل متابعة وتوصيات مخصصة
## الخطوات التالية
للحصول على تعليمات الإعداد المفصلة وخيارات التهيئة المتقدمة، يرجى التواصل مع دعم CrewAI AMP الذي يمكنه تقديم إرشادات مخصصة لبيئة Salesforce واحتياجات عملك المحددة.

View File

@@ -1,62 +0,0 @@
---
title: "مشغل Slack"
description: "تشغيل طواقم CrewAI مباشرة من Slack باستخدام أوامر الشرطة المائلة"
icon: "slack"
mode: "wide"
---
يشرح هذا الدليل كيفية بدء طاقم مباشرة من Slack باستخدام مشغلات CrewAI.
## المتطلبات المسبقة
- مشغل CrewAI لـ Slack مُثبّت ومتصل بمساحة عمل Slack
- طاقم واحد على الأقل مُهيأ في CrewAI
## خطوات الإعداد
<Steps>
<Step title="التأكد من إعداد مشغل CrewAI لـ Slack">
في لوحة تحكم CrewAI، انتقل إلى قسم **Triggers**.
<Frame>
<img src="/images/enterprise/slack-integration.png" alt="تكامل CrewAI مع Slack" />
</Frame>
تحقق من أن Slack مدرج ومتصل.
</Step>
<Step title="فتح قناة Slack">
- انتقل إلى القناة التي تريد تشغيل الطاقم منها.
- اكتب أمر الشرطة المائلة "**/kickoff**" لبدء عملية تشغيل الطاقم.
- يجب أن ترى "**Kickoff crew**" تظهر أثناء الكتابة:
<Frame>
<img src="/images/enterprise/kickoff-slack-crew.png" alt="تشغيل الطاقم" />
</Frame>
- اضغط Enter أو اختر خيار "**Kickoff crew**". سيظهر مربع حوار بعنوان "**Kickoff an AI Crew**".
</Step>
<Step title="اختيار الطاقم الذي تريد بدءه">
- في القائمة المنسدلة "**Select of the crews online:**"، اختر الطاقم الذي تريد بدءه.
- في المثال أدناه، تم اختيار "**prep-for-meeting**":
<Frame>
<img src="/images/enterprise/kickoff-slack-crew-dropdown.png" alt="القائمة المنسدلة لتشغيل الطاقم" />
</Frame>
- إذا كان طاقمك يتطلب أي مدخلات، انقر على زر "**Add Inputs**" لتقديمها.
<Note>
زر "**Add Inputs**" معروض في المثال أعلاه لكن لم يُنقر عليه بعد.
</Note>
</Step>
<Step title="النقر على Kickoff والانتظار حتى يكتمل الطاقم">
- بمجرد اختيار الطاقم وإضافة أي مدخلات ضرورية، انقر على "**Kickoff**" لبدء الطاقم.
<Frame>
<img src="/images/enterprise/kickoff-slack-crew-kickoff.png" alt="تشغيل الطاقم" />
</Frame>
- سيبدأ الطاقم بالتنفيذ وسترى النتائج في قناة Slack.
<Frame>
<img src="/images/enterprise/kickoff-slack-crew-results.png" alt="نتائج تشغيل الطاقم" />
</Frame>
</Step>
</Steps>
## نصائح
- تأكد من أن لديك الصلاحيات اللازمة لاستخدام أمر `/kickoff` في مساحة عمل Slack.
- إذا لم تر الطاقم المطلوب في القائمة المنسدلة، تأكد من أنه مُهيأ بشكل صحيح ومتصل في CrewAI.

View File

@@ -1,91 +0,0 @@
---
title: "إدارة الفريق"
description: "تعلم كيفية دعوة وإدارة أعضاء الفريق في مؤسسة CrewAI AMP"
icon: "users"
mode: "wide"
---
بصفتك مسؤولاً عن حساب CrewAI AMP، يمكنك بسهولة دعوة أعضاء جدد للانضمام إلى مؤسستك. يرشدك هذا الدليل خلال العملية خطوة بخطوة.
## دعوة أعضاء الفريق
<Steps>
<Step title="الوصول إلى صفحة الإعدادات">
- سجّل الدخول إلى حساب CrewAI AMP - ابحث عن أيقونة الترس في
الزاوية العلوية اليمنى من لوحة التحكم - انقر على أيقونة الترس للوصول إلى
صفحة **Settings**:
<Frame caption="صفحة الإعدادات">
<img src="/images/enterprise/settings-page.png" alt="صفحة الإعدادات" />
</Frame>
</Step>
<Step title="الانتقال إلى قسم الأعضاء">
- في صفحة الإعدادات، سترى علامة تبويب `Members` - انقر على علامة تبويب `Members`
للوصول إلى صفحة **Members**:
<Frame caption="علامة تبويب الأعضاء">
<img src="/images/enterprise/members-tab.png" alt="علامة تبويب الأعضاء" />
</Frame>
</Step>
<Step title="دعوة أعضاء جدد">
- في قسم الأعضاء، سترى قائمة بالأعضاء الحاليين (بما فيهم
أنت) - حدد موقع حقل إدخال `Email` - أدخل عنوان البريد الإلكتروني للشخص
الذي تريد دعوته - انقر على زر `Invite` لإرسال الدعوة
</Step>
<Step title="التكرار حسب الحاجة">
- يمكنك تكرار هذه العملية لدعوة أعضاء فريق متعددين - سيتلقى كل عضو
مدعو دعوة عبر البريد الإلكتروني للانضمام إلى مؤسستك
</Step>
</Steps>
## إضافة الأدوار
يمكنك إضافة أدوار لأعضاء فريقك للتحكم في وصولهم إلى أجزاء مختلفة من المنصة.
<Steps>
<Step title="الوصول إلى صفحة الإعدادات">
- سجّل الدخول إلى حساب CrewAI AMP - ابحث عن أيقونة الترس في
الزاوية العلوية اليمنى من لوحة التحكم - انقر على أيقونة الترس للوصول إلى
صفحة **Settings**:
<Frame>
<img src="/images/enterprise/settings-page.png" alt="صفحة الإعدادات" />
</Frame>
</Step>
<Step title="الانتقال إلى قسم الأعضاء">
- في صفحة الإعدادات، سترى علامة تبويب `Roles` - انقر على علامة تبويب `Roles`
للوصول إلى صفحة **Roles**.
<Frame>
<img src="/images/enterprise/roles-tab.png" alt="علامة تبويب الأدوار" />
</Frame>
- انقر على زر `Add Role` لإضافة دور جديد. - أدخل
تفاصيل وصلاحيات الدور وانقر على زر `Create Role` لإنشاء
الدور.
<Frame>
<img src="/images/enterprise/add-role-modal.png" alt="نافذة إضافة الدور" />
</Frame>
</Step>
<Step title="إضافة أدوار للأعضاء">
- في قسم الأعضاء، سترى قائمة بالأعضاء الحاليين (بما فيهم
أنت)
<Frame>
<img
src="/images/enterprise/member-accepted-invitation.png"
alt="العضو قبل الدعوة"
/>
</Frame>
- بمجرد قبول العضو للدعوة، يمكنك إضافة دور
له. - عد إلى علامة تبويب `Roles` - انتقل إلى العضو الذي تريد إضافة
دور له وتحت عمود `Role`، انقر على القائمة المنسدلة - اختر الدور
الذي تريد إضافته للعضو - انقر على زر `Update` لحفظ الدور
<Frame>
<img src="/images/enterprise/assign-role.png" alt="إضافة دور للعضو" />
</Frame>
</Step>
</Steps>
## ملاحظات مهمة
- **صلاحيات المسؤول**: فقط المستخدمون ذوو الصلاحيات الإدارية يمكنهم دعوة أعضاء جدد
- **دقة البريد الإلكتروني**: تأكد من صحة عناوين البريد الإلكتروني لأعضاء فريقك
- **قبول الدعوة**: سيحتاج الأعضاء المدعوون لقبول الدعوة للانضمام إلى مؤسستك
- **إشعارات البريد الإلكتروني**: قد ترغب في إعلام أعضاء فريقك بالتحقق من بريدهم الإلكتروني (بما في ذلك مجلدات البريد غير المرغوب) للدعوة
باتباع هذه الخطوات، يمكنك بسهولة توسيع فريقك والتعاون بشكل أكثر فعالية داخل مؤسسة CrewAI AMP.

View File

@@ -1,154 +0,0 @@
---
title: مستودع الأدوات
description: "استخدام مستودع الأدوات لإدارة أدواتك"
icon: "toolbox"
mode: "wide"
---
## نظرة عامة
مستودع الأدوات هو مدير حزم لأدوات CrewAI. يتيح للمستخدمين نشر وتثبيت وإدارة الأدوات التي تتكامل مع طواقم وتدفقات CrewAI.
يمكن أن تكون الأدوات:
- **خاصة**: متاحة فقط داخل مؤسستك (افتراضي)
- **عامة**: متاحة لجميع مستخدمي CrewAI إذا نُشرت بعلامة `--public`
المستودع ليس نظام تحكم في الإصدارات. استخدم Git لتتبع تغييرات الكود وتمكين التعاون.
## المتطلبات المسبقة
قبل استخدام مستودع الأدوات، تأكد من أن لديك:
- حساب [CrewAI AMP](https://app.crewai.com)
- [CrewAI CLI](/ar/concepts/cli#cli) مُثبّت
- uv>=0.5.0 مُثبّت. راجع [كيفية الترقية](https://docs.astral.sh/uv/getting-started/installation/#upgrading-uv)
- [Git](https://git-scm.com) مُثبّت ومُهيأ
- صلاحيات الوصول للنشر أو التثبيت في مؤسسة CrewAI AMP
## تثبيت الأدوات
لتثبيت أداة:
```bash
crewai tool install <tool-name>
```
يثبّت هذا الأداة ويضيفها إلى `pyproject.toml`.
يمكنك استخدام الأداة باستيرادها وإضافتها إلى وكلائك:
```python
from your_tool.tool import YourTool
custom_tool = YourTool()
researcher = Agent(
role='Market Research Analyst',
goal='Provide up-to-date market analysis of the AI industry',
backstory='An expert analyst with a keen eye for market trends.',
tools=[custom_tool],
verbose=True
)
```
## إضافة حزم أخرى بعد تثبيت أداة
بعد تثبيت أداة من مستودع أدوات CrewAI AMP، تحتاج لاستخدام أمر `crewai uv` لإضافة حزم أخرى لمشروعك.
استخدام أوامر `uv` المباشرة سيفشل لأن المصادقة لمستودع الأدوات يتم التعامل معها عبر CLI. باستخدام أمر `crewai uv`، يمكنك إضافة حزم أخرى لمشروعك دون القلق بشأن المصادقة.
يمكن استخدام أي أمر `uv` مع أمر `crewai uv`، مما يجعله أداة قوية لإدارة اعتماديات مشروعك دون عناء إدارة المصادقة عبر متغيرات البيئة أو طرق أخرى.
لنفرض أنك ثبّت أداة مخصصة من مستودع أدوات CrewAI AMP تسمى "my-tool":
```bash
crewai tool install my-tool
```
والآن تريد إضافة حزمة أخرى لمشروعك، يمكنك استخدام الأمر التالي:
```bash
crewai uv add requests
```
أوامر أخرى مثل `uv sync` أو `uv remove` يمكن أيضاً استخدامها مع أمر `crewai uv`:
```bash
crewai uv sync
```
```bash
crewai uv remove requests
```
سيضيف هذا الحزمة لمشروعك ويحدّث `pyproject.toml` وفقاً لذلك.
## إنشاء ونشر الأدوات
لإنشاء مشروع أداة جديد:
```bash
crewai tool create <tool-name>
```
يولّد هذا مشروع أداة مُهيكل محلياً.
بعد إجراء التغييرات، أنشئ مستودع Git وارفع الكود:
```bash
git init
git add .
git commit -m "Initial version"
```
لنشر الأداة:
```bash
crewai tool publish
```
افتراضياً، تُنشر الأدوات كخاصة. لجعل الأداة عامة:
```bash
crewai tool publish --public
```
لمزيد من التفاصيل حول بناء الأدوات، راجع [إنشاء أدواتك الخاصة](/ar/concepts/tools#creating-your-own-tools).
## تحديث الأدوات
لتحديث أداة منشورة:
1. عدّل الأداة محلياً
2. حدّث الإصدار في `pyproject.toml` (مثل من `0.1.0` إلى `0.1.1`)
3. ارفع التغييرات وانشر
```bash
git commit -m "Update version to 0.1.1"
crewai tool publish
```
## حذف الأدوات
لحذف أداة:
1. انتقل إلى [CrewAI AMP](https://app.crewai.com)
2. انتقل إلى **Tools**
3. اختر الأداة
4. انقر على **Delete**
<Warning>
الحذف نهائي. لا يمكن استعادة أو إعادة تثبيت الأدوات المحذوفة.
</Warning>
## فحوصات الأمان
كل إصدار منشور يخضع لفحوصات أمان آلية، ولا يكون متاحاً للتثبيت إلا بعد اجتيازها.
يمكنك التحقق من حالة فحص الأمان للأداة في:
`CrewAI AMP > Tools > Your Tool > Versions`
<Card title="تحتاج مساعدة؟" icon="headset" href="mailto:support@crewai.com">
تواصل مع فريق الدعم للمساعدة في تكامل API أو
استكشاف الأخطاء.
</Card>

View File

@@ -1,132 +0,0 @@
---
title: "تدريب الطواقم"
description: "قم بتدريب طواقمك المنشورة مباشرة من منصة CrewAI AMP لتحسين أداء الوكلاء بمرور الوقت"
icon: "dumbbell"
mode: "wide"
---
يتيح لك التدريب تحسين أداء الطاقم من خلال تشغيل جلسات تدريب تكرارية مباشرة من علامة تبويب **Training** في CrewAI AMP. تستخدم المنصة **وضع التدريب التلقائي** — حيث تتولى العملية التكرارية تلقائياً، على عكس تدريب CLI الذي يتطلب ملاحظات بشرية تفاعلية لكل تكرار.
بعد اكتمال التدريب، يقوم CrewAI بتقييم مخرجات الوكلاء ودمج الملاحظات في اقتراحات قابلة للتنفيذ لكل وكيل. يتم بعد ذلك تطبيق هذه الاقتراحات على تشغيلات الطاقم المستقبلية لتحسين جودة المخرجات.
<Tip>
للحصول على تفاصيل حول كيفية عمل تدريب CrewAI، راجع صفحة [مفاهيم التدريب](/ar/concepts/training).
</Tip>
## المتطلبات الأساسية
<CardGroup cols={2}>
<Card title="نشر نشط" icon="rocket">
تحتاج إلى حساب CrewAI AMP مع نشر نشط في حالة **Ready** (نوع Crew).
</Card>
<Card title="صلاحية التشغيل" icon="key">
يجب أن يكون لحسابك صلاحية تشغيل للنشر الذي تريد تدريبه.
</Card>
</CardGroup>
## كيفية تدريب طاقم
<Steps>
<Step title="افتح علامة تبويب Training">
انتقل إلى **Deployments**، انقر على نشرك، ثم اختر علامة تبويب **Training**.
</Step>
<Step title="أدخل اسم التدريب">
قدم **Training Name** — سيصبح هذا اسم ملف `.pkl` المستخدم لتخزين نتائج التدريب. على سبيل المثال، "Expert Mode Training" ينتج `expert_mode_training.pkl`.
</Step>
<Step title="املأ مدخلات الطاقم">
أدخل حقول إدخال الطاقم. هذه هي نفس المدخلات التي ستقدمها للتشغيل العادي — يتم تحميلها ديناميكياً بناءً على تكوين طاقمك.
</Step>
<Step title="ابدأ التدريب">
انقر على **Train Crew**. يتغير الزر إلى "Training..." مع مؤشر دوران أثناء تشغيل العملية.
خلف الكواليس:
- يتم إنشاء سجل تدريب للنشر الخاص بك
- تستدعي المنصة نقطة نهاية التدريب التلقائي للنشر
- يقوم الطاقم بتشغيل تكراراته تلقائياً — لا حاجة لملاحظات يدوية
</Step>
<Step title="راقب التقدم">
تعرض لوحة **Current Training Status**:
- **Status** — الحالة الحالية لجلسة التدريب
- **Nº Iterations** — عدد تكرارات التدريب المُهيأة
- **Filename** — ملف `.pkl` الذي يتم إنشاؤه
- **Started At** — وقت بدء التدريب
- **Training Inputs** — المدخلات التي قدمتها
</Step>
</Steps>
## فهم نتائج التدريب
بمجرد اكتمال التدريب، سترى بطاقات نتائج لكل وكيل تحتوي على المعلومات التالية:
- **Agent Role** — اسم/دور الوكيل في طاقمك
- **Final Quality** — درجة من 0 إلى 10 تقيّم جودة مخرجات الوكيل
- **Final Summary** — ملخص لأداء الوكيل أثناء التدريب
- **Suggestions** — توصيات قابلة للتنفيذ لتحسين سلوك الوكيل
### تحرير الاقتراحات
يمكنك تحسين الاقتراحات لأي وكيل:
<Steps>
<Step title="انقر على Edit">
في بطاقة نتائج أي وكيل، انقر على زر **Edit** بجوار الاقتراحات.
</Step>
<Step title="عدّل الاقتراحات">
حدّث نص الاقتراحات ليعكس التحسينات التي تريدها بشكل أفضل.
</Step>
<Step title="احفظ التغييرات">
انقر على **Save**. تتم مزامنة الاقتراحات المُعدّلة مع النشر وتُستخدم في جميع التشغيلات المستقبلية.
</Step>
</Steps>
## استخدام بيانات التدريب
لتطبيق نتائج التدريب على طاقمك:
1. لاحظ **Training Filename** (ملف `.pkl`) من جلسة التدريب المكتملة.
2. حدد اسم الملف هذا في تكوين kickoff أو التشغيل الخاص بنشرك.
3. يقوم الطاقم تلقائياً بتحميل ملف التدريب وتطبيق الاقتراحات المخزنة على كل وكيل.
هذا يعني أن الوكلاء يستفيدون من الملاحظات المُنشأة أثناء التدريب في كل تشغيل لاحق.
## التدريبات السابقة
يعرض الجزء السفلي من علامة تبويب Training **سجل جميع جلسات التدريب السابقة** للنشر. استخدم هذا لمراجعة التدريبات السابقة، ومقارنة النتائج، أو اختيار ملف تدريب مختلف للاستخدام.
## معالجة الأخطاء
إذا فشل تشغيل التدريب، تعرض لوحة الحالة حالة خطأ مع رسالة تصف ما حدث خطأ.
الأسباب الشائعة لفشل التدريب:
- **لم يتم تحديث وقت تشغيل النشر** — تأكد من أن نشرك يعمل بأحدث إصدار
- **أخطاء تنفيذ الطاقم** — مشاكل في منطق مهام الطاقم أو تكوين الوكيل
- **مشاكل الشبكة** — مشاكل الاتصال بين المنصة والنشر
## القيود
<Info>
ضع هذه القيود في الاعتبار عند التخطيط لسير عمل التدريب الخاص بك:
- **تدريب نشط واحد في كل مرة** لكل نشر — انتظر حتى ينتهي التشغيل الحالي قبل بدء آخر
- **وضع التدريب التلقائي فقط** — لا تدعم المنصة الملاحظات التفاعلية لكل تكرار مثل CLI
- **بيانات التدريب خاصة بالنشر** — ترتبط نتائج التدريب بمثيل وإصدار النشر المحدد
</Info>
## الموارد ذات الصلة
<CardGroup cols={3}>
<Card title="مفاهيم التدريب" icon="book" href="/ar/concepts/training">
تعلم كيف يعمل تدريب CrewAI.
</Card>
<Card title="تشغيل الطاقم" icon="play" href="/ar/enterprise/guides/kickoff-crew">
قم بتشغيل طاقمك المنشور من منصة AMP.
</Card>
<Card title="النشر على AMP" icon="cloud-arrow-up" href="/ar/enterprise/guides/deploy-to-amp">
انشر طاقمك واجعله جاهزاً للتدريب.
</Card>
</CardGroup>

View File

@@ -1,91 +0,0 @@
---
title: "تحديث الطاقم"
description: "تحديث طاقم على CrewAI AMP"
icon: "pencil"
mode: "wide"
---
<Note>
بعد نشر طاقمك على CrewAI AMP، قد تحتاج لإجراء تحديثات على
الكود أو إعدادات الأمان أو التهيئة. يشرح هذا الدليل كيفية تنفيذ
عمليات التحديث الشائعة.
</Note>
## لماذا تحديث طاقمك؟
لن يلتقط CrewAI تحديثات GitHub تلقائياً بشكل افتراضي، لذا ستحتاج لتشغيل التحديثات يدوياً، ما لم تكن قد حددت خيار `Auto-update` عند نشر طاقمك.
هناك عدة أسباب قد تدفعك لتحديث نشر طاقمك:
- تريد تحديث الكود بأحدث إيداع دفعته إلى GitHub
- تريد إعادة تعيين رمز الحامل لأسباب أمنية
- تريد تحديث متغيرات البيئة
## 1. تحديث كود طاقمك لأحدث إيداع
عندما تدفع إيداعات جديدة إلى مستودع GitHub وتريد تحديث نشرك:
1. انتقل إلى طاقمك في منصة CrewAI AMP
2. انقر على زر `Re-deploy` في صفحة تفاصيل طاقمك
<Frame>![زر إعادة النشر](/images/enterprise/redeploy-button.png)</Frame>
سيؤدي ذلك إلى تشغيل تحديث يمكنك تتبعه عبر شريط التقدم. سيسحب النظام أحدث كود من مستودعك ويعيد بناء نشرك.
## 2. إعادة تعيين رمز الحامل
إذا كنت تحتاج لإنشاء رمز حامل جديد (مثلاً، إذا كنت تشتبه في أن الرمز الحالي ربما تم اختراقه):
1. انتقل إلى طاقمك في منصة CrewAI AMP
2. ابحث عن قسم `Bearer Token`
3. انقر على زر `Reset` بجانب رمزك الحالي
<Frame>![إعادة تعيين الرمز](/images/enterprise/reset-token.png)</Frame>
<Warning>
إعادة تعيين رمز الحامل ستبطل الرمز السابق فوراً.
تأكد من تحديث أي تطبيقات أو نصوص برمجية تستخدم الرمز القديم.
</Warning>
## 3. تحديث متغيرات البيئة
لتحديث متغيرات البيئة لطاقمك:
1. أولاً ادخل صفحة النشر بالنقر على اسم طاقمك
<Frame>
![زر متغيرات البيئة](/images/enterprise/env-vars-button.png)
</Frame>
2. حدد موقع قسم `Environment Variables` (ستحتاج للنقر على أيقونة `Settings` للوصول إليه)
3. عدّل المتغيرات الحالية أو أضف جديدة في الحقول المتوفرة
4. انقر على زر `Update` بجانب كل متغير تعدّله
<Frame>
![تحديث متغيرات البيئة](/images/enterprise/update-env-vars.png)
</Frame>
5. أخيراً، انقر على زر `Update Deployment` في أسفل الصفحة لتطبيق التغييرات
<Note>
تحديث متغيرات البيئة سيشغّل نشراً جديداً، لكن هذا سيحدّث
فقط تهيئة البيئة وليس الكود نفسه.
</Note>
## بعد التحديث
بعد إجراء أي تحديث:
1. سيعيد النظام بناء وإعادة نشر طاقمك
2. يمكنك مراقبة تقدم النشر في الوقت الفعلي
3. بمجرد الاكتمال، اختبر طاقمك للتأكد من أن التغييرات تعمل كما هو متوقع
<Tip>
إذا واجهت أي مشاكل بعد التحديث، يمكنك عرض سجلات النشر في
المنصة أو التواصل مع الدعم للمساعدة.
</Tip>
<Card title="تحتاج مساعدة؟" icon="headset" href="mailto:support@crewai.com">
تواصل مع فريق الدعم للمساعدة في تحديث طاقمك أو
استكشاف أخطاء النشر.
</Card>

View File

@@ -1,157 +0,0 @@
---
title: "أتمتة Webhook"
description: "أتمتة سير عمل CrewAI AMP باستخدام webhooks مع منصات مثل ActivePieces وZapier وMake.com"
icon: "webhook"
mode: "wide"
---
يتيح لك CrewAI AMP أتمتة سير عملك باستخدام webhooks. ستوجهك هذه المقالة خلال عملية إعداد واستخدام webhooks لبدء تنفيذ طاقمك، مع التركيز على التكامل مع ActivePieces، وهي منصة أتمتة سير العمل مشابهة لـ Zapier وMake.com.
## إعداد Webhooks
<Steps>
<Step title="الوصول إلى واجهة البدء">
- انتقل إلى لوحة تحكم CrewAI AMP
- ابحث عن قسم `/kickoff`، الذي يُستخدم لبدء تنفيذ الطاقم
<Frame>
<img src="/images/enterprise/kickoff-interface.png" alt="واجهة البدء" />
</Frame>
</Step>
<Step title="تكوين محتوى JSON">
في قسم محتوى JSON، ستحتاج إلى تقديم المعلومات التالية:
- **inputs**: كائن JSON يحتوي على:
- `company`: اسم الشركة (مثال: "tesla")
- `product_name`: اسم المنتج (مثال: "crewai")
- `form_response`: نوع الاستجابة (مثال: "financial")
- `icp_description`: وصف موجز لملف العميل المثالي
- `product_description`: وصف قصير للمنتج
- `taskWebhookUrl`، `stepWebhookUrl`، `crewWebhookUrl`: عناوين URL لنقاط نهاية webhook المختلفة (ActivePieces أو Zapier أو Make.com أو منصة أخرى متوافقة)
</Step>
<Step title="التكامل مع ActivePieces">
في هذا المثال سنستخدم ActivePieces. يمكنك استخدام منصات أخرى مثل Zapier وMake.com
للتكامل مع ActivePieces:
1. أنشئ تدفقًا جديدًا في ActivePieces
2. أضف مشغلًا (مثال: جدول `Every Day`)
<Frame>
<img src="/images/enterprise/activepieces-trigger.png" alt="مشغل ActivePieces" />
</Frame>
3. أضف خطوة إجراء HTTP
- عيّن الإجراء إلى `Send HTTP request`
- استخدم `POST` كطريقة
- عيّن عنوان URL إلى نقطة نهاية بدء CrewAI AMP
- أضف الترويسات اللازمة (مثال: `Bearer Token`)
<Frame>
<img src="/images/enterprise/activepieces-headers.png" alt="ترويسات ActivePieces" />
</Frame>
- في النص، ضمّن محتوى JSON كما تم تكوينه في الخطوة 2
<Frame>
<img src="/images/enterprise/activepieces-body.png" alt="نص ActivePieces" />
</Frame>
- سيبدأ الطاقم بعد ذلك في الوقت المحدد مسبقًا.
</Step>
<Step title="إعداد Webhook">
1. أنشئ تدفقًا جديدًا في ActivePieces وسمّه
<Frame>
<img src="/images/enterprise/activepieces-flow.png" alt="تدفق ActivePieces" />
</Frame>
2. أضف خطوة webhook كمشغل:
- اختر `Catch Webhook` كنوع المشغل
- سيولّد هذا عنوان URL فريدًا سيستقبل طلبات HTTP ويشغل تدفقك
<Frame>
<img src="/images/enterprise/activepieces-webhook.png" alt="Webhook ActivePieces" />
</Frame>
- كوّن البريد الإلكتروني لاستخدام نص جسم webhook الخاص بالطاقم
<Frame>
<img src="/images/enterprise/activepieces-email.png" alt="بريد ActivePieces الإلكتروني" />
</Frame>
</Step>
</Steps>
## أمثلة مخرجات Webhook
**ملاحظة:** أي كائن `meta` مُقدم في طلب البدء الخاص بك سيتم تضمينه في جميع حمولات webhook، مما يتيح لك تتبع الطلبات والحفاظ على السياق عبر دورة حياة تنفيذ الطاقم بالكامل.
<Tabs>
<Tab title="Step Webhook">
`stepWebhookUrl` - رد نداء يتم تنفيذه عند كل فكرة داخلية للوكيل
```json
{
"prompt": "Research the financial industry for potential AI solutions",
"thought": "I need to conduct preliminary research on the financial industry",
"tool": "research_tool",
"tool_input": "financial industry AI solutions",
"result": "**Preliminary Research Report on the Financial Industry for crewai Enterprise Solution**\n1. Industry Overview and Trends\nThe financial industry in ....\nConclusion:\nThe financial industry presents a fertile ground for implementing AI solutions like crewai, particularly in areas such as digital customer engagement, risk management, and regulatory compliance. Further engagement with the lead is recommended to better tailor the crewai solution to their specific needs and scale.",
"kickoff_id": "97eba64f-958c-40a0-b61c-625fe635a3c0",
"meta": {
"requestId": "travel-req-123",
"source": "web-app"
}
}
```
</Tab>
<Tab title="Task Webhook">
`taskWebhookUrl` - رد نداء يتم تنفيذه عند انتهاء كل مهمة
```json
{
"description": "Using the information gathered from the lead's data, conduct preliminary research on the lead's industry, company background, and potential use cases for crewai. Focus on finding relevant data that can aid in scoring the lead and planning a strategy to pitch them crewai.",
"name": "Industry Research Task",
"expected_output": "Detailed research report on the financial industry",
"summary": "The financial industry presents a fertile ground for implementing AI solutions like crewai, particularly in areas such as digital customer engagement, risk management, and regulatory compliance. Further engagement with the lead is recommended to better tailor the crewai solution to their specific needs and scale.",
"agent": "Research Agent",
"output": "**Preliminary Research Report on the Financial Industry for crewai Enterprise Solution**\n1. Industry Overview and Trends\nThe financial industry in ....\nConclusion:\nThe financial industry presents a fertile ground for implementing AI solutions like crewai, particularly in areas such as digital customer engagement, risk management, and regulatory compliance.",
"output_json": {
"industry": "financial",
"key_opportunities": ["digital customer engagement", "risk management", "regulatory compliance"]
},
"kickoff_id": "97eba64f-958c-40a0-b61c-625fe635a3c0",
"meta": {
"requestId": "travel-req-123",
"source": "web-app"
}
}
```
</Tab>
<Tab title="Crew Webhook">
`crewWebhookUrl` - رد نداء يتم تنفيذه عند انتهاء تنفيذ الطاقم
```json
{
"kickoff_id": "97eba64f-958c-40a0-b61c-625fe635a3c0",
"result": "**Final Analysis Report**\n\nLead Score: Customer service enhancement and compliance are particularly relevant.\n\nTalking Points:\n- Highlight how crewai's AI solutions can transform customer service\n- Discuss crewai's potential for sustainability goals\n- Emphasize compliance capabilities\n- Stress adaptability for various operation scales",
"result_json": {
"lead_score": "Customer service enhancement, and compliance are particularly relevant.",
"talking_points": [
"Highlight how crewai's AI solutions can transform customer service with automated, personalized experiences and 24/7 support, improving both customer satisfaction and operational efficiency.",
"Discuss crewai's potential to help the institution achieve its sustainability goals through better data analysis and decision-making, contributing to responsible investing and green initiatives.",
"Emphasize crewai's ability to enhance compliance with evolving regulations through efficient data processing and reporting, reducing the risk of non-compliance penalties.",
"Stress the adaptability of crewai to support both extensive multinational operations and smaller, targeted projects, ensuring the solution grows with the institution's needs."
]
},
"token_usage": {
"total_tokens": 1250,
"prompt_tokens": 800,
"completion_tokens": 450
},
"meta": {
"requestId": "travel-req-123",
"source": "web-app"
}
}
```
</Tab>
</Tabs>

View File

@@ -1,105 +0,0 @@
---
title: "مشغل Zapier"
description: "تشغيل أطقم CrewAI من سير عمل Zapier لأتمتة سير العمل عبر التطبيقات"
icon: "bolt"
mode: "wide"
---
سيرشدك هذا الدليل خلال عملية إعداد مشغلات Zapier لـ CrewAI AMP، مما يتيح لك أتمتة سير العمل بين CrewAI AMP والتطبيقات الأخرى.
## المتطلبات الأساسية
- حساب CrewAI AMP
- حساب Zapier
- حساب Slack (لهذا المثال المحدد)
## الإعداد خطوة بخطوة
<Steps>
<Step title="إعداد مشغل Slack">
- في Zapier، أنشئ Zap جديدًا.
<Frame>
<img src="/images/enterprise/zapier-1.png" alt="Zapier 1" />
</Frame>
</Step>
<Step title="اختر Slack كتطبيق المشغل">
<Frame>
<img src="/images/enterprise/zapier-2.png" alt="Zapier 2" />
</Frame>
- اختر `New Pushed Message` كحدث المشغل.
- اربط حساب Slack الخاص بك إذا لم تفعل ذلك بالفعل.
</Step>
<Step title="تكوين إجراء CrewAI AMP">
- أضف خطوة إجراء جديدة إلى Zap الخاص بك.
- اختر CrewAI+ كتطبيق الإجراء وKickoff كحدث الإجراء
<Frame>
<img src="/images/enterprise/zapier-3.png" alt="Zapier 5" />
</Frame>
</Step>
<Step title="ربط حساب CrewAI AMP">
- اربط حساب CrewAI AMP الخاص بك.
- اختر الطاقم المناسب لسير عملك.
<Frame>
<img src="/images/enterprise/zapier-4.png" alt="Zapier 6" />
</Frame>
- كوّن مدخلات الطاقم باستخدام البيانات من رسالة Slack.
</Step>
<Step title="تنسيق مخرجات CrewAI AMP">
- أضف خطوة إجراء أخرى لتنسيق مخرجات النص من CrewAI AMP.
- استخدم أدوات التنسيق في Zapier لتحويل مخرجات Markdown إلى HTML.
<Frame>
<img src="/images/enterprise/zapier-5.png" alt="Zapier 8" />
</Frame>
<Frame>
<img src="/images/enterprise/zapier-6.png" alt="Zapier 9" />
</Frame>
</Step>
<Step title="إرسال المخرجات عبر البريد الإلكتروني">
- أضف خطوة إجراء نهائية لإرسال المخرجات المنسقة عبر البريد الإلكتروني.
- اختر خدمة البريد الإلكتروني المفضلة لديك (مثال: Gmail، Outlook).
- كوّن تفاصيل البريد الإلكتروني، بما في ذلك المستلم والموضوع والنص.
- أدرج مخرجات CrewAI AMP المنسقة في نص البريد الإلكتروني.
<Frame>
<img src="/images/enterprise/zapier-7.png" alt="Zapier 7" />
</Frame>
</Step>
<Step title="بدء تشغيل الطاقم من Slack">
- أدخل النص في قناة Slack الخاصة بك
<Frame>
<img src="/images/enterprise/zapier-7b.png" alt="Zapier 10" />
</Frame>
- اختر زر النقاط الثلاث ثم اختر Push to Zapier
<Frame>
<img src="/images/enterprise/zapier-8.png" alt="Zapier 11" />
</Frame>
</Step>
<Step title="اختر الطاقم ثم اضغط Push للبدء">
<Frame>
<img src="/images/enterprise/zapier-9.png" alt="Zapier 12" />
</Frame>
</Step>
</Steps>
## نصائح للنجاح
- تأكد من أن مدخلات CrewAI AMP مربوطة بشكل صحيح من رسالة Slack.
- اختبر Zap الخاص بك جيدًا قبل تفعيله لاكتشاف أي مشاكل محتملة.
- فكر في إضافة خطوات معالجة الأخطاء لإدارة حالات الفشل المحتملة في سير العمل.
باتباع هذه الخطوات، ستكون قد أعددت بنجاح مشغلات Zapier لـ CrewAI AMP، مما يتيح سير عمل آلي يتم تشغيله بواسطة رسائل Slack وينتج عنه إشعارات بالبريد الإلكتروني مع مخرجات CrewAI AMP.

View File

@@ -1,271 +0,0 @@
---
title: تكامل Asana
description: "تنسيق مهام الفريق والمشاريع مع تكامل Asana لـ CrewAI."
icon: "circle"
mode: "wide"
---
## نظرة عامة
مكّن وكلاءك من إدارة المهام والمشاريع وتنسيق الفريق عبر Asana. أنشئ المهام وحدّث حالة المشروع وأدر التعيينات وبسّط سير عمل فريقك مع الأتمتة المدعومة بالذكاء الاصطناعي.
## المتطلبات الأساسية
قبل استخدام تكامل Asana، تأكد من أن لديك:
- حساب [CrewAI AMP](https://app.crewai.com) مع اشتراك نشط
- حساب Asana مع الأذونات المناسبة
- ربط حساب Asana الخاص بك عبر [صفحة التكاملات](https://app.crewai.com/crewai_plus/connectors)
## إعداد تكامل Asana
### 1. ربط حساب Asana الخاص بك
1. انتقل إلى [تكاملات CrewAI AMP](https://app.crewai.com/crewai_plus/connectors)
2. ابحث عن **Asana** في قسم تكاملات المصادقة
3. انقر على **ربط** وأكمل تدفق OAuth
4. امنح الأذونات اللازمة لإدارة المهام والمشاريع
5. انسخ رمز Enterprise الخاص بك من [إعدادات التكامل](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. تثبيت الحزمة المطلوبة
```bash
uv add crewai-tools
```
### 3. إعداد متغير البيئة
<Note>
لاستخدام التكاملات مع `Agent(apps=[])`, يجب تعيين متغير البيئة
`CREWAI_PLATFORM_INTEGRATION_TOKEN` برمز Enterprise الخاص بك.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
أو أضفه إلى ملف `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## الإجراءات المتاحة
<AccordionGroup>
<Accordion title="asana/create_comment">
**الوصف:** إنشاء تعليق في Asana.
**المعاملات:**
- `task` (string, مطلوب): معرف المهمة - معرف المهمة التي سيُضاف إليها التعليق. سيُنسب التعليق للمستخدم المصادق عليه حاليًا.
- `text` (string, مطلوب): النص (مثال: "This is a comment.").
</Accordion>
<Accordion title="asana/create_project">
**الوصف:** إنشاء مشروع في Asana.
**المعاملات:**
- `name` (string, مطلوب): الاسم (مثال: "Stuff to buy").
- `workspace` (string, مطلوب): مساحة العمل - استخدم إعدادات سير عمل بوابة الاتصال للسماح للمستخدمين باختيار مساحة العمل لإنشاء المشاريع فيها. الافتراضي هو أول مساحة عمل للمستخدم إذا تُرك فارغًا.
- `team` (string, اختياري): الفريق - استخدم إعدادات سير عمل بوابة الاتصال للسماح للمستخدمين باختيار الفريق لمشاركة هذا المشروع معه. الافتراضي هو أول فريق للمستخدم إذا تُرك فارغًا.
- `notes` (string, اختياري): ملاحظات (مثال: "These are things we need to purchase.").
</Accordion>
<Accordion title="asana/get_projects">
**الوصف:** الحصول على قائمة المشاريع في Asana.
**المعاملات:**
- `archived` (string, اختياري): مؤرشف - اختر "true" لعرض المشاريع المؤرشفة، "false" لعرض المشاريع النشطة فقط، أو "default" لعرض كليهما.
- الخيارات: `default`, `true`, `false`
</Accordion>
<Accordion title="asana/get_project_by_id">
**الوصف:** الحصول على مشروع بواسطة المعرف في Asana.
**المعاملات:**
- `projectFilterId` (string, مطلوب): معرف المشروع.
</Accordion>
<Accordion title="asana/create_task">
**الوصف:** إنشاء مهمة في Asana.
**المعاملات:**
- `name` (string, مطلوب): الاسم (مثال: "Task Name").
- `workspace` (string, اختياري): مساحة العمل - استخدم إعدادات سير عمل بوابة الاتصال للسماح للمستخدمين باختيار مساحة العمل لإنشاء المهام فيها. الافتراضي هو أول مساحة عمل للمستخدم إذا تُرك فارغًا.
- `project` (string, اختياري): المشروع - استخدم إعدادات سير عمل بوابة الاتصال للسماح للمستخدمين باختيار المشروع لإنشاء هذه المهمة فيه.
- `notes` (string, اختياري): ملاحظات.
- `dueOnDate` (string, اختياري): تاريخ الاستحقاق - التاريخ الذي تستحق فيه هذه المهمة. لا يمكن استخدامه مع Due At. (مثال: "YYYY-MM-DD").
- `dueAtDate` (string, اختياري): الاستحقاق في - التاريخ والوقت (طابع زمني ISO) الذي تستحق فيه هذه المهمة. لا يمكن استخدامه مع Due On. (مثال: "2019-09-15T02:06:58.147Z").
- `assignee` (string, اختياري): المُكلف - معرف مستخدم Asana الذي سيتم تعيين هذه المهمة له. استخدم إعدادات سير عمل بوابة الاتصال للسماح للمستخدمين باختيار المُكلف.
- `gid` (string, اختياري): معرف خارجي - معرف من تطبيقك لربط هذه المهمة به. يمكنك استخدام هذا المعرف لمزامنة التحديثات لهذه المهمة لاحقًا.
</Accordion>
<Accordion title="asana/update_task">
**الوصف:** تحديث مهمة في Asana.
**المعاملات:**
- `taskId` (string, مطلوب): معرف المهمة - معرف المهمة التي سيتم تحديثها.
- `completeStatus` (string, اختياري): حالة الإكمال.
- الخيارات: `true`, `false`
- `name` (string, اختياري): الاسم (مثال: "Task Name").
- `notes` (string, اختياري): ملاحظات.
- `dueOnDate` (string, اختياري): تاريخ الاستحقاق - التاريخ الذي تستحق فيه هذه المهمة. لا يمكن استخدامه مع Due At. (مثال: "YYYY-MM-DD").
- `dueAtDate` (string, اختياري): الاستحقاق في - التاريخ والوقت (طابع زمني ISO) الذي تستحق فيه هذه المهمة. لا يمكن استخدامه مع Due On. (مثال: "2019-09-15T02:06:58.147Z").
- `assignee` (string, اختياري): المُكلف - معرف مستخدم Asana الذي سيتم تعيين هذه المهمة له.
- `gid` (string, اختياري): معرف خارجي - معرف من تطبيقك لربط هذه المهمة به.
</Accordion>
<Accordion title="asana/get_tasks">
**الوصف:** الحصول على قائمة المهام في Asana.
**المعاملات:**
- `workspace` (string, اختياري): مساحة العمل - معرف مساحة العمل لتصفية المهام عليها.
- `project` (string, اختياري): المشروع - معرف المشروع لتصفية المهام عليه.
- `assignee` (string, اختياري): المُكلف - معرف المُكلف لتصفية المهام عليه.
- `completedSince` (string, اختياري): مكتملة منذ - إرجاع المهام غير المكتملة فقط أو التي اكتملت منذ هذا الوقت (طابع زمني ISO أو Unix). (مثال: "2014-04-25T16:15:47-04:00").
</Accordion>
<Accordion title="asana/get_tasks_by_id">
**الوصف:** الحصول على قائمة المهام بواسطة المعرف في Asana.
**المعاملات:**
- `taskId` (string, مطلوب): معرف المهمة.
</Accordion>
<Accordion title="asana/get_task_by_external_id">
**الوصف:** الحصول على مهمة بواسطة المعرف الخارجي في Asana.
**المعاملات:**
- `gid` (string, مطلوب): المعرف الخارجي - المعرف الذي ترتبط أو تتزامن به هذه المهمة، من تطبيقك.
</Accordion>
<Accordion title="asana/add_task_to_section">
**الوصف:** إضافة مهمة إلى قسم في Asana.
**المعاملات:**
- `sectionId` (string, مطلوب): معرف القسم - معرف القسم لإضافة هذه المهمة إليه.
- `taskId` (string, مطلوب): معرف المهمة - معرف المهمة. (مثال: "1204619611402340").
- `beforeTaskId` (string, اختياري): معرف المهمة السابقة - معرف مهمة في هذا القسم سيتم إدراج هذه المهمة قبلها. لا يمكن استخدامه مع After Task ID. (مثال: "1204619611402340").
- `afterTaskId` (string, اختياري): معرف المهمة التالية - معرف مهمة في هذا القسم سيتم إدراج هذه المهمة بعدها. لا يمكن استخدامه مع Before Task ID. (مثال: "1204619611402340").
</Accordion>
<Accordion title="asana/get_teams">
**الوصف:** الحصول على قائمة الفرق في Asana.
**المعاملات:**
- `workspace` (string, مطلوب): مساحة العمل - إرجاع الفرق في مساحة العمل هذه المرئية للمستخدم المصرح له.
</Accordion>
<Accordion title="asana/get_workspaces">
**الوصف:** الحصول على قائمة مساحات العمل في Asana.
**المعاملات:** لا توجد معاملات مطلوبة.
</Accordion>
</AccordionGroup>
## أمثلة الاستخدام
### إعداد وكيل Asana الأساسي
```python
from crewai import Agent, Task, Crew
# Create an agent with Asana capabilities
asana_agent = Agent(
role="Project Manager",
goal="Manage tasks and projects in Asana efficiently",
backstory="An AI assistant specialized in project management and task coordination.",
apps=['asana'] # All Asana actions will be available
)
# Task to create a new project
create_project_task = Task(
description="Create a new project called 'Q1 Marketing Campaign' in the Marketing workspace",
agent=asana_agent,
expected_output="Confirmation that the project was created successfully with project ID"
)
# Run the task
crew = Crew(
agents=[asana_agent],
tasks=[create_project_task]
)
crew.kickoff()
```
### تصفية أدوات Asana محددة
```python
from crewai import Agent, Task, Crew
# Create agent with specific Asana actions only
task_manager_agent = Agent(
role="Task Manager",
goal="Create and manage tasks efficiently",
backstory="An AI assistant that focuses on task creation and management.",
apps=[
'asana/create_task',
'asana/update_task',
'asana/get_tasks'
] # Specific Asana actions
)
# Task to create and assign a task
task_management = Task(
description="Create a task called 'Review quarterly reports' and assign it to the appropriate team member",
agent=task_manager_agent,
expected_output="Task created and assigned successfully"
)
crew = Crew(
agents=[task_manager_agent],
tasks=[task_management]
)
crew.kickoff()
```
### إدارة المشاريع المتقدمة
```python
from crewai import Agent, Task, Crew
project_coordinator = Agent(
role="Project Coordinator",
goal="Coordinate project activities and track progress",
backstory="An experienced project coordinator who ensures projects run smoothly.",
apps=['asana']
)
# Complex task involving multiple Asana operations
coordination_task = Task(
description="""
1. Get all active projects in the workspace
2. For each project, get the list of incomplete tasks
3. Create a summary report task in the 'Management Reports' project
4. Add comments to overdue tasks to request status updates
""",
agent=project_coordinator,
expected_output="Summary report created and status update requests sent for overdue tasks"
)
crew = Crew(
agents=[project_coordinator],
tasks=[coordination_task]
)
crew.kickoff()
```

View File

@@ -1,280 +0,0 @@
---
title: تكامل Box
description: "تخزين الملفات وإدارة المستندات مع تكامل Box لـ CrewAI."
icon: "box"
mode: "wide"
---
## نظرة عامة
مكّن وكلاءك من إدارة الملفات والمجلدات والمستندات عبر Box. ارفع الملفات، ونظّم هياكل المجلدات، وابحث في المحتوى، وبسّط إدارة مستندات فريقك باستخدام الأتمتة المدعومة بالذكاء الاصطناعي.
## المتطلبات الأساسية
قبل استخدام تكامل Box، تأكد من توفر ما يلي:
- حساب [CrewAI AMP](https://app.crewai.com) مع اشتراك فعّال
- حساب Box بالصلاحيات المناسبة
- ربط حساب Box الخاص بك عبر [صفحة التكاملات](https://app.crewai.com/crewai_plus/connectors)
## إعداد تكامل Box
### 1. ربط حساب Box الخاص بك
1. انتقل إلى [تكاملات CrewAI AMP](https://app.crewai.com/crewai_plus/connectors)
2. ابحث عن **Box** في قسم تكاملات المصادقة
3. انقر على **Connect** وأكمل عملية OAuth
4. امنح الصلاحيات اللازمة لإدارة الملفات والمجلدات
5. انسخ رمز المؤسسة من [إعدادات التكامل](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. تثبيت الحزمة المطلوبة
```bash
uv add crewai-tools
```
### 3. إعداد متغير البيئة
<Note>
لاستخدام التكاملات مع `Agent(apps=[])`, يجب تعيين متغير البيئة
`CREWAI_PLATFORM_INTEGRATION_TOKEN` برمز المؤسسة الخاص بك.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
أو أضفه إلى ملف `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## الإجراءات المتاحة
<AccordionGroup>
<Accordion title="box/save_file">
**الوصف:** حفظ ملف من عنوان URL في Box.
**المعاملات:**
- `fileAttributes` (object, مطلوب): السمات - بيانات وصفية للملف تشمل الاسم والمجلد الأصلي والطوابع الزمنية.
```json
{
"content_created_at": "2012-12-12T10:53:43-08:00",
"content_modified_at": "2012-12-12T10:53:43-08:00",
"name": "qwerty.png",
"parent": { "id": "1234567" }
}
```
- `file` (string, مطلوب): عنوان URL للملف - يجب أن يكون حجم الملفات أقل من 50 ميجابايت. (مثال: "https://picsum.photos/200/300").
</Accordion>
<Accordion title="box/save_file_from_object">
**الوصف:** حفظ ملف في Box.
**المعاملات:**
- `file` (string, مطلوب): الملف - يقبل كائن ملف يحتوي على بيانات الملف. يجب أن يكون حجم الملفات أقل من 50 ميجابايت.
- `fileName` (string, مطلوب): اسم الملف (مثال: "qwerty.png").
- `folder` (string, اختياري): المجلد - استخدم إعدادات سير عمل بوابة الاتصال للسماح للمستخدمين باختيار وجهة مجلد الملف. يستخدم المجلد الجذري افتراضياً إذا تُرك فارغاً.
</Accordion>
<Accordion title="box/get_file_by_id">
**الوصف:** الحصول على ملف بواسطة المعرّف في Box.
**المعاملات:**
- `fileId` (string, مطلوب): معرّف الملف - المعرّف الفريد الذي يمثل ملفاً. (مثال: "12345").
</Accordion>
<Accordion title="box/list_files">
**الوصف:** عرض قائمة الملفات في Box.
**المعاملات:**
- `folderId` (string, مطلوب): معرّف المجلد - المعرّف الفريد الذي يمثل مجلداً. (مثال: "0").
- `filterFormula` (object, اختياري): فلتر بصيغة التعبير العادي المنفصل - OR لمجموعات AND من شروط فردية.
```json
{
"operator": "OR",
"conditions": [
{
"operator": "AND",
"conditions": [
{
"field": "direction",
"operator": "$stringExactlyMatches",
"value": "ASC"
}
]
}
]
}
```
</Accordion>
<Accordion title="box/create_folder">
**الوصف:** إنشاء مجلد في Box.
**المعاملات:**
- `folderName` (string, مطلوب): الاسم - اسم المجلد الجديد. (مثال: "New Folder").
- `folderParent` (object, مطلوب): المجلد الأصلي - المجلد الأصلي الذي سيُنشأ فيه المجلد الجديد.
```json
{
"id": "123456"
}
```
</Accordion>
<Accordion title="box/move_folder">
**الوصف:** نقل مجلد في Box.
**المعاملات:**
- `folderId` (string, مطلوب): معرّف المجلد - المعرّف الفريد الذي يمثل مجلداً. (مثال: "0").
- `folderName` (string, مطلوب): الاسم - اسم المجلد. (مثال: "New Folder").
- `folderParent` (object, مطلوب): المجلد الأصلي - وجهة المجلد الأصلي الجديد.
```json
{
"id": "123456"
}
```
</Accordion>
<Accordion title="box/get_folder_by_id">
**الوصف:** الحصول على مجلد بواسطة المعرّف في Box.
**المعاملات:**
- `folderId` (string, مطلوب): معرّف المجلد - المعرّف الفريد الذي يمثل مجلداً. (مثال: "0").
</Accordion>
<Accordion title="box/search_folders">
**الوصف:** البحث في المجلدات في Box.
**المعاملات:**
- `folderId` (string, مطلوب): معرّف المجلد - المجلد المراد البحث فيه.
- `filterFormula` (object, اختياري): فلتر بصيغة التعبير العادي المنفصل - OR لمجموعات AND من شروط فردية.
```json
{
"operator": "OR",
"conditions": [
{
"operator": "AND",
"conditions": [
{
"field": "sort",
"operator": "$stringExactlyMatches",
"value": "name"
}
]
}
]
}
```
</Accordion>
<Accordion title="box/delete_folder">
**الوصف:** حذف مجلد في Box.
**المعاملات:**
- `folderId` (string, مطلوب): معرّف المجلد - المعرّف الفريد الذي يمثل مجلداً. (مثال: "0").
- `recursive` (boolean, اختياري): تكراري - حذف مجلد غير فارغ بحذف المجلد وجميع محتوياته تكرارياً.
</Accordion>
</AccordionGroup>
## أمثلة الاستخدام
### إعداد Agent أساسي لـ Box
```python
from crewai import Agent, Task, Crew
from crewai import Agent, Task, Crew
# Create an agent with Box capabilities
box_agent = Agent(
role="Document Manager",
goal="Manage files and folders in Box efficiently",
backstory="An AI assistant specialized in document management and file organization.",
apps=['box'] # All Box actions will be available
)
# Task to create a folder structure
create_structure_task = Task(
description="Create a folder called 'Project Files' in the root directory and upload a document from URL",
agent=box_agent,
expected_output="Folder created and file uploaded successfully"
)
# Run the task
crew = Crew(
agents=[box_agent],
tasks=[create_structure_task]
)
crew.kickoff()
```
### تصفية أدوات Box محددة
```python
from crewai import Agent, Task, Crew
# Create agent with specific Box actions only
file_organizer_agent = Agent(
role="File Organizer",
goal="Organize and manage file storage efficiently",
backstory="An AI assistant that focuses on file organization and storage management.",
apps=['box/create_folder', 'box/save_file', 'box/list_files'] # Specific Box actions
)
# Task to organize files
organization_task = Task(
description="Create a folder structure for the marketing team and organize existing files",
agent=file_organizer_agent,
expected_output="Folder structure created and files organized"
)
crew = Crew(
agents=[file_organizer_agent],
tasks=[organization_task]
)
crew.kickoff()
```
### إدارة الملفات المتقدمة
```python
from crewai import Agent, Task, Crew
file_manager = Agent(
role="File Manager",
goal="Maintain organized file structure and manage document lifecycle",
backstory="An experienced file manager who ensures documents are properly organized and accessible.",
apps=['box']
)
# Complex task involving multiple Box operations
management_task = Task(
description="""
1. List all files in the root folder
2. Create monthly archive folders for the current year
3. Move old files to appropriate archive folders
4. Generate a summary report of the file organization
""",
agent=file_manager,
expected_output="Files organized into archive structure with summary report"
)
crew = Crew(
agents=[file_manager],
tasks=[management_task]
)
crew.kickoff()
```

View File

@@ -1,301 +0,0 @@
---
title: تكامل ClickUp
description: "إدارة المهام والإنتاجية مع تكامل ClickUp لـ CrewAI."
icon: "list-check"
mode: "wide"
---
## نظرة عامة
مكّن وكلاءك من إدارة المهام والمشاريع وسير عمل الإنتاجية عبر ClickUp. أنشئ المهام وحدّثها، ونظّم المشاريع، وأدر تعيينات الفريق، وبسّط إدارة إنتاجيتك باستخدام الأتمتة المدعومة بالذكاء الاصطناعي.
## المتطلبات الأساسية
قبل استخدام تكامل ClickUp، تأكد من توفر ما يلي:
- حساب [CrewAI AMP](https://app.crewai.com) مع اشتراك فعّال
- حساب ClickUp بالصلاحيات المناسبة
- ربط حساب ClickUp الخاص بك عبر [صفحة التكاملات](https://app.crewai.com/crewai_plus/connectors)
## إعداد تكامل ClickUp
### 1. ربط حساب ClickUp الخاص بك
1. انتقل إلى [تكاملات CrewAI AMP](https://app.crewai.com/crewai_plus/connectors)
2. ابحث عن **ClickUp** في قسم تكاملات المصادقة
3. انقر على **Connect** وأكمل عملية OAuth
4. امنح الصلاحيات اللازمة لإدارة المهام والمشاريع
5. انسخ رمز المؤسسة من [إعدادات التكامل](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. تثبيت الحزمة المطلوبة
```bash
uv add crewai-tools
```
### 3. إعداد متغير البيئة
<Note>
لاستخدام التكاملات مع `Agent(apps=[])`, يجب تعيين متغير البيئة
`CREWAI_PLATFORM_INTEGRATION_TOKEN` برمز المؤسسة الخاص بك.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
أو أضفه إلى ملف `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## الإجراءات المتاحة
<AccordionGroup>
<Accordion title="clickup/search_tasks">
**الوصف:** البحث عن المهام في ClickUp باستخدام فلاتر متقدمة.
**المعاملات:**
- `taskFilterFormula` (object, اختياري): فلتر بصيغة التعبير العادي المنفصل - OR لمجموعات AND من شروط فردية.
```json
{
"operator": "OR",
"conditions": [
{
"operator": "AND",
"conditions": [
{
"field": "statuses%5B%5D",
"operator": "$stringExactlyMatches",
"value": "open"
}
]
}
]
}
```
الحقول المتاحة: `space_ids%5B%5D`, `project_ids%5B%5D`, `list_ids%5B%5D`, `statuses%5B%5D`, `include_closed`, `assignees%5B%5D`, `tags%5B%5D`, `due_date_gt`, `due_date_lt`, `date_created_gt`, `date_created_lt`, `date_updated_gt`, `date_updated_lt`
</Accordion>
<Accordion title="clickup/get_task_in_list">
**الوصف:** الحصول على المهام في قائمة محددة في ClickUp.
**المعاملات:**
- `listId` (string, مطلوب): القائمة - اختر قائمة للحصول على المهام منها. استخدم إعدادات المستخدم في بوابة الاتصال للسماح للمستخدمين باختيار قائمة ClickUp.
- `taskFilterFormula` (string, اختياري): البحث عن المهام التي تطابق الفلاتر المحددة. مثال: name=task1.
</Accordion>
<Accordion title="clickup/create_task">
**الوصف:** إنشاء مهمة في ClickUp.
**المعاملات:**
- `listId` (string, مطلوب): القائمة - اختر قائمة لإنشاء هذه المهمة فيها.
- `name` (string, مطلوب): الاسم - اسم المهمة.
- `description` (string, اختياري): الوصف - وصف المهمة.
- `status` (string, اختياري): الحالة - اختر حالة لهذه المهمة.
- `assignees` (string, اختياري): المكلّفون - اختر عضواً (أو مصفوفة من معرّفات الأعضاء) ليتم تعيينهم لهذه المهمة.
- `dueDate` (string, اختياري): تاريخ الاستحقاق - حدد تاريخ استحقاق لهذه المهمة.
- `additionalFields` (string, اختياري): حقول إضافية - حدد حقولاً إضافية لتضمينها في هذه المهمة بصيغة JSON.
</Accordion>
<Accordion title="clickup/update_task">
**الوصف:** تحديث مهمة في ClickUp.
**المعاملات:**
- `taskId` (string, مطلوب): معرّف المهمة - معرّف المهمة المراد تحديثها.
- `listId` (string, مطلوب): القائمة - اختر قائمة لإنشاء هذه المهمة فيها.
- `name` (string, اختياري): الاسم - اسم المهمة.
- `description` (string, اختياري): الوصف - وصف المهمة.
- `status` (string, اختياري): الحالة - اختر حالة لهذه المهمة.
- `assignees` (string, اختياري): المكلّفون - اختر عضواً (أو مصفوفة من معرّفات الأعضاء) ليتم تعيينهم لهذه المهمة.
- `dueDate` (string, اختياري): تاريخ الاستحقاق - حدد تاريخ استحقاق لهذه المهمة.
- `additionalFields` (string, اختياري): حقول إضافية - حدد حقولاً إضافية لتضمينها في هذه المهمة بصيغة JSON.
</Accordion>
<Accordion title="clickup/delete_task">
**الوصف:** حذف مهمة في ClickUp.
**المعاملات:**
- `taskId` (string, مطلوب): معرّف المهمة - معرّف المهمة المراد حذفها.
</Accordion>
<Accordion title="clickup/get_list">
**الوصف:** الحصول على معلومات القائمة في ClickUp.
**المعاملات:**
- `spaceId` (string, مطلوب): معرّف المساحة - معرّف المساحة التي تحتوي على القوائم.
</Accordion>
<Accordion title="clickup/get_custom_fields_in_list">
**الوصف:** الحصول على الحقول المخصصة في قائمة في ClickUp.
**المعاملات:**
- `listId` (string, مطلوب): معرّف القائمة - معرّف القائمة للحصول على الحقول المخصصة منها.
</Accordion>
<Accordion title="clickup/get_all_fields_in_list">
**الوصف:** الحصول على جميع الحقول في قائمة في ClickUp.
**المعاملات:**
- `listId` (string, مطلوب): معرّف القائمة - معرّف القائمة للحصول على جميع الحقول منها.
</Accordion>
<Accordion title="clickup/get_space">
**الوصف:** الحصول على معلومات المساحة في ClickUp.
**المعاملات:**
- `spaceId` (string, اختياري): معرّف المساحة - معرّف المساحة المراد استرجاعها.
</Accordion>
<Accordion title="clickup/get_folders">
**الوصف:** الحصول على المجلدات في ClickUp.
**المعاملات:**
- `spaceId` (string, مطلوب): معرّف المساحة - معرّف المساحة التي تحتوي على المجلدات.
</Accordion>
<Accordion title="clickup/get_member">
**الوصف:** الحصول على معلومات العضو في ClickUp.
**المعاملات:** لا توجد معاملات مطلوبة.
</Accordion>
</AccordionGroup>
## أمثلة الاستخدام
### إعداد Agent أساسي لـ ClickUp
```python
from crewai import Agent, Task, Crew
from crewai import Agent, Task, Crew
# Create an agent with Clickup capabilities
clickup_agent = Agent(
role="Task Manager",
goal="Manage tasks and projects in ClickUp efficiently",
backstory="An AI assistant specialized in task management and productivity coordination.",
apps=['clickup'] # All Clickup actions will be available
)
# Task to create a new task
create_task = Task(
description="Create a task called 'Review Q1 Reports' in the Marketing list with high priority",
agent=clickup_agent,
expected_output="Task created successfully with task ID"
)
# Run the task
crew = Crew(
agents=[clickup_agent],
tasks=[create_task]
)
crew.kickoff()
```
### تصفية أدوات ClickUp محددة
```python
task_coordinator = Agent(
role="Task Coordinator",
goal="Create and manage tasks efficiently",
backstory="An AI assistant that focuses on task creation and status management.",
apps=['clickup/create_task']
)
# Task to manage task workflow
task_workflow = Task(
description="Create a task for project planning and assign it to the development team",
agent=task_coordinator,
expected_output="Task created and assigned successfully"
)
crew = Crew(
agents=[task_coordinator],
tasks=[task_workflow]
)
crew.kickoff()
```
### إدارة المشاريع المتقدمة
```python
from crewai import Agent, Task, Crew
project_manager = Agent(
role="Project Manager",
goal="Coordinate project activities and track team productivity",
backstory="An experienced project manager who ensures projects are delivered on time.",
apps=['clickup']
)
# Complex task involving multiple ClickUp operations
project_coordination = Task(
description="""
1. Get all open tasks in the current space
2. Identify overdue tasks and update their status
3. Create a weekly report task summarizing project progress
4. Assign the report task to the team lead
""",
agent=project_manager,
expected_output="Project status updated and weekly report task created and assigned"
)
crew = Crew(
agents=[project_manager],
tasks=[project_coordination]
)
crew.kickoff()
```
### البحث في المهام وإدارتها
```python
from crewai import Agent, Task, Crew
task_analyst = Agent(
role="Task Analyst",
goal="Analyze task patterns and optimize team productivity",
backstory="An AI assistant that analyzes task data to improve team efficiency.",
apps=['clickup']
)
# Task to analyze and optimize task distribution
task_analysis = Task(
description="""
Search for all tasks assigned to team members in the last 30 days,
analyze completion patterns, and create optimization recommendations
""",
agent=task_analyst,
expected_output="Task analysis report with optimization recommendations"
)
crew = Crew(
agents=[task_analyst],
tasks=[task_analysis]
)
crew.kickoff()
```
### الحصول على المساعدة
<Card title="تحتاج مساعدة؟" icon="headset" href="mailto:support@crewai.com">
تواصل مع فريق الدعم للحصول على المساعدة في إعداد تكامل ClickUp أو
استكشاف الأخطاء وإصلاحها.
</Card>

View File

@@ -1,330 +0,0 @@
---
title: تكامل GitHub
description: "إدارة المستودعات والمشكلات مع تكامل GitHub لـ CrewAI."
icon: "github"
mode: "wide"
---
## نظرة عامة
مكّن وكلاءك من إدارة المستودعات والمشكلات والإصدارات عبر GitHub. أنشئ المشكلات وحدّثها، وأدر الإصدارات، وتتبع تطور المشاريع، وبسّط سير عمل تطوير البرمجيات باستخدام الأتمتة المدعومة بالذكاء الاصطناعي.
## المتطلبات الأساسية
قبل استخدام تكامل GitHub، تأكد من توفر ما يلي:
- حساب [CrewAI AMP](https://app.crewai.com) مع اشتراك فعّال
- حساب GitHub بصلاحيات المستودع المناسبة
- ربط حساب GitHub الخاص بك عبر [صفحة التكاملات](https://app.crewai.com/crewai_plus/connectors)
## إعداد تكامل GitHub
### 1. ربط حساب GitHub الخاص بك
1. انتقل إلى [تكاملات CrewAI AMP](https://app.crewai.com/crewai_plus/connectors)
2. ابحث عن **GitHub** في قسم تكاملات المصادقة
3. انقر على **Connect** وأكمل عملية OAuth
4. امنح الصلاحيات اللازمة لإدارة المستودعات والمشكلات
5. انسخ رمز المؤسسة من [إعدادات التكامل](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. تثبيت الحزمة المطلوبة
```bash
uv add crewai-tools
```
### 3. إعداد متغير البيئة
<Note>
لاستخدام التكاملات مع `Agent(apps=[])`, يجب تعيين متغير البيئة
`CREWAI_PLATFORM_INTEGRATION_TOKEN` برمز المؤسسة الخاص بك.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
أو أضفه إلى ملف `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## الإجراءات المتاحة
<AccordionGroup>
<Accordion title="github/create_issue">
**الوصف:** إنشاء مشكلة في GitHub.
**المعاملات:**
- `owner` (string, مطلوب): المالك - حدد اسم مالك الحساب للمستودع المرتبط بهذه المشكلة. (مثال: "abc").
- `repo` (string, مطلوب): المستودع - حدد اسم المستودع المرتبط بهذه المشكلة.
- `title` (string, مطلوب): عنوان المشكلة - حدد عنوان المشكلة المراد إنشاؤها.
- `body` (string, اختياري): محتوى المشكلة - حدد محتوى نص المشكلة المراد إنشاؤها.
- `assignees` (string, اختياري): المكلّفون - حدد اسم (أسماء) تسجيل الدخول في GitHub للمكلّفين كمصفوفة من السلاسل النصية لهذه المشكلة. (مثال: `["octocat"]`).
</Accordion>
<Accordion title="github/update_issue">
**الوصف:** تحديث مشكلة في GitHub.
**المعاملات:**
- `owner` (string, مطلوب): المالك - حدد اسم مالك الحساب للمستودع المرتبط بهذه المشكلة. (مثال: "abc").
- `repo` (string, مطلوب): المستودع - حدد اسم المستودع المرتبط بهذه المشكلة.
- `issue_number` (string, مطلوب): رقم المشكلة - حدد رقم المشكلة المراد تحديثها.
- `title` (string, مطلوب): عنوان المشكلة - حدد عنوان المشكلة المراد تحديثها.
- `body` (string, اختياري): محتوى المشكلة - حدد محتوى نص المشكلة المراد تحديثها.
- `assignees` (string, اختياري): المكلّفون - حدد اسم (أسماء) تسجيل الدخول في GitHub للمكلّفين كمصفوفة من السلاسل النصية لهذه المشكلة. (مثال: `["octocat"]`).
- `state` (string, اختياري): الحالة - حدد الحالة المحدّثة للمشكلة.
- الخيارات: `open`, `closed`
</Accordion>
<Accordion title="github/get_issue_by_number">
**الوصف:** الحصول على مشكلة بواسطة الرقم في GitHub.
**المعاملات:**
- `owner` (string, مطلوب): المالك - حدد اسم مالك الحساب للمستودع المرتبط بهذه المشكلة. (مثال: "abc").
- `repo` (string, مطلوب): المستودع - حدد اسم المستودع المرتبط بهذه المشكلة.
- `issue_number` (string, مطلوب): رقم المشكلة - حدد رقم المشكلة المراد جلبها.
</Accordion>
<Accordion title="github/lock_issue">
**الوصف:** قفل مشكلة في GitHub.
**المعاملات:**
- `owner` (string, مطلوب): المالك - حدد اسم مالك الحساب للمستودع المرتبط بهذه المشكلة. (مثال: "abc").
- `repo` (string, مطلوب): المستودع - حدد اسم المستودع المرتبط بهذه المشكلة.
- `issue_number` (string, مطلوب): رقم المشكلة - حدد رقم المشكلة المراد قفلها.
- `lock_reason` (string, مطلوب): سبب القفل - حدد سبب قفل محادثة المشكلة أو طلب السحب.
- الخيارات: `off-topic`, `too heated`, `resolved`, `spam`
</Accordion>
<Accordion title="github/search_issue">
**الوصف:** البحث عن المشكلات في GitHub.
**المعاملات:**
- `owner` (string, مطلوب): المالك - حدد اسم مالك الحساب للمستودع المرتبط بهذه المشكلة. (مثال: "abc").
- `repo` (string, مطلوب): المستودع - حدد اسم المستودع المرتبط بهذه المشكلة.
- `filter` (object, مطلوب): فلتر بصيغة التعبير العادي المنفصل - OR لمجموعات AND من شروط فردية.
```json
{
"operator": "OR",
"conditions": [
{
"operator": "AND",
"conditions": [
{
"field": "assignee",
"operator": "$stringExactlyMatches",
"value": "octocat"
}
]
}
]
}
```
الحقول المتاحة: `assignee`, `creator`, `mentioned`, `labels`
</Accordion>
<Accordion title="github/create_release">
**الوصف:** إنشاء إصدار في GitHub.
**المعاملات:**
- `owner` (string, مطلوب): المالك - حدد اسم مالك الحساب للمستودع المرتبط بهذا الإصدار. (مثال: "abc").
- `repo` (string, مطلوب): المستودع - حدد اسم المستودع المرتبط بهذا الإصدار.
- `tag_name` (string, مطلوب): الاسم - حدد اسم وسم الإصدار المراد إنشاؤه. (مثال: "v1.0.0").
- `target_commitish` (string, اختياري): الهدف - حدد هدف الإصدار. يمكن أن يكون اسم فرع أو SHA لعملية إيداع. الافتراضي هو الفرع الرئيسي. (مثال: "master").
- `body` (string, اختياري): المحتوى - حدد وصفاً لهذا الإصدار.
- `draft` (string, اختياري): مسودة - حدد ما إذا كان الإصدار المُنشأ يجب أن يكون مسودة (غير منشور).
- الخيارات: `true`, `false`
- `prerelease` (string, اختياري): إصدار تجريبي - حدد ما إذا كان الإصدار المُنشأ يجب أن يكون إصداراً تجريبياً.
- الخيارات: `true`, `false`
- `discussion_category_name` (string, اختياري): اسم فئة المناقشة - إذا حُدد، يتم إنشاء مناقشة من الفئة المحددة وربطها بالإصدار.
- `generate_release_notes` (string, اختياري): ملاحظات الإصدار - حدد ما إذا كان يجب إنشاء ملاحظات الإصدار تلقائياً.
- الخيارات: `true`, `false`
</Accordion>
<Accordion title="github/update_release">
**الوصف:** تحديث إصدار في GitHub.
**المعاملات:**
- `owner` (string, مطلوب): المالك - حدد اسم مالك الحساب للمستودع المرتبط بهذا الإصدار. (مثال: "abc").
- `repo` (string, مطلوب): المستودع - حدد اسم المستودع المرتبط بهذا الإصدار.
- `id` (string, مطلوب): معرّف الإصدار - حدد معرّف الإصدار المراد تحديثه.
- `tag_name` (string, اختياري): الاسم - حدد اسم وسم الإصدار المراد تحديثه. (مثال: "v1.0.0").
- `target_commitish` (string, اختياري): الهدف - حدد هدف الإصدار. يمكن أن يكون اسم فرع أو SHA لعملية إيداع. الافتراضي هو الفرع الرئيسي. (مثال: "master").
- `body` (string, اختياري): المحتوى - حدد وصفاً لهذا الإصدار.
- `draft` (string, اختياري): مسودة - حدد ما إذا كان الإصدار يجب أن يكون مسودة (غير منشور).
- الخيارات: `true`, `false`
- `prerelease` (string, اختياري): إصدار تجريبي - حدد ما إذا كان الإصدار يجب أن يكون إصداراً تجريبياً.
- الخيارات: `true`, `false`
- `discussion_category_name` (string, اختياري): اسم فئة المناقشة - إذا حُدد، يتم إنشاء مناقشة من الفئة المحددة وربطها بالإصدار.
- `generate_release_notes` (string, اختياري): ملاحظات الإصدار - حدد ما إذا كان يجب إنشاء ملاحظات الإصدار تلقائياً.
- الخيارات: `true`, `false`
</Accordion>
<Accordion title="github/get_release_by_id">
**الوصف:** الحصول على إصدار بواسطة المعرّف في GitHub.
**المعاملات:**
- `owner` (string, مطلوب): المالك - حدد اسم مالك الحساب للمستودع المرتبط بهذا الإصدار. (مثال: "abc").
- `repo` (string, مطلوب): المستودع - حدد اسم المستودع المرتبط بهذا الإصدار.
- `id` (string, مطلوب): معرّف الإصدار - حدد معرّف الإصدار المراد جلبه.
</Accordion>
<Accordion title="github/get_release_by_tag_name">
**الوصف:** الحصول على إصدار بواسطة اسم الوسم في GitHub.
**المعاملات:**
- `owner` (string, مطلوب): المالك - حدد اسم مالك الحساب للمستودع المرتبط بهذا الإصدار. (مثال: "abc").
- `repo` (string, مطلوب): المستودع - حدد اسم المستودع المرتبط بهذا الإصدار.
- `tag_name` (string, مطلوب): الاسم - حدد وسم الإصدار المراد جلبه. (مثال: "v1.0.0").
</Accordion>
<Accordion title="github/delete_release">
**الوصف:** حذف إصدار في GitHub.
**المعاملات:**
- `owner` (string, مطلوب): المالك - حدد اسم مالك الحساب للمستودع المرتبط بهذا الإصدار. (مثال: "abc").
- `repo` (string, مطلوب): المستودع - حدد اسم المستودع المرتبط بهذا الإصدار.
- `id` (string, مطلوب): معرّف الإصدار - حدد معرّف الإصدار المراد حذفه.
</Accordion>
</AccordionGroup>
## أمثلة الاستخدام
### إعداد Agent أساسي لـ GitHub
```python
from crewai import Agent, Task, Crew
from crewai import Agent, Task, Crew
# Create an agent with Github capabilities
github_agent = Agent(
role="Repository Manager",
goal="Manage GitHub repositories, issues, and releases efficiently",
backstory="An AI assistant specialized in repository management and issue tracking.",
apps=['github'] # All Github actions will be available
)
# Task to create a new issue
create_issue_task = Task(
description="Create a bug report issue for the login functionality in the main repository",
agent=github_agent,
expected_output="Issue created successfully with issue number"
)
# Run the task
crew = Crew(
agents=[github_agent],
tasks=[create_issue_task]
)
crew.kickoff()
```
### تصفية أدوات GitHub محددة
```python
issue_manager = Agent(
role="Issue Manager",
goal="Create and manage GitHub issues efficiently",
backstory="An AI assistant that focuses on issue tracking and management.",
apps=['github/create_issue']
)
# Task to manage issue workflow
issue_workflow = Task(
description="Create a feature request issue and assign it to the development team",
agent=issue_manager,
expected_output="Feature request issue created and assigned successfully"
)
crew = Crew(
agents=[issue_manager],
tasks=[issue_workflow]
)
crew.kickoff()
```
### إدارة الإصدارات
```python
from crewai import Agent, Task, Crew
release_manager = Agent(
role="Release Manager",
goal="Manage software releases and versioning",
backstory="An experienced release manager who handles version control and release processes.",
apps=['github']
)
# Task to create a new release
release_task = Task(
description="""
Create a new release v2.1.0 for the project with:
- Auto-generated release notes
- Target the main branch
- Include a description of new features and bug fixes
""",
agent=release_manager,
expected_output="Release v2.1.0 created successfully with release notes"
)
crew = Crew(
agents=[release_manager],
tasks=[release_task]
)
crew.kickoff()
```
### تتبع المشكلات وإدارتها
```python
from crewai import Agent, Task, Crew
project_coordinator = Agent(
role="Project Coordinator",
goal="Track and coordinate project issues and development progress",
backstory="An AI assistant that helps coordinate development work and track project progress.",
apps=['github']
)
# Complex task involving multiple GitHub operations
coordination_task = Task(
description="""
1. Search for all open issues assigned to the current milestone
2. Identify overdue issues and update their priority labels
3. Create a weekly progress report issue
4. Lock resolved issues that have been inactive for 30 days
""",
agent=project_coordinator,
expected_output="Project coordination completed with progress report and issue management"
)
crew = Crew(
agents=[project_coordinator],
tasks=[coordination_task]
)
crew.kickoff()
```
### الحصول على المساعدة
<Card title="تحتاج مساعدة؟" icon="headset" href="mailto:support@crewai.com">
تواصل مع فريق الدعم للحصول على المساعدة في إعداد تكامل GitHub أو
استكشاف الأخطاء وإصلاحها.
</Card>

View File

@@ -1,302 +0,0 @@
---
title: تكامل Gmail
description: "إدارة البريد الإلكتروني وجهات الاتصال مع تكامل Gmail لـ CrewAI."
icon: "envelope"
mode: "wide"
---
## نظرة عامة
مكّن وكلاءك من إدارة رسائل البريد الإلكتروني وجهات الاتصال والمسودات عبر Gmail. أرسل رسائل البريد الإلكتروني، وابحث في الرسائل، وأدر جهات الاتصال، وأنشئ المسودات، وبسّط اتصالات البريد الإلكتروني باستخدام الأتمتة المدعومة بالذكاء الاصطناعي.
## المتطلبات الأساسية
قبل استخدام تكامل Gmail، تأكد من توفر ما يلي:
- حساب [CrewAI AMP](https://app.crewai.com) مع اشتراك فعّال
- حساب Gmail بالصلاحيات المناسبة
- ربط حساب Gmail الخاص بك عبر [صفحة التكاملات](https://app.crewai.com/crewai_plus/connectors)
## إعداد تكامل Gmail
### 1. ربط حساب Gmail الخاص بك
1. انتقل إلى [تكاملات CrewAI AMP](https://app.crewai.com/crewai_plus/connectors)
2. ابحث عن **Gmail** في قسم تكاملات المصادقة
3. انقر على **Connect** وأكمل عملية OAuth
4. امنح الصلاحيات اللازمة لإدارة البريد الإلكتروني وجهات الاتصال
5. انسخ رمز المؤسسة من [إعدادات التكامل](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. تثبيت الحزمة المطلوبة
```bash
uv add crewai-tools
```
### 3. إعداد متغير البيئة
<Note>
لاستخدام التكاملات مع `Agent(apps=[])`, يجب تعيين متغير البيئة
`CREWAI_PLATFORM_INTEGRATION_TOKEN` برمز المؤسسة الخاص بك.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
أو أضفه إلى ملف `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## الإجراءات المتاحة
<AccordionGroup>
<Accordion title="gmail/fetch_emails">
**الوصف:** استرجاع قائمة بالرسائل.
**المعاملات:**
- `userId` (string, مطلوب): عنوان البريد الإلكتروني للمستخدم أو 'me' للمستخدم المصادق عليه. (الافتراضي: "me")
- `q` (string, اختياري): استعلام بحث لتصفية الرسائل (مثال: 'from:someone@example.com is:unread').
- `maxResults` (integer, اختياري): الحد الأقصى لعدد الرسائل المُرجعة (1-500). (الافتراضي: 100)
- `pageToken` (string, اختياري): رمز الصفحة لاسترجاع صفحة محددة من النتائج.
- `labelIds` (array, اختياري): إرجاع الرسائل ذات التصنيفات التي تطابق جميع معرّفات التصنيف المحددة فقط.
- `includeSpamTrash` (boolean, اختياري): تضمين رسائل البريد العشوائي والمحذوفات في النتائج. (الافتراضي: false)
</Accordion>
<Accordion title="gmail/send_email">
**الوصف:** إرسال بريد إلكتروني.
**المعاملات:**
- `to` (string, مطلوب): عنوان البريد الإلكتروني للمستلم.
- `subject` (string, مطلوب): سطر موضوع البريد الإلكتروني.
- `body` (string, مطلوب): محتوى رسالة البريد الإلكتروني.
- `userId` (string, اختياري): عنوان البريد الإلكتروني للمستخدم أو 'me' للمستخدم المصادق عليه. (الافتراضي: "me")
- `cc` (string, اختياري): عناوين نسخة كربونية (مفصولة بفواصل).
- `bcc` (string, اختياري): عناوين نسخة كربونية مخفية (مفصولة بفواصل).
- `from` (string, اختياري): عنوان المرسل (إذا كان مختلفاً عن المستخدم المصادق عليه).
- `replyTo` (string, اختياري): عنوان الرد.
- `threadId` (string, اختياري): معرّف السلسلة إذا كان الرد على محادثة موجودة.
</Accordion>
<Accordion title="gmail/delete_email">
**الوصف:** حذف بريد إلكتروني بواسطة المعرّف.
**المعاملات:**
- `userId` (string, مطلوب): عنوان البريد الإلكتروني للمستخدم أو 'me' للمستخدم المصادق عليه.
- `id` (string, مطلوب): معرّف الرسالة المراد حذفها.
</Accordion>
<Accordion title="gmail/create_draft">
**الوصف:** إنشاء مسودة بريد إلكتروني جديدة.
**المعاملات:**
- `userId` (string, مطلوب): عنوان البريد الإلكتروني للمستخدم أو 'me' للمستخدم المصادق عليه.
- `message` (object, مطلوب): كائن الرسالة الذي يحتوي على محتوى المسودة.
- `raw` (string, مطلوب): رسالة البريد الإلكتروني بترميز base64url.
</Accordion>
<Accordion title="gmail/get_message">
**الوصف:** استرجاع رسالة محددة بواسطة المعرّف.
**المعاملات:**
- `userId` (string, مطلوب): عنوان البريد الإلكتروني للمستخدم أو 'me' للمستخدم المصادق عليه. (الافتراضي: "me")
- `id` (string, مطلوب): معرّف الرسالة المراد استرجاعها.
- `format` (string, اختياري): صيغة إرجاع الرسالة. الخيارات: "full", "metadata", "minimal", "raw". (الافتراضي: "full")
- `metadataHeaders` (array, اختياري): عند التحديد وكانت الصيغة METADATA، يتم تضمين الترويسات المحددة فقط.
</Accordion>
<Accordion title="gmail/get_attachment">
**الوصف:** استرجاع مرفق رسالة.
**المعاملات:**
- `userId` (string, مطلوب): عنوان البريد الإلكتروني للمستخدم أو 'me' للمستخدم المصادق عليه. (الافتراضي: "me")
- `messageId` (string, مطلوب): معرّف الرسالة التي تحتوي على المرفق.
- `id` (string, مطلوب): معرّف المرفق المراد استرجاعه.
</Accordion>
<Accordion title="gmail/fetch_thread">
**الوصف:** استرجاع سلسلة بريد إلكتروني محددة بواسطة المعرّف.
**المعاملات:**
- `userId` (string, مطلوب): عنوان البريد الإلكتروني للمستخدم أو 'me' للمستخدم المصادق عليه. (الافتراضي: "me")
- `id` (string, مطلوب): معرّف السلسلة المراد استرجاعها.
- `format` (string, اختياري): صيغة إرجاع الرسائل. الخيارات: "full", "metadata", "minimal". (الافتراضي: "full")
- `metadataHeaders` (array, اختياري): عند التحديد وكانت الصيغة METADATA، يتم تضمين الترويسات المحددة فقط.
</Accordion>
<Accordion title="gmail/modify_thread">
**الوصف:** تعديل التصنيفات المُطبقة على سلسلة.
**المعاملات:**
- `userId` (string, مطلوب): عنوان البريد الإلكتروني للمستخدم أو 'me' للمستخدم المصادق عليه. (الافتراضي: "me")
- `id` (string, مطلوب): معرّف السلسلة المراد تعديلها.
- `addLabelIds` (array, اختياري): قائمة بمعرّفات التصنيفات المراد إضافتها لهذه السلسلة.
- `removeLabelIds` (array, اختياري): قائمة بمعرّفات التصنيفات المراد إزالتها من هذه السلسلة.
</Accordion>
<Accordion title="gmail/trash_thread">
**الوصف:** نقل سلسلة إلى سلة المحذوفات.
**المعاملات:**
- `userId` (string, مطلوب): عنوان البريد الإلكتروني للمستخدم أو 'me' للمستخدم المصادق عليه. (الافتراضي: "me")
- `id` (string, مطلوب): معرّف السلسلة المراد حذفها.
</Accordion>
<Accordion title="gmail/untrash_thread">
**الوصف:** إزالة سلسلة من سلة المحذوفات.
**المعاملات:**
- `userId` (string, مطلوب): عنوان البريد الإلكتروني للمستخدم أو 'me' للمستخدم المصادق عليه. (الافتراضي: "me")
- `id` (string, مطلوب): معرّف السلسلة المراد استعادتها.
</Accordion>
</AccordionGroup>
## أمثلة الاستخدام
### إعداد Agent أساسي لـ Gmail
```python
from crewai import Agent, Task, Crew
# Create an agent with Gmail capabilities
gmail_agent = Agent(
role="Email Manager",
goal="Manage email communications and messages efficiently",
backstory="An AI assistant specialized in email management and communication.",
apps=['gmail'] # All Gmail actions will be available
)
# Task to send a follow-up email
send_email_task = Task(
description="Send a follow-up email to john@example.com about the project update meeting",
agent=gmail_agent,
expected_output="Email sent successfully with confirmation"
)
# Run the task
crew = Crew(
agents=[gmail_agent],
tasks=[send_email_task]
)
crew.kickoff()
```
### تصفية أدوات Gmail محددة
```python
from crewai import Agent, Task, Crew
# Create agent with specific Gmail actions only
email_coordinator = Agent(
role="Email Coordinator",
goal="Coordinate email communications and manage drafts",
backstory="An AI assistant that focuses on email coordination and draft management.",
apps=[
'gmail/send_email',
'gmail/fetch_emails',
'gmail/create_draft'
]
)
# Task to prepare and send emails
email_coordination = Task(
description="Search for emails from the marketing team, create a summary draft, and send it to stakeholders",
agent=email_coordinator,
expected_output="Summary email sent to stakeholders"
)
crew = Crew(
agents=[email_coordinator],
tasks=[email_coordination]
)
crew.kickoff()
```
### البحث في البريد الإلكتروني وتحليله
```python
from crewai import Agent, Task, Crew
# Create agent with Gmail search and analysis capabilities
email_analyst = Agent(
role="Email Analyst",
goal="Analyze email patterns and provide insights",
backstory="An AI assistant that analyzes email data to provide actionable insights.",
apps=['gmail/fetch_emails', 'gmail/get_message'] # Specific actions for email analysis
)
# Task to analyze email patterns
analysis_task = Task(
description="""
Search for all unread emails from the last 7 days,
categorize them by sender domain,
and create a summary report of communication patterns
""",
agent=email_analyst,
expected_output="Email analysis report with communication patterns and recommendations"
)
crew = Crew(
agents=[email_analyst],
tasks=[analysis_task]
)
crew.kickoff()
```
### إدارة السلاسل
```python
from crewai import Agent, Task, Crew
# Create agent with Gmail thread management capabilities
thread_manager = Agent(
role="Thread Manager",
goal="Organize and manage email threads efficiently",
backstory="An AI assistant that specializes in email thread organization and management.",
apps=[
'gmail/fetch_thread',
'gmail/modify_thread',
'gmail/trash_thread'
]
)
# Task to organize email threads
thread_task = Task(
description="""
1. Fetch all threads from the last month
2. Apply appropriate labels to organize threads by project
3. Archive or trash threads that are no longer relevant
""",
agent=thread_manager,
expected_output="Email threads organized with appropriate labels and cleanup completed"
)
crew = Crew(
agents=[thread_manager],
tasks=[thread_task]
)
crew.kickoff()
```
### الحصول على المساعدة
<Card title="تحتاج مساعدة؟" icon="headset" href="mailto:support@crewai.com">
تواصل مع فريق الدعم للحصول على المساعدة في إعداد تكامل Gmail أو
استكشاف الأخطاء وإصلاحها.
</Card>

View File

@@ -1,366 +0,0 @@
---
title: تكامل Google Calendar
description: "إدارة الأحداث والجداول الزمنية مع تكامل Google Calendar لـ CrewAI."
icon: "calendar"
mode: "wide"
---
## نظرة عامة
مكّن وكلاءك من إدارة أحداث التقويم والجداول الزمنية والتوفر عبر Google Calendar. أنشئ الأحداث وحدّثها، وأدر الحضور، وتحقق من التوفر، وبسّط سير عمل الجدولة باستخدام الأتمتة المدعومة بالذكاء الاصطناعي.
## المتطلبات الأساسية
قبل استخدام تكامل Google Calendar، تأكد من توفر ما يلي:
- حساب [CrewAI AMP](https://app.crewai.com) مع اشتراك فعّال
- حساب Google مع إمكانية الوصول إلى Google Calendar
- ربط حساب Google الخاص بك عبر [صفحة التكاملات](https://app.crewai.com/crewai_plus/connectors)
## إعداد تكامل Google Calendar
### 1. ربط حساب Google الخاص بك
1. انتقل إلى [تكاملات CrewAI AMP](https://app.crewai.com/crewai_plus/connectors)
2. ابحث عن **Google Calendar** في قسم تكاملات المصادقة
3. انقر على **Connect** وأكمل عملية OAuth
4. امنح الصلاحيات اللازمة للوصول إلى التقويم
5. انسخ رمز المؤسسة من [إعدادات التكامل](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. تثبيت الحزمة المطلوبة
```bash
uv add crewai-tools
```
### 3. إعداد متغير البيئة
<Note>
لاستخدام التكاملات مع `Agent(apps=[])`, يجب تعيين متغير البيئة
`CREWAI_PLATFORM_INTEGRATION_TOKEN` برمز المؤسسة الخاص بك.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
أو أضفه إلى ملف `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## الإجراءات المتاحة
<AccordionGroup>
<Accordion title="google_calendar/get_availability">
**الوصف:** الحصول على توفر التقويم (معلومات مشغول/متاح).
**المعاملات:**
- `timeMin` (string, مطلوب): وقت البداية (بصيغة RFC3339)
- `timeMax` (string, مطلوب): وقت النهاية (بصيغة RFC3339)
- `items` (array, مطلوب): معرّفات التقاويم المراد التحقق منها
```json
[
{
"id": "calendar_id"
}
]
```
- `timeZone` (string, اختياري): المنطقة الزمنية المستخدمة في الاستجابة. الافتراضي هو UTC.
- `groupExpansionMax` (integer, اختياري): الحد الأقصى لعدد معرّفات التقاويم لمجموعة واحدة. الحد الأقصى: 100
- `calendarExpansionMax` (integer, اختياري): الحد الأقصى لعدد التقاويم لتقديم معلومات التوفر. الحد الأقصى: 50
</Accordion>
<Accordion title="google_calendar/create_event">
**الوصف:** إنشاء حدث جديد في التقويم المحدد.
**المعاملات:**
- `calendarId` (string, مطلوب): معرّف التقويم (استخدم 'primary' للتقويم الرئيسي)
- `summary` (string, مطلوب): عنوان/ملخص الحدث
- `start_dateTime` (string, مطلوب): وقت البداية بصيغة RFC3339 (مثال: 2024-01-20T10:00:00-07:00)
- `end_dateTime` (string, مطلوب): وقت النهاية بصيغة RFC3339
- `description` (string, اختياري): وصف الحدث
- `timeZone` (string, اختياري): المنطقة الزمنية (مثال: America/Los_Angeles)
- `location` (string, اختياري): الموقع الجغرافي للحدث كنص حر.
- `attendees` (array, اختياري): قائمة الحضور للحدث.
```json
[
{
"email": "attendee@example.com",
"displayName": "Attendee Name",
"optional": false
}
]
```
- `reminders` (object, اختياري): معلومات حول تذكيرات الحدث.
```json
{
"useDefault": true,
"overrides": [
{
"method": "email",
"minutes": 15
}
]
}
```
- `conferenceData` (object, اختياري): المعلومات المتعلقة بالمؤتمر، مثل تفاصيل مؤتمر Google Meet.
```json
{
"createRequest": {
"requestId": "unique-request-id",
"conferenceSolutionKey": {
"type": "hangoutsMeet"
}
}
}
```
- `visibility` (string, اختياري): ظهور الحدث. الخيارات: default, public, private, confidential. الافتراضي: default
- `transparency` (string, اختياري): ما إذا كان الحدث يحجب الوقت في التقويم. الخيارات: opaque, transparent. الافتراضي: opaque
</Accordion>
<Accordion title="google_calendar/view_events">
**الوصف:** استرجاع الأحداث للتقويم المحدد.
**المعاملات:**
- `calendarId` (string, مطلوب): معرّف التقويم (استخدم 'primary' للتقويم الرئيسي)
- `timeMin` (string, اختياري): الحد الأدنى للأحداث (بصيغة RFC3339)
- `timeMax` (string, اختياري): الحد الأعلى للأحداث (بصيغة RFC3339)
- `maxResults` (integer, اختياري): الحد الأقصى لعدد الأحداث (الافتراضي 10). الحد الأدنى: 1، الحد الأقصى: 2500
- `orderBy` (string, اختياري): ترتيب الأحداث في النتيجة. الخيارات: startTime, updated. الافتراضي: startTime
- `singleEvents` (boolean, اختياري): ما إذا كان يجب توسيع الأحداث المتكررة إلى نُسخ فردية. الافتراضي: true
- `showDeleted` (boolean, اختياري): ما إذا كان يجب تضمين الأحداث المحذوفة. الافتراضي: false
- `showHiddenInvitations` (boolean, اختياري): ما إذا كان يجب تضمين الدعوات المخفية. الافتراضي: false
- `q` (string, اختياري): مصطلحات بحث نصية حرة للعثور على الأحداث المطابقة في أي حقل.
- `pageToken` (string, اختياري): رمز يحدد صفحة النتائج المراد إرجاعها.
- `timeZone` (string, اختياري): المنطقة الزمنية المستخدمة في الاستجابة.
- `updatedMin` (string, اختياري): الحد الأدنى لوقت آخر تعديل للحدث (بصيغة RFC3339) للتصفية.
- `iCalUID` (string, اختياري): يحدد معرّف حدث بصيغة iCalendar ليتم تقديمه في الاستجابة.
</Accordion>
<Accordion title="google_calendar/update_event">
**الوصف:** تحديث حدث موجود.
**المعاملات:**
- `calendarId` (string, مطلوب): معرّف التقويم
- `eventId` (string, مطلوب): معرّف الحدث المراد تحديثه
- `summary` (string, اختياري): عنوان الحدث المحدّث
- `description` (string, اختياري): وصف الحدث المحدّث
- `start_dateTime` (string, اختياري): وقت البداية المحدّث
- `end_dateTime` (string, اختياري): وقت النهاية المحدّث
</Accordion>
<Accordion title="google_calendar/delete_event">
**الوصف:** حذف حدث محدد.
**المعاملات:**
- `calendarId` (string, مطلوب): معرّف التقويم
- `eventId` (string, مطلوب): معرّف الحدث المراد حذفه
</Accordion>
<Accordion title="google_calendar/view_calendar_list">
**الوصف:** استرجاع قائمة تقاويم المستخدم.
**المعاملات:**
- `maxResults` (integer, اختياري): الحد الأقصى لعدد الإدخالات في صفحة نتائج واحدة. الحد الأدنى: 1
- `pageToken` (string, اختياري): رمز يحدد صفحة النتائج المراد إرجاعها.
- `showDeleted` (boolean, اختياري): ما إذا كان يجب تضمين إدخالات قائمة التقويم المحذوفة. الافتراضي: false
- `showHidden` (boolean, اختياري): ما إذا كان يجب عرض الإدخالات المخفية. الافتراضي: false
- `minAccessRole` (string, اختياري): الحد الأدنى لدور الوصول للمستخدم. الخيارات: freeBusyReader, owner, reader, writer
</Accordion>
</AccordionGroup>
## أمثلة الاستخدام
### إعداد Agent أساسي للتقويم
```python
from crewai import Agent, Task, Crew
# Create an agent with Google Calendar capabilities
calendar_agent = Agent(
role="Schedule Manager",
goal="Manage calendar events and scheduling efficiently",
backstory="An AI assistant specialized in calendar management and scheduling coordination.",
apps=['google_calendar'] # All Google Calendar actions will be available
)
# Task to create a meeting
create_meeting_task = Task(
description="Create a team standup meeting for tomorrow at 9 AM with the development team",
agent=calendar_agent,
expected_output="Meeting created successfully with Google Meet link"
)
# Run the task
crew = Crew(
agents=[calendar_agent],
tasks=[create_meeting_task]
)
crew.kickoff()
```
### تصفية أدوات التقويم المحددة
```python
meeting_coordinator = Agent(
role="Meeting Coordinator",
goal="Coordinate meetings and check availability",
backstory="An AI assistant that focuses on meeting scheduling and availability management.",
apps=['google_calendar/create_event', 'google_calendar/get_availability']
)
# Task to schedule a meeting with availability check
schedule_meeting = Task(
description="Check availability for next week and schedule a project review meeting with stakeholders",
agent=meeting_coordinator,
expected_output="Meeting scheduled after checking availability of all participants"
)
crew = Crew(
agents=[meeting_coordinator],
tasks=[schedule_meeting]
)
crew.kickoff()
```
### إدارة الأحداث وتحديثاتها
```python
from crewai import Agent, Task, Crew
event_manager = Agent(
role="Event Manager",
goal="Manage and update calendar events efficiently",
backstory="An experienced event manager who handles event logistics and updates.",
apps=['google_calendar']
)
# Task to manage event updates
event_management = Task(
description="""
1. List all events for this week
2. Update any events that need location changes to include video conference links
3. Check availability for upcoming meetings
""",
agent=event_manager,
expected_output="Weekly events updated with proper locations and availability checked"
)
crew = Crew(
agents=[event_manager],
tasks=[event_management]
)
crew.kickoff()
```
### التوفر وإدارة التقويم
```python
from crewai import Agent, Task, Crew
availability_coordinator = Agent(
role="Availability Coordinator",
goal="Coordinate availability and manage calendars for scheduling",
backstory="An AI assistant that specializes in availability management and calendar coordination.",
apps=['google_calendar']
)
# Task to coordinate availability
availability_task = Task(
description="""
1. Get the list of available calendars
2. Check availability for all calendars next Friday afternoon
3. Create a team meeting for the first available 2-hour slot
4. Include Google Meet link and send invitations
""",
agent=availability_coordinator,
expected_output="Team meeting scheduled based on availability with all team members invited"
)
crew = Crew(
agents=[availability_coordinator],
tasks=[availability_task]
)
crew.kickoff()
```
### سير عمل الجدولة الآلية
```python
from crewai import Agent, Task, Crew
scheduling_automator = Agent(
role="Scheduling Automator",
goal="Automate scheduling workflows and calendar management",
backstory="An AI assistant that automates complex scheduling scenarios and calendar workflows.",
apps=['google_calendar']
)
# Complex scheduling automation task
automation_task = Task(
description="""
1. List all upcoming events for the next two weeks
2. Identify any scheduling conflicts or back-to-back meetings
3. Suggest optimal meeting times by checking availability
4. Create buffer time between meetings where needed
5. Update event descriptions with agenda items and meeting links
""",
agent=scheduling_automator,
expected_output="Calendar optimized with resolved conflicts, buffer times, and updated meeting details"
)
crew = Crew(
agents=[scheduling_automator],
tasks=[automation_task]
)
crew.kickoff()
```
## استكشاف الأخطاء وإصلاحها
### المشاكل الشائعة
**أخطاء المصادقة**
- تأكد من أن حساب Google الخاص بك لديه الصلاحيات اللازمة للوصول إلى التقويم
- تحقق من أن اتصال OAuth يتضمن جميع النطاقات المطلوبة لـ Google Calendar API
- تحقق مما إذا كانت إعدادات مشاركة التقويم تسمح بمستوى الوصول المطلوب
**مشاكل إنشاء الأحداث**
- تحقق من صحة صيغ الوقت (صيغة RFC3339)
- تأكد من صحة صيغة عناوين البريد الإلكتروني للحضور
- تحقق من وجود التقويم المستهدف وإمكانية الوصول إليه
- تحقق من صحة تحديد المناطق الزمنية
**التوفر وتعارضات الوقت**
- استخدم صيغة RFC3339 المناسبة لنطاقات الوقت عند التحقق من التوفر
- تأكد من اتساق المناطق الزمنية عبر جميع العمليات
- تحقق من صحة معرّفات التقاويم عند التحقق من تقاويم متعددة
**تحديث الأحداث وحذفها**
- تحقق من صحة معرّفات الأحداث ووجودها
- تأكد من أن لديك صلاحيات التحرير للأحداث
- تحقق من أن ملكية التقويم تسمح بالتعديلات
### الحصول على المساعدة
<Card title="تحتاج مساعدة؟" icon="headset" href="mailto:support@crewai.com">
تواصل مع فريق الدعم للحصول على المساعدة في إعداد تكامل Google Calendar
أو استكشاف الأخطاء وإصلاحها.
</Card>

View File

@@ -1,493 +0,0 @@
---
title: تكامل Google Contacts
description: "إدارة جهات الاتصال والدليل مع تكامل Google Contacts لـ CrewAI."
icon: "address-book"
mode: "wide"
---
## نظرة عامة
مكّن وكلاءك من إدارة جهات الاتصال ومعلومات الدليل عبر Google Contacts. يمكنك الوصول إلى جهات الاتصال الشخصية، والبحث في أشخاص الدليل، وإنشاء معلومات الاتصال وتحديثها، وإدارة مجموعات جهات الاتصال باستخدام الأتمتة المدعومة بالذكاء الاصطناعي.
## المتطلبات الأساسية
قبل استخدام تكامل Google Contacts، تأكد من توفر ما يلي:
- حساب [CrewAI AMP](https://app.crewai.com) مع اشتراك فعّال
- حساب Google مع إمكانية الوصول إلى Google Contacts
- ربط حساب Google الخاص بك عبر [صفحة التكاملات](https://app.crewai.com/crewai_plus/connectors)
## إعداد تكامل Google Contacts
### 1. ربط حساب Google الخاص بك
1. انتقل إلى [تكاملات CrewAI AMP](https://app.crewai.com/crewai_plus/connectors)
2. ابحث عن **Google Contacts** في قسم تكاملات المصادقة
3. انقر على **Connect** وأكمل عملية OAuth
4. امنح الصلاحيات اللازمة للوصول إلى جهات الاتصال والدليل
5. انسخ رمز المؤسسة من [إعدادات التكامل](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. تثبيت الحزمة المطلوبة
```bash
uv add crewai-tools
```
### 3. إعداد متغير البيئة
<Note>
لاستخدام التكاملات مع `Agent(apps=[])`, يجب تعيين متغير البيئة
`CREWAI_PLATFORM_INTEGRATION_TOKEN` برمز المؤسسة الخاص بك.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
أو أضفه إلى ملف `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## الإجراءات المتاحة
<AccordionGroup>
<Accordion title="google_contacts/get_contacts">
**الوصف:** استرجاع جهات اتصال المستخدم من Google Contacts.
**المعاملات:**
- `pageSize` (integer, اختياري): عدد جهات الاتصال المراد إرجاعها (الحد الأقصى 1000). الحد الأدنى: 1، الحد الأقصى: 1000
- `pageToken` (string, اختياري): رمز الصفحة المراد استرجاعها.
- `personFields` (string, اختياري): الحقول المراد تضمينها (مثال: 'names,emailAddresses,phoneNumbers'). الافتراضي: names,emailAddresses,phoneNumbers
- `requestSyncToken` (boolean, اختياري): ما إذا كان يجب أن تتضمن الاستجابة رمز مزامنة. الافتراضي: false
- `sortOrder` (string, اختياري): ترتيب الفرز للاتصالات. الخيارات: LAST_MODIFIED_ASCENDING, LAST_MODIFIED_DESCENDING, FIRST_NAME_ASCENDING, LAST_NAME_ASCENDING
</Accordion>
<Accordion title="google_contacts/search_contacts">
**الوصف:** البحث عن جهات اتصال باستخدام سلسلة استعلام.
**المعاملات:**
- `query` (string, مطلوب): سلسلة استعلام البحث
- `readMask` (string, مطلوب): الحقول المراد قراءتها (مثال: 'names,emailAddresses,phoneNumbers')
- `pageSize` (integer, اختياري): عدد النتائج المراد إرجاعها. الحد الأدنى: 1، الحد الأقصى: 30
- `pageToken` (string, اختياري): رمز يحدد صفحة النتائج المراد إرجاعها.
- `sources` (array, اختياري): المصادر المراد البحث فيها. الخيارات: READ_SOURCE_TYPE_CONTACT, READ_SOURCE_TYPE_PROFILE. الافتراضي: READ_SOURCE_TYPE_CONTACT
</Accordion>
<Accordion title="google_contacts/list_directory_people">
**الوصف:** عرض قائمة الأشخاص في دليل المستخدم المصادق عليه.
**المعاملات:**
- `sources` (array, مطلوب): مصادر الدليل المراد البحث فيها. الخيارات: DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE, DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT. الافتراضي: DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE
- `pageSize` (integer, اختياري): عدد الأشخاص المراد إرجاعهم. الحد الأدنى: 1، الحد الأقصى: 1000
- `pageToken` (string, اختياري): رمز يحدد صفحة النتائج المراد إرجاعها.
- `readMask` (string, اختياري): الحقول المراد قراءتها (مثال: 'names,emailAddresses')
- `requestSyncToken` (boolean, اختياري): ما إذا كان يجب أن تتضمن الاستجابة رمز مزامنة. الافتراضي: false
- `mergeSources` (array, اختياري): بيانات إضافية لدمجها في استجابات أشخاص الدليل. الخيارات: CONTACT
</Accordion>
<Accordion title="google_contacts/search_directory_people">
**الوصف:** البحث عن أشخاص في الدليل.
**المعاملات:**
- `query` (string, مطلوب): استعلام البحث
- `sources` (string, مطلوب): مصادر الدليل (استخدم 'DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE')
- `pageSize` (integer, اختياري): عدد النتائج المراد إرجاعها
- `readMask` (string, اختياري): الحقول المراد قراءتها
</Accordion>
<Accordion title="google_contacts/list_other_contacts">
**الوصف:** عرض جهات الاتصال الأخرى (غير الموجودة في جهات الاتصال الشخصية).
**المعاملات:**
- `pageSize` (integer, اختياري): عدد جهات الاتصال المراد إرجاعها. الحد الأدنى: 1، الحد الأقصى: 1000
- `pageToken` (string, اختياري): رمز يحدد صفحة النتائج المراد إرجاعها.
- `readMask` (string, اختياري): الحقول المراد قراءتها
- `requestSyncToken` (boolean, اختياري): ما إذا كان يجب أن تتضمن الاستجابة رمز مزامنة. الافتراضي: false
</Accordion>
<Accordion title="google_contacts/search_other_contacts">
**الوصف:** البحث في جهات الاتصال الأخرى.
**المعاملات:**
- `query` (string, مطلوب): استعلام البحث
- `readMask` (string, مطلوب): الحقول المراد قراءتها (مثال: 'names,emailAddresses')
- `pageSize` (integer, اختياري): عدد النتائج
</Accordion>
<Accordion title="google_contacts/get_person">
**الوصف:** الحصول على معلومات الاتصال لشخص واحد بواسطة اسم المورد.
**المعاملات:**
- `resourceName` (string, مطلوب): اسم المورد للشخص المراد الحصول عليه (مثال: 'people/c123456789')
- `personFields` (string, اختياري): الحقول المراد تضمينها (مثال: 'names,emailAddresses,phoneNumbers'). الافتراضي: names,emailAddresses,phoneNumbers
</Accordion>
<Accordion title="google_contacts/create_contact">
**الوصف:** إنشاء جهة اتصال جديدة في دفتر عناوين المستخدم.
**المعاملات:**
- `names` (array, اختياري): أسماء الشخص
```json
[
{
"givenName": "John",
"familyName": "Doe",
"displayName": "John Doe"
}
]
```
- `emailAddresses` (array, اختياري): عناوين البريد الإلكتروني
```json
[
{
"value": "john.doe@example.com",
"type": "work"
}
]
```
- `phoneNumbers` (array, اختياري): أرقام الهاتف
```json
[
{
"value": "+1234567890",
"type": "mobile"
}
]
```
- `addresses` (array, اختياري): العناوين البريدية
```json
[
{
"formattedValue": "123 Main St, City, State 12345",
"type": "home"
}
]
```
- `organizations` (array, اختياري): المؤسسات/الشركات
```json
[
{
"name": "Company Name",
"title": "Job Title",
"type": "work"
}
]
```
</Accordion>
<Accordion title="google_contacts/update_contact">
**الوصف:** تحديث معلومات جهة اتصال موجودة.
**المعاملات:**
- `resourceName` (string, مطلوب): اسم المورد للشخص المراد تحديثه (مثال: 'people/c123456789')
- `updatePersonFields` (string, مطلوب): الحقول المراد تحديثها (مثال: 'names,emailAddresses,phoneNumbers')
- `names` (array, اختياري): أسماء الشخص
- `emailAddresses` (array, اختياري): عناوين البريد الإلكتروني
- `phoneNumbers` (array, اختياري): أرقام الهاتف
</Accordion>
<Accordion title="google_contacts/delete_contact">
**الوصف:** حذف جهة اتصال من دفتر عناوين المستخدم.
**المعاملات:**
- `resourceName` (string, مطلوب): اسم المورد للشخص المراد حذفه (مثال: 'people/c123456789')
</Accordion>
<Accordion title="google_contacts/batch_get_people">
**الوصف:** الحصول على معلومات عن عدة أشخاص في طلب واحد.
**المعاملات:**
- `resourceNames` (array, مطلوب): أسماء موارد الأشخاص المراد الحصول عليهم. الحد الأقصى: 200 عنصر
- `personFields` (string, اختياري): الحقول المراد تضمينها (مثال: 'names,emailAddresses,phoneNumbers'). الافتراضي: names,emailAddresses,phoneNumbers
</Accordion>
<Accordion title="google_contacts/list_contact_groups">
**الوصف:** عرض مجموعات جهات اتصال المستخدم (التصنيفات).
**المعاملات:**
- `pageSize` (integer, اختياري): عدد مجموعات جهات الاتصال المراد إرجاعها. الحد الأدنى: 1، الحد الأقصى: 1000
- `pageToken` (string, اختياري): رمز يحدد صفحة النتائج المراد إرجاعها.
- `groupFields` (string, اختياري): الحقول المراد تضمينها (مثال: 'name,memberCount,clientData'). الافتراضي: name,memberCount
</Accordion>
<Accordion title="google_contacts/get_contact_group">
**الوصف:** الحصول على مجموعة جهات اتصال محددة بواسطة اسم المورد.
**المعاملات:**
- `resourceName` (string, مطلوب): اسم المورد لمجموعة جهات الاتصال (مثال: 'contactGroups/myContactGroup')
- `maxMembers` (integer, اختياري): الحد الأقصى لعدد الأعضاء المراد تضمينهم. الحد الأدنى: 0، الحد الأقصى: 20000
- `groupFields` (string, اختياري): الحقول المراد تضمينها (مثال: 'name,memberCount,clientData'). الافتراضي: name,memberCount
</Accordion>
<Accordion title="google_contacts/create_contact_group">
**الوصف:** إنشاء مجموعة جهات اتصال جديدة (تصنيف).
**المعاملات:**
- `name` (string, مطلوب): اسم مجموعة جهات الاتصال
- `clientData` (array, اختياري): بيانات خاصة بالعميل
```json
[
{
"key": "data_key",
"value": "data_value"
}
]
```
</Accordion>
<Accordion title="google_contacts/update_contact_group">
**الوصف:** تحديث معلومات مجموعة جهات اتصال.
**المعاملات:**
- `resourceName` (string, مطلوب): اسم المورد لمجموعة جهات الاتصال (مثال: 'contactGroups/myContactGroup')
- `name` (string, مطلوب): اسم مجموعة جهات الاتصال
- `clientData` (array, اختياري): بيانات خاصة بالعميل
```json
[
{
"key": "data_key",
"value": "data_value"
}
]
```
</Accordion>
<Accordion title="google_contacts/delete_contact_group">
**الوصف:** حذف مجموعة جهات اتصال.
**المعاملات:**
- `resourceName` (string, مطلوب): اسم المورد لمجموعة جهات الاتصال المراد حذفها (مثال: 'contactGroups/myContactGroup')
- `deleteContacts` (boolean, اختياري): ما إذا كان يجب حذف جهات الاتصال في المجموعة أيضاً. الافتراضي: false
</Accordion>
</AccordionGroup>
## أمثلة الاستخدام
### إعداد Agent أساسي لـ Google Contacts
```python
from crewai import Agent, Task, Crew
# Create an agent with Google Contacts capabilities
contacts_agent = Agent(
role="Contact Manager",
goal="Manage contacts and directory information efficiently",
backstory="An AI assistant specialized in contact management and directory operations.",
apps=['google_contacts'] # All Google Contacts actions will be available
)
# Task to retrieve and organize contacts
contact_management_task = Task(
description="Retrieve all contacts and organize them by company affiliation",
agent=contacts_agent,
expected_output="Contacts retrieved and organized by company with summary report"
)
# Run the task
crew = Crew(
agents=[contacts_agent],
tasks=[contact_management_task]
)
crew.kickoff()
```
### البحث في الدليل وإدارته
```python
from crewai import Agent, Task, Crew
directory_manager = Agent(
role="Directory Manager",
goal="Search and manage directory people and contacts",
backstory="An AI assistant that specializes in directory management and people search.",
apps=[
'google_contacts/search_directory_people',
'google_contacts/list_directory_people',
'google_contacts/search_contacts'
]
)
# Task to search and manage directory
directory_task = Task(
description="Search for team members in the company directory and create a team contact list",
agent=directory_manager,
expected_output="Team directory compiled with contact information"
)
crew = Crew(
agents=[directory_manager],
tasks=[directory_task]
)
crew.kickoff()
```
### إنشاء جهات الاتصال وتحديثاتها
```python
from crewai import Agent, Task, Crew
contact_curator = Agent(
role="Contact Curator",
goal="Create and update contact information systematically",
backstory="An AI assistant that maintains accurate and up-to-date contact information.",
apps=['google_contacts']
)
# Task to create and update contacts
curation_task = Task(
description="""
1. Search for existing contacts related to new business partners
2. Create new contacts for partners not in the system
3. Update existing contact information with latest details
4. Organize contacts into appropriate groups
""",
agent=contact_curator,
expected_output="Contact database updated with new partners and organized groups"
)
crew = Crew(
agents=[contact_curator],
tasks=[curation_task]
)
crew.kickoff()
```
### إدارة مجموعات جهات الاتصال
```python
from crewai import Agent, Task, Crew
group_organizer = Agent(
role="Contact Group Organizer",
goal="Organize contacts into meaningful groups and categories",
backstory="An AI assistant that specializes in contact organization and group management.",
apps=['google_contacts']
)
# Task to organize contact groups
organization_task = Task(
description="""
1. List all existing contact groups
2. Analyze contact distribution across groups
3. Create new groups for better organization
4. Move contacts to appropriate groups based on their information
""",
agent=group_organizer,
expected_output="Contacts organized into logical groups with improved structure"
)
crew = Crew(
agents=[group_organizer],
tasks=[organization_task]
)
crew.kickoff()
```
### إدارة جهات الاتصال الشاملة
```python
from crewai import Agent, Task, Crew
contact_specialist = Agent(
role="Contact Management Specialist",
goal="Provide comprehensive contact management across all sources",
backstory="An AI assistant that handles all aspects of contact management including personal, directory, and other contacts.",
apps=['google_contacts']
)
# Complex contact management task
comprehensive_task = Task(
description="""
1. Retrieve contacts from all sources (personal, directory, other)
2. Search for duplicate contacts and merge information
3. Update outdated contact information
4. Create missing contacts for important stakeholders
5. Organize contacts into meaningful groups
6. Generate a comprehensive contact report
""",
agent=contact_specialist,
expected_output="Complete contact management performed with unified contact database and detailed report"
)
crew = Crew(
agents=[contact_specialist],
tasks=[comprehensive_task]
)
crew.kickoff()
```
## استكشاف الأخطاء وإصلاحها
### المشاكل الشائعة
**أخطاء الصلاحيات**
- تأكد من أن حساب Google الخاص بك لديه الصلاحيات المناسبة للوصول إلى جهات الاتصال
- تحقق من أن اتصال OAuth يتضمن النطاقات المطلوبة لـ Google Contacts API
- تحقق من منح صلاحيات الوصول للدليل لجهات اتصال المؤسسة
**مشاكل صيغة اسم المورد**
- تأكد من أن أسماء الموارد تتبع الصيغة الصحيحة (مثال: 'people/c123456789' لجهات الاتصال)
- تحقق من أن أسماء موارد مجموعات جهات الاتصال تستخدم الصيغة 'contactGroups/groupId'
- تأكد من وجود أسماء الموارد وإمكانية الوصول إليها
**مشاكل البحث والاستعلام**
- تأكد من صحة صيغة استعلامات البحث وعدم كونها فارغة
- استخدم حقول readMask المناسبة للبيانات التي تحتاجها
- تحقق من صحة تحديد مصادر البحث (جهات اتصال مقابل ملفات تعريف)
**إنشاء جهات الاتصال وتحديثاتها**
- تأكد من توفير الحقول المطلوبة عند إنشاء جهات الاتصال
- تحقق من صحة صيغة عناوين البريد الإلكتروني وأرقام الهاتف
- تأكد من أن معامل updatePersonFields يتضمن جميع الحقول التي يتم تحديثها
**مشاكل الوصول إلى الدليل**
- تأكد من أن لديك الصلاحيات المناسبة للوصول إلى دليل المؤسسة
- تحقق من صحة تحديد مصادر الدليل
- تأكد من أن مؤسستك تسمح بالوصول عبر API إلى معلومات الدليل
**الترقيم والحدود**
- انتبه لحدود حجم الصفحة (تختلف حسب نقطة النهاية)
- استخدم pageToken للترقيم عبر مجموعات النتائج الكبيرة
- احترم حدود معدل API وطبّق تأخيرات مناسبة
**مجموعات جهات الاتصال والتنظيم**
- تأكد من أن أسماء مجموعات جهات الاتصال فريدة عند إنشاء مجموعات جديدة
- تحقق من وجود جهات الاتصال قبل إضافتها إلى المجموعات
- تأكد من أن لديك صلاحيات تعديل مجموعات جهات الاتصال
### الحصول على المساعدة
<Card title="تحتاج مساعدة؟" icon="headset" href="mailto:support@crewai.com">
تواصل مع فريق الدعم للحصول على المساعدة في إعداد تكامل Google Contacts
أو استكشاف الأخطاء وإصلاحها.
</Card>

View File

@@ -1,550 +0,0 @@
---
title: تكامل Google Docs
description: "إنشاء المستندات وتحريرها مع تكامل Google Docs لـ CrewAI."
icon: "file-lines"
mode: "wide"
---
## نظرة عامة
مكّن وكلاءك من إنشاء وتحرير وإدارة مستندات Google Docs مع معالجة النصوص والتنسيق. أتمت إنشاء المستندات، وأدرج النصوص واستبدلها، وأدر نطاقات المحتوى، وبسّط سير عمل المستندات باستخدام الأتمتة المدعومة بالذكاء الاصطناعي.
## المتطلبات الأساسية
قبل استخدام تكامل Google Docs، تأكد من توفر ما يلي:
- حساب [CrewAI AMP](https://app.crewai.com) مع اشتراك فعّال
- حساب Google مع إمكانية الوصول إلى Google Docs
- ربط حساب Google الخاص بك عبر [صفحة التكاملات](https://app.crewai.com/crewai_plus/connectors)
## إعداد تكامل Google Docs
### 1. ربط حساب Google الخاص بك
1. انتقل إلى [تكاملات CrewAI AMP](https://app.crewai.com/crewai_plus/connectors)
2. ابحث عن **Google Docs** في قسم تكاملات المصادقة
3. انقر على **Connect** وأكمل عملية OAuth
4. امنح الصلاحيات اللازمة للوصول إلى المستندات
5. انسخ رمز المؤسسة من [إعدادات التكامل](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. تثبيت الحزمة المطلوبة
```bash
uv add crewai-tools
```
### 3. إعداد متغير البيئة
<Note>
لاستخدام التكاملات مع `Agent(apps=[])`, يجب تعيين متغير البيئة
`CREWAI_PLATFORM_INTEGRATION_TOKEN` برمز المؤسسة الخاص بك.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
أو أضفه إلى ملف `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## الإجراءات المتاحة
<AccordionGroup>
<Accordion title="google_docs/create_document">
**الوصف:** إنشاء مستند Google جديد.
**المعاملات:**
- `title` (string, اختياري): عنوان المستند الجديد.
</Accordion>
<Accordion title="google_docs/get_document">
**الوصف:** الحصول على محتويات وبيانات وصفية لمستند Google.
**المعاملات:**
- `documentId` (string, مطلوب): معرّف المستند المراد استرجاعه.
- `includeTabsContent` (boolean, اختياري): ما إذا كان يجب تضمين محتوى علامات التبويب. الافتراضي هو `false`.
- `suggestionsViewMode` (string, اختياري): وضع عرض الاقتراحات المراد تطبيقه. القيم: `DEFAULT_FOR_CURRENT_ACCESS`, `PREVIEW_SUGGESTIONS_ACCEPTED`, `PREVIEW_WITHOUT_SUGGESTIONS`. الافتراضي: `DEFAULT_FOR_CURRENT_ACCESS`.
</Accordion>
<Accordion title="google_docs/batch_update">
**الوصف:** تطبيق تحديث واحد أو أكثر على مستند Google.
**المعاملات:**
- `documentId` (string, مطلوب): معرّف المستند المراد تحديثه.
- `requests` (array, مطلوب): قائمة بالتحديثات المراد تطبيقها على المستند.
- `writeControl` (object, اختياري): يوفر التحكم في كيفية تنفيذ طلبات الكتابة.
</Accordion>
<Accordion title="google_docs/insert_text">
**الوصف:** إدراج نص في مستند Google في موقع محدد.
**المعاملات:**
- `documentId` (string, مطلوب): معرّف المستند المراد تحديثه.
- `text` (string, مطلوب): النص المراد إدراجه.
- `index` (integer, اختياري): الفهرس القائم على الصفر حيث يتم إدراج النص. الافتراضي هو `1`.
</Accordion>
<Accordion title="google_docs/replace_text">
**الوصف:** استبدال جميع نُسخ النص في مستند Google.
**المعاملات:**
- `documentId` (string, مطلوب): معرّف المستند المراد تحديثه.
- `containsText` (string, مطلوب): النص المراد البحث عنه واستبداله.
- `replaceText` (string, مطلوب): النص البديل.
- `matchCase` (boolean, اختياري): ما إذا كان البحث يجب أن يراعي حالة الأحرف. الافتراضي هو `false`.
</Accordion>
<Accordion title="google_docs/delete_content_range">
**الوصف:** حذف المحتوى من نطاق محدد في مستند Google.
**المعاملات:**
- `documentId` (string, مطلوب): معرّف المستند المراد تحديثه.
- `startIndex` (integer, مطلوب): فهرس بداية النطاق المراد حذفه.
- `endIndex` (integer, مطلوب): فهرس نهاية النطاق المراد حذفه.
</Accordion>
<Accordion title="google_docs/insert_page_break">
**الوصف:** إدراج فاصل صفحة في موقع محدد في مستند Google.
**المعاملات:**
- `documentId` (string, مطلوب): معرّف المستند المراد تحديثه.
- `index` (integer, اختياري): الفهرس القائم على الصفر حيث يتم إدراج فاصل الصفحة. الافتراضي هو `1`.
</Accordion>
<Accordion title="google_docs/create_named_range">
**الوصف:** إنشاء نطاق مسمّى في مستند Google.
**المعاملات:**
- `documentId` (string, مطلوب): معرّف المستند المراد تحديثه.
- `name` (string, مطلوب): اسم النطاق المسمّى.
- `startIndex` (integer, مطلوب): فهرس بداية النطاق.
- `endIndex` (integer, مطلوب): فهرس نهاية النطاق.
</Accordion>
<Accordion title="google_docs/create_document_with_content">
**الوصف:** إنشاء مستند Google جديد مع محتوى في إجراء واحد.
**المعاملات:**
- `title` (string, مطلوب): عنوان المستند الجديد.
- `content` (string, اختياري): المحتوى النصي المراد إدراجه في المستند. استخدم `\n` لفقرات جديدة.
</Accordion>
<Accordion title="google_docs/append_text">
**الوصف:** إلحاق نص بنهاية مستند Google. يُدرج تلقائياً في نهاية المستند دون الحاجة لتحديد فهرس.
**المعاملات:**
- `documentId` (string, مطلوب): معرّف المستند.
- `text` (string, مطلوب): النص المراد إلحاقه بنهاية المستند. استخدم `\n` لفقرات جديدة.
</Accordion>
<Accordion title="google_docs/set_text_bold">
**الوصف:** جعل النص غامقاً أو إزالة التنسيق الغامق في مستند Google.
**المعاملات:**
- `documentId` (string, مطلوب): معرّف المستند.
- `startIndex` (integer, مطلوب): موضع بداية النص المراد تنسيقه.
- `endIndex` (integer, مطلوب): موضع نهاية النص المراد تنسيقه (حصري).
- `bold` (boolean, مطلوب): عيّن `true` لجعله غامقاً، `false` لإزالة الغامق.
</Accordion>
<Accordion title="google_docs/set_text_italic">
**الوصف:** جعل النص مائلاً أو إزالة التنسيق المائل في مستند Google.
**المعاملات:**
- `documentId` (string, مطلوب): معرّف المستند.
- `startIndex` (integer, مطلوب): موضع بداية النص المراد تنسيقه.
- `endIndex` (integer, مطلوب): موضع نهاية النص المراد تنسيقه (حصري).
- `italic` (boolean, مطلوب): عيّن `true` لجعله مائلاً، `false` لإزالة المائل.
</Accordion>
<Accordion title="google_docs/set_text_underline">
**الوصف:** إضافة أو إزالة تنسيق التسطير من النص في مستند Google.
**المعاملات:**
- `documentId` (string, مطلوب): معرّف المستند.
- `startIndex` (integer, مطلوب): موضع بداية النص المراد تنسيقه.
- `endIndex` (integer, مطلوب): موضع نهاية النص المراد تنسيقه (حصري).
- `underline` (boolean, مطلوب): عيّن `true` للتسطير، `false` لإزالة التسطير.
</Accordion>
<Accordion title="google_docs/set_text_strikethrough">
**الوصف:** إضافة أو إزالة تنسيق يتوسطه خط من النص في مستند Google.
**المعاملات:**
- `documentId` (string, مطلوب): معرّف المستند.
- `startIndex` (integer, مطلوب): موضع بداية النص المراد تنسيقه.
- `endIndex` (integer, مطلوب): موضع نهاية النص المراد تنسيقه (حصري).
- `strikethrough` (boolean, مطلوب): عيّن `true` لإضافة يتوسطه خط، `false` للإزالة.
</Accordion>
<Accordion title="google_docs/set_font_size">
**الوصف:** تغيير حجم خط النص في مستند Google.
**المعاملات:**
- `documentId` (string, مطلوب): معرّف المستند.
- `startIndex` (integer, مطلوب): موضع بداية النص المراد تنسيقه.
- `endIndex` (integer, مطلوب): موضع نهاية النص المراد تنسيقه (حصري).
- `fontSize` (number, مطلوب): حجم الخط بالنقاط. الأحجام الشائعة: 10, 11, 12, 14, 16, 18, 24, 36.
</Accordion>
<Accordion title="google_docs/set_text_color">
**الوصف:** تغيير لون النص باستخدام قيم RGB (مقياس 0-1) في مستند Google.
**المعاملات:**
- `documentId` (string, مطلوب): معرّف المستند.
- `startIndex` (integer, مطلوب): موضع بداية النص المراد تنسيقه.
- `endIndex` (integer, مطلوب): موضع نهاية النص المراد تنسيقه (حصري).
- `red` (number, مطلوب): مكوّن الأحمر (0-1). مثال: `1` للأحمر الكامل.
- `green` (number, مطلوب): مكوّن الأخضر (0-1). مثال: `0.5` لنصف الأخضر.
- `blue` (number, مطلوب): مكوّن الأزرق (0-1). مثال: `0` لعدم وجود أزرق.
</Accordion>
<Accordion title="google_docs/create_hyperlink">
**الوصف:** تحويل نص موجود إلى رابط قابل للنقر في مستند Google.
**المعاملات:**
- `documentId` (string, مطلوب): معرّف المستند.
- `startIndex` (integer, مطلوب): موضع بداية النص المراد تحويله إلى رابط.
- `endIndex` (integer, مطلوب): موضع نهاية النص المراد تحويله إلى رابط (حصري).
- `url` (string, مطلوب): عنوان URL الذي يجب أن يشير إليه الرابط. مثال: `"https://example.com"`.
</Accordion>
<Accordion title="google_docs/apply_heading_style">
**الوصف:** تطبيق نمط عنوان أو فقرة على نطاق نصي في مستند Google.
**المعاملات:**
- `documentId` (string, مطلوب): معرّف المستند.
- `startIndex` (integer, مطلوب): موضع بداية الفقرة (الفقرات) المراد تنسيقها.
- `endIndex` (integer, مطلوب): موضع نهاية الفقرة (الفقرات) المراد تنسيقها.
- `style` (string, مطلوب): النمط المراد تطبيقه. القيم: `NORMAL_TEXT`, `TITLE`, `SUBTITLE`, `HEADING_1`, `HEADING_2`, `HEADING_3`, `HEADING_4`, `HEADING_5`, `HEADING_6`.
</Accordion>
<Accordion title="google_docs/set_paragraph_alignment">
**الوصف:** تعيين محاذاة النص للفقرات في مستند Google.
**المعاملات:**
- `documentId` (string, مطلوب): معرّف المستند.
- `startIndex` (integer, مطلوب): موضع بداية الفقرة (الفقرات) المراد محاذاتها.
- `endIndex` (integer, مطلوب): موضع نهاية الفقرة (الفقرات) المراد محاذاتها.
- `alignment` (string, مطلوب): محاذاة النص. القيم: `START` (يسار), `CENTER`, `END` (يمين), `JUSTIFIED`.
</Accordion>
<Accordion title="google_docs/set_line_spacing">
**الوصف:** تعيين تباعد الأسطر للفقرات في مستند Google.
**المعاملات:**
- `documentId` (string, مطلوب): معرّف المستند.
- `startIndex` (integer, مطلوب): موضع بداية الفقرة (الفقرات).
- `endIndex` (integer, مطلوب): موضع نهاية الفقرة (الفقرات).
- `lineSpacing` (number, مطلوب): تباعد الأسطر كنسبة مئوية. `100` = مفرد، `115` = 1.15x، `150` = 1.5x، `200` = مزدوج.
</Accordion>
<Accordion title="google_docs/create_paragraph_bullets">
**الوصف:** تحويل الفقرات إلى قائمة نقطية أو مرقمة في مستند Google.
**المعاملات:**
- `documentId` (string, مطلوب): معرّف المستند.
- `startIndex` (integer, مطلوب): موضع بداية الفقرات المراد تحويلها إلى قائمة.
- `endIndex` (integer, مطلوب): موضع نهاية الفقرات المراد تحويلها إلى قائمة.
- `bulletPreset` (string, مطلوب): نمط النقاط/الترقيم. القيم: `BULLET_DISC_CIRCLE_SQUARE`, `BULLET_DIAMONDX_ARROW3D_SQUARE`, `BULLET_CHECKBOX`, `BULLET_ARROW_DIAMOND_DISC`, `BULLET_STAR_CIRCLE_SQUARE`, `NUMBERED_DECIMAL_ALPHA_ROMAN`, `NUMBERED_DECIMAL_ALPHA_ROMAN_PARENS`, `NUMBERED_DECIMAL_NESTED`, `NUMBERED_UPPERALPHA_ALPHA_ROMAN`, `NUMBERED_UPPERROMAN_UPPERALPHA_DECIMAL`.
</Accordion>
<Accordion title="google_docs/delete_paragraph_bullets">
**الوصف:** إزالة النقاط أو الترقيم من الفقرات في مستند Google.
**المعاملات:**
- `documentId` (string, مطلوب): معرّف المستند.
- `startIndex` (integer, مطلوب): موضع بداية فقرات القائمة.
- `endIndex` (integer, مطلوب): موضع نهاية فقرات القائمة.
</Accordion>
<Accordion title="google_docs/insert_table_with_content">
**الوصف:** إدراج جدول مع محتوى في مستند Google في إجراء واحد. قدم المحتوى كمصفوفة ثنائية الأبعاد.
**المعاملات:**
- `documentId` (string, مطلوب): معرّف المستند.
- `rows` (integer, مطلوب): عدد الصفوف في الجدول.
- `columns` (integer, مطلوب): عدد الأعمدة في الجدول.
- `index` (integer, اختياري): الموضع لإدراج الجدول. إذا لم يُحدد، يُدرج الجدول في نهاية المستند.
- `content` (array, مطلوب): محتوى الجدول كمصفوفة ثنائية الأبعاد. كل مصفوفة داخلية هي صف. مثال: `[["Year", "Revenue"], ["2023", "$43B"], ["2024", "$45B"]]`.
</Accordion>
<Accordion title="google_docs/insert_table_row">
**الوصف:** إدراج صف جديد فوق أو أسفل خلية مرجعية في جدول موجود.
**المعاملات:**
- `documentId` (string, مطلوب): معرّف المستند.
- `tableStartIndex` (integer, مطلوب): فهرس بداية الجدول.
- `rowIndex` (integer, مطلوب): فهرس الصف (قائم على الصفر) للخلية المرجعية.
- `columnIndex` (integer, اختياري): فهرس العمود (قائم على الصفر) للخلية المرجعية. الافتراضي هو `0`.
- `insertBelow` (boolean, اختياري): إذا `true`، يُدرج أسفل الصف المرجعي. إذا `false`، يُدرج فوقه. الافتراضي هو `true`.
</Accordion>
<Accordion title="google_docs/insert_table_column">
**الوصف:** إدراج عمود جديد يساراً أو يميناً لخلية مرجعية في جدول موجود.
**المعاملات:**
- `documentId` (string, مطلوب): معرّف المستند.
- `tableStartIndex` (integer, مطلوب): فهرس بداية الجدول.
- `rowIndex` (integer, اختياري): فهرس الصف (قائم على الصفر) للخلية المرجعية. الافتراضي هو `0`.
- `columnIndex` (integer, مطلوب): فهرس العمود (قائم على الصفر) للخلية المرجعية.
- `insertRight` (boolean, اختياري): إذا `true`، يُدرج إلى اليمين. إذا `false`، يُدرج إلى اليسار. الافتراضي هو `true`.
</Accordion>
<Accordion title="google_docs/delete_table_row">
**الوصف:** حذف صف من جدول موجود في مستند Google.
**المعاملات:**
- `documentId` (string, مطلوب): معرّف المستند.
- `tableStartIndex` (integer, مطلوب): فهرس بداية الجدول.
- `rowIndex` (integer, مطلوب): فهرس الصف (قائم على الصفر) المراد حذفه.
- `columnIndex` (integer, اختياري): فهرس العمود (قائم على الصفر) لأي خلية في الصف. الافتراضي هو `0`.
</Accordion>
<Accordion title="google_docs/delete_table_column">
**الوصف:** حذف عمود من جدول موجود في مستند Google.
**المعاملات:**
- `documentId` (string, مطلوب): معرّف المستند.
- `tableStartIndex` (integer, مطلوب): فهرس بداية الجدول.
- `rowIndex` (integer, اختياري): فهرس الصف (قائم على الصفر) لأي خلية في العمود. الافتراضي هو `0`.
- `columnIndex` (integer, مطلوب): فهرس العمود (قائم على الصفر) المراد حذفه.
</Accordion>
<Accordion title="google_docs/merge_table_cells">
**الوصف:** دمج نطاق من خلايا الجدول في خلية واحدة. يتم الاحتفاظ بمحتوى جميع الخلايا.
**المعاملات:**
- `documentId` (string, مطلوب): معرّف المستند.
- `tableStartIndex` (integer, مطلوب): فهرس بداية الجدول.
- `rowIndex` (integer, مطلوب): فهرس الصف البادئ (قائم على الصفر) للدمج.
- `columnIndex` (integer, مطلوب): فهرس العمود البادئ (قائم على الصفر) للدمج.
- `rowSpan` (integer, مطلوب): عدد الصفوف المراد دمجها.
- `columnSpan` (integer, مطلوب): عدد الأعمدة المراد دمجها.
</Accordion>
<Accordion title="google_docs/unmerge_table_cells">
**الوصف:** إلغاء دمج خلايا جدول مدمجة سابقاً وإعادتها إلى خلايا فردية.
**المعاملات:**
- `documentId` (string, مطلوب): معرّف المستند.
- `tableStartIndex` (integer, مطلوب): فهرس بداية الجدول.
- `rowIndex` (integer, مطلوب): فهرس الصف (قائم على الصفر) للخلية المدمجة.
- `columnIndex` (integer, مطلوب): فهرس العمود (قائم على الصفر) للخلية المدمجة.
- `rowSpan` (integer, مطلوب): عدد الصفوف التي تمتد عليها الخلية المدمجة.
- `columnSpan` (integer, مطلوب): عدد الأعمدة التي تمتد عليها الخلية المدمجة.
</Accordion>
<Accordion title="google_docs/insert_inline_image">
**الوصف:** إدراج صورة من عنوان URL عام في مستند Google. يجب أن تكون الصورة متاحة للعموم، وأقل من 50 ميجابايت، وبصيغة PNG/JPEG/GIF.
**المعاملات:**
- `documentId` (string, مطلوب): معرّف المستند.
- `uri` (string, مطلوب): عنوان URL العام للصورة. يجب أن يكون متاحاً بدون مصادقة.
- `index` (integer, اختياري): الموضع لإدراج الصورة. إذا لم يُحدد، تُدرج الصورة في نهاية المستند. الافتراضي هو `1`.
</Accordion>
<Accordion title="google_docs/insert_section_break">
**الوصف:** إدراج فاصل قسم لإنشاء أقسام مستند بتنسيقات مختلفة.
**المعاملات:**
- `documentId` (string, مطلوب): معرّف المستند.
- `index` (integer, مطلوب): الموضع لإدراج فاصل القسم.
- `sectionType` (string, مطلوب): نوع فاصل القسم. القيم: `CONTINUOUS` (يبقى في نفس الصفحة), `NEXT_PAGE` (يبدأ صفحة جديدة).
</Accordion>
<Accordion title="google_docs/create_header">
**الوصف:** إنشاء ترويسة للمستند. يُرجع headerId يمكن استخدامه مع insert_text لإضافة محتوى الترويسة.
**المعاملات:**
- `documentId` (string, مطلوب): معرّف المستند.
- `type` (string, اختياري): نوع الترويسة. القيم: `DEFAULT`. الافتراضي هو `DEFAULT`.
</Accordion>
<Accordion title="google_docs/create_footer">
**الوصف:** إنشاء تذييل للمستند. يُرجع footerId يمكن استخدامه مع insert_text لإضافة محتوى التذييل.
**المعاملات:**
- `documentId` (string, مطلوب): معرّف المستند.
- `type` (string, اختياري): نوع التذييل. القيم: `DEFAULT`. الافتراضي هو `DEFAULT`.
</Accordion>
<Accordion title="google_docs/delete_header">
**الوصف:** حذف ترويسة من المستند. استخدم get_document للعثور على headerId.
**المعاملات:**
- `documentId` (string, مطلوب): معرّف المستند.
- `headerId` (string, مطلوب): معرّف الترويسة المراد حذفها.
</Accordion>
<Accordion title="google_docs/delete_footer">
**الوصف:** حذف تذييل من المستند. استخدم get_document للعثور على footerId.
**المعاملات:**
- `documentId` (string, مطلوب): معرّف المستند.
- `footerId` (string, مطلوب): معرّف التذييل المراد حذفه.
</Accordion>
</AccordionGroup>
## أمثلة الاستخدام
### إعداد Agent أساسي لـ Google Docs
```python
from crewai import Agent, Task, Crew
# Create an agent with Google Docs capabilities
docs_agent = Agent(
role="Document Creator",
goal="Create and manage Google Docs documents efficiently",
backstory="An AI assistant specialized in Google Docs document creation and editing.",
apps=['google_docs'] # All Google Docs actions will be available
)
# Task to create a new document
create_doc_task = Task(
description="Create a new Google Document titled 'Project Status Report'",
agent=docs_agent,
expected_output="New Google Document 'Project Status Report' created successfully"
)
# Run the task
crew = Crew(
agents=[docs_agent],
tasks=[create_doc_task]
)
crew.kickoff()
```
### تحرير النصوص وإدارة المحتوى
```python
from crewai import Agent, Task, Crew
# Create an agent focused on text editing
text_editor = Agent(
role="Document Editor",
goal="Edit and update content in Google Docs documents",
backstory="An AI assistant skilled in precise text editing and content management.",
apps=['google_docs/insert_text', 'google_docs/replace_text', 'google_docs/delete_content_range']
)
# Task to edit document content
edit_content_task = Task(
description="In document 'your_document_id', insert the text 'Executive Summary: ' at the beginning, then replace all instances of 'TODO' with 'COMPLETED'.",
agent=text_editor,
expected_output="Document updated with new text inserted and TODO items replaced."
)
crew = Crew(
agents=[text_editor],
tasks=[edit_content_task]
)
crew.kickoff()
```
### عمليات المستندات المتقدمة
```python
from crewai import Agent, Task, Crew
# Create an agent for advanced document operations
document_formatter = Agent(
role="Document Formatter",
goal="Apply advanced formatting and structure to Google Docs",
backstory="An AI assistant that handles complex document formatting and organization.",
apps=['google_docs/batch_update', 'google_docs/insert_page_break', 'google_docs/create_named_range']
)
# Task to format document
format_doc_task = Task(
description="In document 'your_document_id', insert a page break at position 100, create a named range called 'Introduction' for characters 1-50, and apply batch formatting updates.",
agent=document_formatter,
expected_output="Document formatted with page break, named range, and styling applied."
)
crew = Crew(
agents=[document_formatter],
tasks=[format_doc_task]
)
crew.kickoff()
```
## استكشاف الأخطاء وإصلاحها
### المشاكل الشائعة
**أخطاء المصادقة**
- تأكد من أن حساب Google الخاص بك لديه الصلاحيات اللازمة للوصول إلى Google Docs.
- تحقق من أن اتصال OAuth يتضمن جميع النطاقات المطلوبة (`https://www.googleapis.com/auth/documents`).
**مشاكل معرّف المستند**
- تحقق جيداً من صحة معرّفات المستندات.
- تأكد من وجود المستند وإمكانية الوصول إليه من حسابك.
- يمكن العثور على معرّفات المستندات في عنوان URL لـ Google Docs.
**عمليات إدراج النص والنطاقات**
- عند استخدام `insert_text` أو `delete_content_range`، تأكد من صحة مواضع الفهرس.
- تذكر أن Google Docs يستخدم فهرسة قائمة على الصفر.
- يجب أن يحتوي المستند على محتوى في مواضع الفهرس المحددة.
**تنسيق طلبات التحديث الدفعي**
- عند استخدام `batch_update`، تأكد من صحة تنسيق مصفوفة `requests` وفقاً لتوثيق Google Docs API.
- تتطلب التحديثات المعقدة هياكل JSON محددة لكل نوع طلب.
**عمليات استبدال النص**
- لـ `replace_text`، تأكد من مطابقة معامل `containsText` تماماً للنص المراد استبداله.
- استخدم معامل `matchCase` للتحكم في حساسية حالة الأحرف.
### الحصول على المساعدة
<Card title="تحتاج مساعدة؟" icon="headset" href="mailto:support@crewai.com">
تواصل مع فريق الدعم للحصول على المساعدة في إعداد تكامل Google Docs أو
استكشاف الأخطاء وإصلاحها.
</Card>

View File

@@ -1,238 +0,0 @@
---
title: تكامل Google Drive
description: "تخزين الملفات وإدارتها مع تكامل Google Drive لـ CrewAI."
icon: "google"
mode: "wide"
---
## نظرة عامة
مكّن وكلاءك من إدارة الملفات والمجلدات عبر Google Drive. ارفع الملفات وحمّلها ونظّمها وشاركها، وأنشئ المجلدات، وبسّط سير عمل إدارة المستندات باستخدام الأتمتة المدعومة بالذكاء الاصطناعي.
## المتطلبات الأساسية
قبل استخدام تكامل Google Drive، تأكد من توفر ما يلي:
- حساب [CrewAI AMP](https://app.crewai.com) مع اشتراك فعّال
- حساب Google مع إمكانية الوصول إلى Google Drive
- ربط حساب Google الخاص بك عبر [صفحة التكاملات](https://app.crewai.com/crewai_plus/connectors)
## إعداد تكامل Google Drive
### 1. ربط حساب Google الخاص بك
1. انتقل إلى [تكاملات CrewAI AMP](https://app.crewai.com/crewai_plus/connectors)
2. ابحث عن **Google Drive** في قسم تكاملات المصادقة
3. انقر على **Connect** وأكمل عملية OAuth
4. امنح الصلاحيات اللازمة لإدارة الملفات والمجلدات
5. انسخ رمز المؤسسة من [إعدادات التكامل](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. تثبيت الحزمة المطلوبة
```bash
uv add crewai-tools
```
### 3. إعداد متغير البيئة
<Note>
لاستخدام التكاملات مع `Agent(apps=[])`, يجب تعيين متغير البيئة
`CREWAI_PLATFORM_INTEGRATION_TOKEN` برمز المؤسسة الخاص بك.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
أو أضفه إلى ملف `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## الإجراءات المتاحة
<AccordionGroup>
<Accordion title="google_drive/get_file">
**الوصف:** الحصول على ملف بواسطة المعرّف من Google Drive.
**المعاملات:**
- `file_id` (string, مطلوب): معرّف الملف المراد استرجاعه.
</Accordion>
<Accordion title="google_drive/list_files">
**الوصف:** عرض قائمة الملفات في Google Drive.
**المعاملات:**
- `q` (string, اختياري): سلسلة استعلام لتصفية الملفات (مثال: "name contains 'report'").
- `page_size` (integer, اختياري): الحد الأقصى لعدد الملفات المُرجعة (الافتراضي: 100، الحد الأقصى: 1000).
- `page_token` (string, اختياري): رمز لاسترجاع الصفحة التالية من النتائج.
- `order_by` (string, اختياري): ترتيب الفرز (مثال: "name", "createdTime desc", "modifiedTime").
- `spaces` (string, اختياري): قائمة مفصولة بفواصل للمساحات المراد الاستعلام عنها (drive, appDataFolder, photos).
</Accordion>
<Accordion title="google_drive/upload_file">
**الوصف:** رفع ملف إلى Google Drive.
**المعاملات:**
- `name` (string, مطلوب): اسم الملف المراد إنشاؤه.
- `content` (string, مطلوب): محتوى الملف المراد رفعه.
- `mime_type` (string, اختياري): نوع MIME للملف (مثال: "text/plain", "application/pdf").
- `parent_folder_id` (string, اختياري): معرّف المجلد الأصلي حيث يجب إنشاء الملف.
- `description` (string, اختياري): وصف الملف.
</Accordion>
<Accordion title="google_drive/download_file">
**الوصف:** تحميل ملف من Google Drive.
**المعاملات:**
- `file_id` (string, مطلوب): معرّف الملف المراد تحميله.
- `mime_type` (string, اختياري): نوع MIME للتصدير (مطلوب لمستندات Google Workspace).
</Accordion>
<Accordion title="google_drive/create_folder">
**الوصف:** إنشاء مجلد جديد في Google Drive.
**المعاملات:**
- `name` (string, مطلوب): اسم المجلد المراد إنشاؤه.
- `parent_folder_id` (string, اختياري): معرّف المجلد الأصلي حيث يجب إنشاء المجلد الجديد.
- `description` (string, اختياري): وصف المجلد.
</Accordion>
<Accordion title="google_drive/delete_file">
**الوصف:** حذف ملف من Google Drive.
**المعاملات:**
- `file_id` (string, مطلوب): معرّف الملف المراد حذفه.
</Accordion>
<Accordion title="google_drive/share_file">
**الوصف:** مشاركة ملف في Google Drive مع مستخدمين محددين أو جعله عاماً.
**المعاملات:**
- `file_id` (string, مطلوب): معرّف الملف المراد مشاركته.
- `role` (string, مطلوب): الدور الممنوح بهذا الإذن (reader, writer, commenter, owner).
- `type` (string, مطلوب): نوع المستفيد (user, group, domain, anyone).
- `email_address` (string, اختياري): عنوان البريد الإلكتروني للمستخدم أو المجموعة المراد المشاركة معهم (مطلوب لأنواع user/group).
- `domain` (string, اختياري): النطاق المراد المشاركة معه (مطلوب لنوع domain).
- `send_notification_email` (boolean, اختياري): ما إذا كان يجب إرسال بريد إلكتروني إشعاري (الافتراضي: true).
- `email_message` (string, اختياري): رسالة نصية مخصصة لتضمينها في البريد الإلكتروني الإشعاري.
</Accordion>
<Accordion title="google_drive/update_file">
**الوصف:** تحديث ملف موجود في Google Drive.
**المعاملات:**
- `file_id` (string, مطلوب): معرّف الملف المراد تحديثه.
- `name` (string, اختياري): الاسم الجديد للملف.
- `content` (string, اختياري): المحتوى الجديد للملف.
- `mime_type` (string, اختياري): نوع MIME الجديد للملف.
- `description` (string, اختياري): الوصف الجديد للملف.
- `add_parents` (string, اختياري): قائمة مفصولة بفواصل لمعرّفات المجلدات الأصلية المراد إضافتها.
- `remove_parents` (string, اختياري): قائمة مفصولة بفواصل لمعرّفات المجلدات الأصلية المراد إزالتها.
</Accordion>
</AccordionGroup>
## أمثلة الاستخدام
### إعداد Agent أساسي لـ Google Drive
```python
from crewai import Agent, Task, Crew
# Create an agent with Google Drive capabilities
drive_agent = Agent(
role="File Manager",
goal="Manage files and folders in Google Drive efficiently",
backstory="An AI assistant specialized in document and file management.",
apps=['google_drive'] # All Google Drive actions will be available
)
# Task to organize files
organize_files_task = Task(
description="List all files in the root directory and organize them into appropriate folders",
agent=drive_agent,
expected_output="Summary of files organized with folder structure"
)
# Run the task
crew = Crew(
agents=[drive_agent],
tasks=[organize_files_task]
)
crew.kickoff()
```
### تصفية أدوات Google Drive المحددة
```python
from crewai import Agent, Task, Crew
# Create agent with specific Google Drive actions only
file_manager_agent = Agent(
role="Document Manager",
goal="Upload and manage documents efficiently",
backstory="An AI assistant that focuses on document upload and organization.",
apps=[
'google_drive/upload_file',
'google_drive/create_folder',
'google_drive/share_file'
] # Specific Google Drive actions
)
# Task to upload and share documents
document_task = Task(
description="Upload the quarterly report and share it with the finance team",
agent=file_manager_agent,
expected_output="Document uploaded and sharing permissions configured"
)
crew = Crew(
agents=[file_manager_agent],
tasks=[document_task]
)
crew.kickoff()
```
### إدارة الملفات المتقدمة
```python
from crewai import Agent, Task, Crew
file_organizer = Agent(
role="File Organizer",
goal="Maintain organized file structure and manage permissions",
backstory="An experienced file manager who ensures proper organization and access control.",
apps=['google_drive']
)
# Complex task involving multiple Google Drive operations
organization_task = Task(
description="""
1. List all files in the shared folder
2. Create folders for different document types (Reports, Presentations, Spreadsheets)
3. Move files to appropriate folders based on their type
4. Set appropriate sharing permissions for each folder
5. Create a summary document of the organization changes
""",
agent=file_organizer,
expected_output="Files organized into categorized folders with proper permissions and summary report"
)
crew = Crew(
agents=[file_organizer],
tasks=[organization_task]
)
crew.kickoff()
```

View File

@@ -1,254 +0,0 @@
---
title: تكامل Google Sheets
description: "مزامنة بيانات جداول البيانات مع تكامل Google Sheets لـ CrewAI."
icon: "google"
mode: "wide"
---
## نظرة عامة
مكّن وكلاءك من إدارة بيانات جداول البيانات عبر Google Sheets. اقرأ الصفوف، وأنشئ إدخالات جديدة، وحدّث البيانات الموجودة، وبسّط سير عمل إدارة البيانات باستخدام الأتمتة المدعومة بالذكاء الاصطناعي. مثالي لتتبع البيانات وإعداد التقارير وإدارة البيانات التعاونية.
## المتطلبات الأساسية
قبل استخدام تكامل Google Sheets، تأكد من توفر ما يلي:
- حساب [CrewAI AMP](https://app.crewai.com) مع اشتراك فعّال
- حساب Google مع إمكانية الوصول إلى Google Sheets
- ربط حساب Google الخاص بك عبر [صفحة التكاملات](https://app.crewai.com/crewai_plus/connectors)
- جداول بيانات بترويسات أعمدة مناسبة لعمليات البيانات
## إعداد تكامل Google Sheets
### 1. ربط حساب Google الخاص بك
1. انتقل إلى [تكاملات CrewAI AMP](https://app.crewai.com/crewai_plus/connectors)
2. ابحث عن **Google Sheets** في قسم تكاملات المصادقة
3. انقر على **Connect** وأكمل عملية OAuth
4. امنح الصلاحيات اللازمة للوصول إلى جداول البيانات
5. انسخ رمز المؤسسة من [إعدادات التكامل](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. تثبيت الحزمة المطلوبة
```bash
uv add crewai-tools
```
### 3. إعداد متغير البيئة
<Note>
لاستخدام التكاملات مع `Agent(apps=[])`, يجب تعيين متغير البيئة
`CREWAI_PLATFORM_INTEGRATION_TOKEN` برمز المؤسسة الخاص بك.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
أو أضفه إلى ملف `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## الإجراءات المتاحة
<AccordionGroup>
<Accordion title="google_sheets/get_spreadsheet">
**الوصف:** استرجاع خصائص وبيانات جدول البيانات.
**المعاملات:**
- `spreadsheetId` (string, مطلوب): معرّف جدول البيانات المراد استرجاعه.
- `ranges` (array, اختياري): النطاقات المراد استرجاعها من جدول البيانات.
- `includeGridData` (boolean, اختياري): true إذا كان يجب إرجاع بيانات الشبكة. الافتراضي: false
- `fields` (string, اختياري): الحقول المراد تضمينها في الاستجابة.
</Accordion>
<Accordion title="google_sheets/get_values">
**الوصف:** إرجاع نطاق من القيم من جدول البيانات.
**المعاملات:**
- `spreadsheetId` (string, مطلوب): معرّف جدول البيانات المراد استرجاع البيانات منه.
- `range` (string, مطلوب): ترميز A1 أو R1C1 للنطاق المراد استرجاع القيم منه.
- `valueRenderOption` (string, اختياري): كيفية تمثيل القيم في الإخراج. الخيارات: FORMATTED_VALUE, UNFORMATTED_VALUE, FORMULA. الافتراضي: FORMATTED_VALUE
- `dateTimeRenderOption` (string, اختياري): كيفية تمثيل التواريخ والأوقات في الإخراج. الخيارات: SERIAL_NUMBER, FORMATTED_STRING. الافتراضي: SERIAL_NUMBER
- `majorDimension` (string, اختياري): البُعد الرئيسي للنتائج. الخيارات: ROWS, COLUMNS. الافتراضي: ROWS
</Accordion>
<Accordion title="google_sheets/update_values">
**الوصف:** تعيين القيم في نطاق من جدول البيانات.
**المعاملات:**
- `spreadsheetId` (string, مطلوب): معرّف جدول البيانات المراد تحديثه.
- `range` (string, مطلوب): ترميز A1 للنطاق المراد تحديثه.
- `values` (array, مطلوب): البيانات المراد كتابتها. كل مصفوفة تمثل صفاً.
```json
[
["Value1", "Value2", "Value3"],
["Value4", "Value5", "Value6"]
]
```
- `valueInputOption` (string, اختياري): كيفية تفسير بيانات الإدخال. الخيارات: RAW, USER_ENTERED. الافتراضي: USER_ENTERED
</Accordion>
<Accordion title="google_sheets/append_values">
**الوصف:** إلحاق قيم بجدول البيانات.
**المعاملات:**
- `spreadsheetId` (string, مطلوب): معرّف جدول البيانات المراد تحديثه.
- `range` (string, مطلوب): ترميز A1 لنطاق البحث عن جدول بيانات منطقي.
- `values` (array, مطلوب): البيانات المراد إلحاقها. كل مصفوفة تمثل صفاً.
```json
[
["Value1", "Value2", "Value3"],
["Value4", "Value5", "Value6"]
]
```
- `valueInputOption` (string, اختياري): كيفية تفسير بيانات الإدخال. الخيارات: RAW, USER_ENTERED. الافتراضي: USER_ENTERED
- `insertDataOption` (string, اختياري): كيفية إدراج بيانات الإدخال. الخيارات: OVERWRITE, INSERT_ROWS. الافتراضي: INSERT_ROWS
</Accordion>
<Accordion title="google_sheets/create_spreadsheet">
**الوصف:** إنشاء جدول بيانات جديد.
**المعاملات:**
- `title` (string, مطلوب): عنوان جدول البيانات الجديد.
- `sheets` (array, اختياري): الأوراق التي تشكل جزءاً من جدول البيانات.
```json
[
{
"properties": {
"title": "Sheet1"
}
}
]
```
</Accordion>
</AccordionGroup>
## أمثلة الاستخدام
### إعداد Agent أساسي لـ Google Sheets
```python
from crewai import Agent, Task, Crew
# Create an agent with Google Sheets capabilities
sheets_agent = Agent(
role="Data Manager",
goal="Manage spreadsheet data and track information efficiently",
backstory="An AI assistant specialized in data management and spreadsheet operations.",
apps=['google_sheets']
)
# Task to add new data to a spreadsheet
data_entry_task = Task(
description="Add a new customer record to the customer database spreadsheet with name, email, and signup date",
agent=sheets_agent,
expected_output="New customer record added successfully to the spreadsheet"
)
# Run the task
crew = Crew(
agents=[sheets_agent],
tasks=[data_entry_task]
)
crew.kickoff()
```
### تصفية أدوات Google Sheets المحددة
```python
from crewai import Agent, Task, Crew
# Create agent with specific Google Sheets actions only
data_collector = Agent(
role="Data Collector",
goal="Collect and organize data in spreadsheets",
backstory="An AI assistant that focuses on data collection and organization.",
apps=[
'google_sheets/get_values',
'google_sheets/update_values'
]
)
# Task to collect and organize data
data_collection = Task(
description="Retrieve current inventory data and add new product entries to the inventory spreadsheet",
agent=data_collector,
expected_output="Inventory data retrieved and new products added successfully"
)
crew = Crew(
agents=[data_collector],
tasks=[data_collection]
)
crew.kickoff()
```
### تحليل البيانات وإعداد التقارير
```python
from crewai import Agent, Task, Crew
data_analyst = Agent(
role="Data Analyst",
goal="Analyze spreadsheet data and generate insights",
backstory="An experienced data analyst who extracts insights from spreadsheet data.",
apps=['google_sheets']
)
# Task to analyze data and create reports
analysis_task = Task(
description="""
1. Retrieve all sales data from the current month's spreadsheet
2. Analyze the data for trends and patterns
3. Create a summary report in a new row with key metrics
""",
agent=data_analyst,
expected_output="Sales data analyzed and summary report created with key insights"
)
crew = Crew(
agents=[data_analyst],
tasks=[analysis_task]
)
crew.kickoff()
```
## استكشاف الأخطاء وإصلاحها
### المشاكل الشائعة
**أخطاء الصلاحيات**
- تأكد من أن حساب Google الخاص بك لديه صلاحية التحرير على جداول البيانات المستهدفة
- تحقق من أن اتصال OAuth يتضمن النطاقات المطلوبة لـ Google Sheets API
- تأكد من مشاركة جداول البيانات مع الحساب المصادق عليه
**مشاكل هيكل جدول البيانات**
- تأكد من أن أوراق العمل تحتوي على ترويسات أعمدة مناسبة قبل إنشاء الصفوف أو تحديثها
- تحقق من صحة ترميز النطاق (صيغة A1) للخلايا المستهدفة
- تأكد من وجود معرّف جدول البيانات المحدد وإمكانية الوصول إليه
**مشاكل نوع البيانات والصيغة**
- تأكد من تطابق قيم البيانات مع الصيغة المتوقعة لكل عمود
- استخدم صيغ التاريخ المناسبة لأعمدة التاريخ (يُنصح بصيغة ISO)
- تحقق من صحة تنسيق القيم الرقمية لأعمدة الأرقام
### الحصول على المساعدة
<Card title="تحتاج مساعدة؟" icon="headset" href="mailto:support@crewai.com">
تواصل مع فريق الدعم للحصول على المساعدة في إعداد تكامل Google Sheets
أو استكشاف الأخطاء وإصلاحها.
</Card>

View File

@@ -1,382 +0,0 @@
---
title: تكامل Google Slides
description: "إنشاء العروض التقديمية وإدارتها مع تكامل Google Slides لـ CrewAI."
icon: "chart-bar"
mode: "wide"
---
## نظرة عامة
مكّن وكلاءك من إنشاء وتحرير وإدارة عروض Google Slides التقديمية. أنشئ العروض التقديمية، وحدّث المحتوى، واستورد البيانات من Google Sheets، وأدر الصفحات والصور المصغرة، وبسّط سير عمل العروض التقديمية باستخدام الأتمتة المدعومة بالذكاء الاصطناعي.
## المتطلبات الأساسية
قبل استخدام تكامل Google Slides، تأكد من توفر ما يلي:
- حساب [CrewAI AMP](https://app.crewai.com) مع اشتراك فعّال
- حساب Google مع إمكانية الوصول إلى Google Slides
- ربط حساب Google الخاص بك عبر [صفحة التكاملات](https://app.crewai.com/crewai_plus/connectors)
## إعداد تكامل Google Slides
### 1. ربط حساب Google الخاص بك
1. انتقل إلى [تكاملات CrewAI AMP](https://app.crewai.com/crewai_plus/connectors)
2. ابحث عن **Google Slides** في قسم تكاملات المصادقة
3. انقر على **Connect** وأكمل عملية OAuth
4. امنح الصلاحيات اللازمة للوصول إلى العروض التقديمية وجداول البيانات وDrive
5. انسخ رمز المؤسسة من [إعدادات التكامل](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. تثبيت الحزمة المطلوبة
```bash
uv add crewai-tools
```
### 3. إعداد متغير البيئة
<Note>
لاستخدام التكاملات مع `Agent(apps=[])`, يجب تعيين متغير البيئة
`CREWAI_PLATFORM_INTEGRATION_TOKEN` برمز المؤسسة الخاص بك.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
أو أضفه إلى ملف `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## الإجراءات المتاحة
<AccordionGroup>
<Accordion title="google_slides/create_blank_presentation">
**الوصف:** إنشاء عرض تقديمي فارغ بدون محتوى.
**المعاملات:**
- `title` (string, مطلوب): عنوان العرض التقديمي.
</Accordion>
<Accordion title="google_slides/get_presentation_metadata">
**الوصف:** الحصول على بيانات وصفية خفيفة حول العرض التقديمي (العنوان، عدد الشرائح، معرّفات الشرائح).
**المعاملات:**
- `presentationId` (string, مطلوب): معرّف العرض التقديمي المراد استرجاعه.
</Accordion>
<Accordion title="google_slides/get_presentation_text">
**الوصف:** استخراج جميع المحتوى النصي من العرض التقديمي.
**المعاملات:**
- `presentationId` (string, مطلوب): معرّف العرض التقديمي.
</Accordion>
<Accordion title="google_slides/get_presentation">
**الوصف:** استرجاع عرض تقديمي بواسطة المعرّف.
**المعاملات:**
- `presentationId` (string, مطلوب): معرّف العرض التقديمي المراد استرجاعه.
- `fields` (string, اختياري): الحقول المراد تضمينها في الاستجابة.
</Accordion>
<Accordion title="google_slides/batch_update_presentation">
**الوصف:** تطبيق التحديثات أو إضافة المحتوى أو إزالته من العرض التقديمي.
**المعاملات:**
- `presentationId` (string, مطلوب): معرّف العرض التقديمي المراد تحديثه.
- `requests` (array, مطلوب): قائمة بالتحديثات المراد تطبيقها.
```json
[
{
"insertText": {
"objectId": "slide_id",
"text": "Your text content here"
}
}
]
```
- `writeControl` (object, اختياري): يوفر التحكم في كيفية تنفيذ طلبات الكتابة.
</Accordion>
<Accordion title="google_slides/get_slide_text">
**الوصف:** استخراج المحتوى النصي من شريحة واحدة.
**المعاملات:**
- `presentationId` (string, مطلوب): معرّف العرض التقديمي.
- `pageObjectId` (string, مطلوب): معرّف الشريحة/الصفحة.
</Accordion>
<Accordion title="google_slides/get_page">
**الوصف:** استرجاع صفحة محددة بواسطة معرّفها.
**المعاملات:**
- `presentationId` (string, مطلوب): معرّف العرض التقديمي.
- `pageObjectId` (string, مطلوب): معرّف الصفحة المراد استرجاعها.
</Accordion>
<Accordion title="google_slides/get_thumbnail">
**الوصف:** إنشاء صورة مصغرة للصفحة.
**المعاملات:**
- `presentationId` (string, مطلوب): معرّف العرض التقديمي.
- `pageObjectId` (string, مطلوب): معرّف الصفحة لإنشاء الصورة المصغرة.
</Accordion>
<Accordion title="google_slides/create_slide">
**الوصف:** إضافة شريحة فارغة إضافية للعرض التقديمي.
**المعاملات:**
- `presentationId` (string, مطلوب): معرّف العرض التقديمي.
- `insertionIndex` (integer, اختياري): مكان إدراج الشريحة (قائم على الصفر). إذا حُذف، تُضاف في النهاية.
</Accordion>
<Accordion title="google_slides/create_slide_with_layout">
**الوصف:** إنشاء شريحة بتخطيط محدد مسبقاً يحتوي على مناطق عناصر نائبة للعنوان والمحتوى وغيرها.
**المعاملات:**
- `presentationId` (string, مطلوب): معرّف العرض التقديمي.
- `layout` (string, مطلوب): نوع التخطيط. أحد: `BLANK`, `TITLE`, `TITLE_AND_BODY`, `TITLE_AND_TWO_COLUMNS`, `TITLE_ONLY`, `SECTION_HEADER`, `ONE_COLUMN_TEXT`, `MAIN_POINT`, `BIG_NUMBER`.
- `insertionIndex` (integer, اختياري): مكان الإدراج (قائم على الصفر). حُذف للإضافة في النهاية.
</Accordion>
<Accordion title="google_slides/create_text_box">
**الوصف:** إنشاء مربع نص على شريحة مع محتوى.
**المعاملات:**
- `presentationId` (string, مطلوب): معرّف العرض التقديمي.
- `slideId` (string, مطلوب): معرّف الشريحة لإضافة مربع النص إليها.
- `text` (string, مطلوب): المحتوى النصي لمربع النص.
- `x` (integer, اختياري): موضع X بوحدة EMU (914400 = 1 بوصة). الافتراضي: 914400.
- `y` (integer, اختياري): موضع Y بوحدة EMU. الافتراضي: 914400.
- `width` (integer, اختياري): العرض بوحدة EMU. الافتراضي: 7315200.
- `height` (integer, اختياري): الارتفاع بوحدة EMU. الافتراضي: 914400.
</Accordion>
<Accordion title="google_slides/delete_slide">
**الوصف:** إزالة شريحة من العرض التقديمي.
**المعاملات:**
- `presentationId` (string, مطلوب): معرّف العرض التقديمي.
- `slideId` (string, مطلوب): معرّف الشريحة المراد حذفها.
</Accordion>
<Accordion title="google_slides/duplicate_slide">
**الوصف:** إنشاء نسخة من شريحة موجودة.
**المعاملات:**
- `presentationId` (string, مطلوب): معرّف العرض التقديمي.
- `slideId` (string, مطلوب): معرّف الشريحة المراد تكرارها.
</Accordion>
<Accordion title="google_slides/move_slides">
**الوصف:** إعادة ترتيب الشرائح بنقلها إلى موضع جديد.
**المعاملات:**
- `presentationId` (string, مطلوب): معرّف العرض التقديمي.
- `slideIds` (array of strings, مطلوب): مصفوفة من معرّفات الشرائح المراد نقلها.
- `insertionIndex` (integer, مطلوب): الموضع المستهدف (قائم على الصفر).
</Accordion>
<Accordion title="google_slides/insert_youtube_video">
**الوصف:** تضمين فيديو YouTube على شريحة.
**المعاملات:**
- `presentationId` (string, مطلوب): معرّف العرض التقديمي.
- `slideId` (string, مطلوب): معرّف الشريحة لإضافة الفيديو إليها.
- `videoId` (string, مطلوب): معرّف فيديو YouTube (القيمة بعد v= في عنوان URL).
</Accordion>
<Accordion title="google_slides/insert_drive_video">
**الوصف:** تضمين فيديو من Google Drive على شريحة.
**المعاملات:**
- `presentationId` (string, مطلوب): معرّف العرض التقديمي.
- `slideId` (string, مطلوب): معرّف الشريحة لإضافة الفيديو إليها.
- `fileId` (string, مطلوب): معرّف ملف Google Drive للفيديو.
</Accordion>
<Accordion title="google_slides/set_slide_background_image">
**الوصف:** تعيين صورة خلفية لشريحة.
**المعاملات:**
- `presentationId` (string, مطلوب): معرّف العرض التقديمي.
- `slideId` (string, مطلوب): معرّف الشريحة لتعيين الخلفية لها.
- `imageUrl` (string, مطلوب): عنوان URL المتاح للعموم للصورة المراد استخدامها كخلفية.
</Accordion>
<Accordion title="google_slides/create_table">
**الوصف:** إنشاء جدول فارغ على شريحة.
**المعاملات:**
- `presentationId` (string, مطلوب): معرّف العرض التقديمي.
- `slideId` (string, مطلوب): معرّف الشريحة لإضافة الجدول إليها.
- `rows` (integer, مطلوب): عدد الصفوف في الجدول.
- `columns` (integer, مطلوب): عدد الأعمدة في الجدول.
</Accordion>
<Accordion title="google_slides/create_table_with_content">
**الوصف:** إنشاء جدول مع محتوى في إجراء واحد.
**المعاملات:**
- `presentationId` (string, مطلوب): معرّف العرض التقديمي.
- `slideId` (string, مطلوب): معرّف الشريحة لإضافة الجدول إليها.
- `rows` (integer, مطلوب): عدد الصفوف في الجدول.
- `columns` (integer, مطلوب): عدد الأعمدة في الجدول.
- `content` (array, مطلوب): محتوى الجدول كمصفوفة ثنائية الأبعاد. مثال: [["Year", "Revenue"], ["2023", "$10M"]].
</Accordion>
<Accordion title="google_slides/import_data_from_sheet">
**الوصف:** استيراد البيانات من Google Sheet إلى العرض التقديمي.
**المعاملات:**
- `presentationId` (string, مطلوب): معرّف العرض التقديمي.
- `sheetId` (string, مطلوب): معرّف Google Sheet المراد الاستيراد منه.
- `dataRange` (string, مطلوب): نطاق البيانات المراد استيرادها من الورقة.
</Accordion>
<Accordion title="google_slides/upload_file_to_drive">
**الوصف:** رفع ملف إلى Google Drive المرتبط بالعرض التقديمي.
**المعاملات:**
- `file` (string, مطلوب): بيانات الملف المراد رفعها.
- `presentationId` (string, مطلوب): معرّف العرض التقديمي لربط الملف المرفوع.
</Accordion>
<Accordion title="google_slides/link_file_to_presentation">
**الوصف:** ربط ملف في Google Drive بالعرض التقديمي.
**المعاملات:**
- `presentationId` (string, مطلوب): معرّف العرض التقديمي.
- `fileId` (string, مطلوب): معرّف الملف المراد ربطه.
</Accordion>
<Accordion title="google_slides/get_all_presentations">
**الوصف:** عرض قائمة بجميع العروض التقديمية المتاحة للمستخدم.
**المعاملات:**
- `pageSize` (integer, اختياري): عدد العروض التقديمية المراد إرجاعها لكل صفحة.
- `pageToken` (string, اختياري): رمز للترقيم.
</Accordion>
<Accordion title="google_slides/delete_presentation">
**الوصف:** حذف عرض تقديمي بواسطة المعرّف.
**المعاملات:**
- `presentationId` (string, مطلوب): معرّف العرض التقديمي المراد حذفه.
</Accordion>
</AccordionGroup>
## أمثلة الاستخدام
### إعداد Agent أساسي لـ Google Slides
```python
from crewai import Agent, Task, Crew
# Create an agent with Google Slides capabilities
slides_agent = Agent(
role="Presentation Manager",
goal="Create and manage presentations efficiently",
backstory="An AI assistant specialized in presentation creation and content management.",
apps=['google_slides'] # All Google Slides actions will be available
)
# Task to create a presentation
create_presentation_task = Task(
description="Create a new presentation for the quarterly business review with key slides",
agent=slides_agent,
expected_output="Quarterly business review presentation created with structured content"
)
# Run the task
crew = Crew(
agents=[slides_agent],
tasks=[create_presentation_task]
)
crew.kickoff()
```
### إدارة محتوى العروض التقديمية
```python
from crewai import Agent, Task, Crew
content_manager = Agent(
role="Content Manager",
goal="Manage presentation content and updates",
backstory="An AI assistant that focuses on content creation and presentation updates.",
apps=[
'google_slides/create_blank_presentation',
'google_slides/batch_update_presentation',
'google_slides/get_presentation'
]
)
# Task to create and update presentations
content_task = Task(
description="Create a new presentation and add content slides with charts and text",
agent=content_manager,
expected_output="Presentation created with updated content and visual elements"
)
crew = Crew(
agents=[content_manager],
tasks=[content_task]
)
crew.kickoff()
```
## استكشاف الأخطاء وإصلاحها
### المشاكل الشائعة
**أخطاء الصلاحيات**
- تأكد من أن حساب Google الخاص بك لديه الصلاحيات المناسبة لـ Google Slides
- تحقق من أن اتصال OAuth يتضمن النطاقات المطلوبة للعروض التقديمية وجداول البيانات وDrive
**مشاكل معرّف العرض التقديمي**
- تحقق من صحة معرّفات العروض التقديمية ووجودها
- تأكد من أن لديك صلاحيات الوصول للعروض التقديمية التي تحاول تعديلها
**مشاكل تحديث المحتوى**
- تأكد من صحة تنسيق طلبات التحديث الدفعي وفقاً لمواصفات Google Slides API
- تحقق من وجود معرّفات الكائنات للشرائح والعناصر في العرض التقديمي
### الحصول على المساعدة
<Card title="تحتاج مساعدة؟" icon="headset" href="mailto:support@crewai.com">
تواصل مع فريق الدعم للحصول على المساعدة في إعداد تكامل Google Slides
أو استكشاف الأخطاء وإصلاحها.
</Card>

View File

@@ -1,360 +0,0 @@
---
title: تكامل HubSpot
description: "إدارة الشركات وجهات الاتصال في HubSpot مع CrewAI."
icon: "briefcase"
mode: "wide"
---
## نظرة عامة
مكّن وكلاءك من إدارة الشركات وجهات الاتصال داخل HubSpot. أنشئ سجلات جديدة وبسّط عمليات CRM باستخدام الأتمتة المدعومة بالذكاء الاصطناعي.
## المتطلبات الأساسية
قبل استخدام تكامل HubSpot، تأكد من توفر ما يلي:
- حساب [CrewAI AMP](https://app.crewai.com) مع اشتراك فعّال.
- حساب HubSpot بالصلاحيات المناسبة.
- ربط حساب HubSpot الخاص بك عبر [صفحة التكاملات](https://app.crewai.com/crewai_plus/connectors).
## إعداد تكامل HubSpot
### 1. ربط حساب HubSpot الخاص بك
1. انتقل إلى [تكاملات CrewAI AMP](https://app.crewai.com/crewai_plus/connectors).
2. ابحث عن **HubSpot** في قسم تكاملات المصادقة.
3. انقر على **Connect** وأكمل عملية OAuth.
4. امنح الصلاحيات اللازمة لإدارة الشركات وجهات الاتصال.
5. انسخ رمز المؤسسة من [إعدادات التكامل](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. تثبيت الحزمة المطلوبة
```bash
uv add crewai-tools
```
### 3. إعداد متغير البيئة
<Note>
لاستخدام التكاملات مع `Agent(apps=[])`, يجب تعيين متغير البيئة
`CREWAI_PLATFORM_INTEGRATION_TOKEN` برمز المؤسسة الخاص بك.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
أو أضفه إلى ملف `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## الإجراءات المتاحة
<AccordionGroup>
<Accordion title="hubspot/create_company">
**الوصف:** إنشاء سجل شركة جديد في HubSpot.
**المعاملات:**
- `name` (string, مطلوب): اسم الشركة.
- `domain` (string, اختياري): اسم نطاق الشركة.
- `industry` (string, اختياري): القطاع.
- `phone` (string, اختياري): رقم الهاتف.
- `hubspot_owner_id` (string, اختياري): معرّف مالك الشركة.
- `type` (string, اختياري): نوع الشركة. القيم المتاحة: `PROSPECT`, `PARTNER`, `RESELLER`, `VENDOR`, `OTHER`.
- `city` (string, اختياري): المدينة.
- `state` (string, اختياري): الولاية/المنطقة.
- `zip` (string, اختياري): الرمز البريدي.
- `numberofemployees` (number, اختياري): عدد الموظفين.
- `annualrevenue` (number, اختياري): الإيرادات السنوية.
- `description` (string, اختياري): الوصف.
- `website` (string, اختياري): عنوان URL للموقع الإلكتروني.
</Accordion>
<Accordion title="hubspot/create_contact">
**الوصف:** إنشاء سجل جهة اتصال جديد في HubSpot.
**المعاملات:**
- `email` (string, مطلوب): عنوان البريد الإلكتروني لجهة الاتصال.
- `firstname` (string, اختياري): الاسم الأول.
- `lastname` (string, اختياري): اسم العائلة.
- `phone` (string, اختياري): رقم الهاتف.
- `hubspot_owner_id` (string, اختياري): مالك جهة الاتصال.
- `lifecyclestage` (string, اختياري): مرحلة دورة الحياة. القيم المتاحة: `subscriber`, `lead`, `marketingqualifiedlead`, `salesqualifiedlead`, `opportunity`, `customer`, `evangelist`, `other`.
- `company` (string, اختياري): اسم الشركة.
- `jobtitle` (string, اختياري): المسمى الوظيفي.
</Accordion>
<Accordion title="hubspot/create_deal">
**الوصف:** إنشاء سجل صفقة جديد في HubSpot.
**المعاملات:**
- `dealname` (string, مطلوب): اسم الصفقة.
- `amount` (number, اختياري): قيمة الصفقة.
- `dealstage` (string, اختياري): مرحلة مسار الصفقة.
- `pipeline` (string, اختياري): مسار المبيعات الذي تنتمي إليه الصفقة.
- `closedate` (string, اختياري): التاريخ المتوقع لإغلاق الصفقة.
- `hubspot_owner_id` (string, اختياري): مالك الصفقة.
- `dealtype` (string, اختياري): نوع الصفقة. القيم المتاحة: `newbusiness`, `existingbusiness`.
- `description` (string, اختياري): وصف الصفقة.
- `hs_priority` (string, اختياري): أولوية الصفقة. القيم المتاحة: `low`, `medium`, `high`.
</Accordion>
<Accordion title="hubspot/create_record_engagements">
**الوصف:** إنشاء تفاعل جديد (مثل ملاحظة، بريد إلكتروني، مكالمة، اجتماع، مهمة) في HubSpot.
**المعاملات:**
- `engagementType` (string, مطلوب): نوع التفاعل. القيم المتاحة: `NOTE`, `EMAIL`, `CALL`, `MEETING`, `TASK`.
- `hubspot_owner_id` (string, اختياري): المستخدم المعيّن للنشاط.
- `hs_timestamp` (string, اختياري): تاريخ ووقت النشاط.
- `hs_note_body` (string, اختياري): نص الملاحظة. (يُستخدم لـ `NOTE`)
- `hs_task_subject` (string, اختياري): عنوان المهمة. (يُستخدم لـ `TASK`)
- `hs_meeting_title` (string, اختياري): عنوان الاجتماع. (يُستخدم لـ `MEETING`)
</Accordion>
<Accordion title="hubspot/update_company">
**الوصف:** تحديث سجل شركة موجود في HubSpot.
**المعاملات:**
- `recordId` (string, مطلوب): معرّف الشركة المراد تحديثها.
- `name` (string, اختياري): اسم الشركة.
- `domain` (string, اختياري): اسم نطاق الشركة.
- `industry` (string, اختياري): القطاع.
- `phone` (string, اختياري): رقم الهاتف.
- `description` (string, اختياري): الوصف.
</Accordion>
<Accordion title="hubspot/update_contact">
**الوصف:** تحديث سجل جهة اتصال موجود في HubSpot.
**المعاملات:**
- `recordId` (string, مطلوب): معرّف جهة الاتصال المراد تحديثها.
- `firstname` (string, اختياري): الاسم الأول.
- `lastname` (string, اختياري): اسم العائلة.
- `email` (string, اختياري): عنوان البريد الإلكتروني.
- `phone` (string, اختياري): رقم الهاتف.
- `company` (string, اختياري): اسم الشركة.
- `jobtitle` (string, اختياري): المسمى الوظيفي.
</Accordion>
<Accordion title="hubspot/update_deal">
**الوصف:** تحديث سجل صفقة موجود في HubSpot.
**المعاملات:**
- `recordId` (string, مطلوب): معرّف الصفقة المراد تحديثها.
- `dealname` (string, اختياري): اسم الصفقة.
- `amount` (number, اختياري): قيمة الصفقة.
- `dealstage` (string, اختياري): مرحلة مسار الصفقة.
- `closedate` (string, اختياري): تاريخ الإغلاق المتوقع.
</Accordion>
<Accordion title="hubspot/list_companies">
**الوصف:** الحصول على قائمة بسجلات الشركات من HubSpot.
**المعاملات:**
- `paginationParameters` (object, اختياري): استخدم `pageCursor` لجلب الصفحات اللاحقة.
</Accordion>
<Accordion title="hubspot/list_contacts">
**الوصف:** الحصول على قائمة بسجلات جهات الاتصال من HubSpot.
**المعاملات:**
- `paginationParameters` (object, اختياري): استخدم `pageCursor` لجلب الصفحات اللاحقة.
</Accordion>
<Accordion title="hubspot/list_deals">
**الوصف:** الحصول على قائمة بسجلات الصفقات من HubSpot.
**المعاملات:**
- `paginationParameters` (object, اختياري): استخدم `pageCursor` لجلب الصفحات اللاحقة.
</Accordion>
<Accordion title="hubspot/get_company">
**الوصف:** الحصول على سجل شركة واحد بواسطة معرّفه.
**المعاملات:**
- `recordId` (string, مطلوب): معرّف الشركة المراد استرجاعها.
</Accordion>
<Accordion title="hubspot/get_contact">
**الوصف:** الحصول على سجل جهة اتصال واحد بواسطة معرّفه.
**المعاملات:**
- `recordId` (string, مطلوب): معرّف جهة الاتصال المراد استرجاعها.
</Accordion>
<Accordion title="hubspot/get_deal">
**الوصف:** الحصول على سجل صفقة واحد بواسطة معرّفه.
**المعاملات:**
- `recordId` (string, مطلوب): معرّف الصفقة المراد استرجاعها.
</Accordion>
<Accordion title="hubspot/search_companies">
**الوصف:** البحث عن سجلات الشركات في HubSpot باستخدام صيغة فلتر.
**المعاملات:**
- `filterFormula` (object, اختياري): فلتر بصيغة التعبير العادي المنفصل (OR لمجموعات AND).
- `paginationParameters` (object, اختياري): استخدم `pageCursor` لجلب الصفحات اللاحقة.
</Accordion>
<Accordion title="hubspot/search_contacts">
**الوصف:** البحث عن سجلات جهات الاتصال في HubSpot باستخدام صيغة فلتر.
**المعاملات:**
- `filterFormula` (object, اختياري): فلتر بصيغة التعبير العادي المنفصل (OR لمجموعات AND).
- `paginationParameters` (object, اختياري): استخدم `pageCursor` لجلب الصفحات اللاحقة.
</Accordion>
<Accordion title="hubspot/search_deals">
**الوصف:** البحث عن سجلات الصفقات في HubSpot باستخدام صيغة فلتر.
**المعاملات:**
- `filterFormula` (object, اختياري): فلتر بصيغة التعبير العادي المنفصل (OR لمجموعات AND).
- `paginationParameters` (object, اختياري): استخدم `pageCursor` لجلب الصفحات اللاحقة.
</Accordion>
<Accordion title="hubspot/delete_record_companies">
**الوصف:** حذف سجل شركة بواسطة معرّفه.
**المعاملات:**
- `recordId` (string, مطلوب): معرّف الشركة المراد حذفها.
</Accordion>
<Accordion title="hubspot/delete_record_contacts">
**الوصف:** حذف سجل جهة اتصال بواسطة معرّفه.
**المعاملات:**
- `recordId` (string, مطلوب): معرّف جهة الاتصال المراد حذفها.
</Accordion>
<Accordion title="hubspot/delete_record_deals">
**الوصف:** حذف سجل صفقة بواسطة معرّفه.
**المعاملات:**
- `recordId` (string, مطلوب): معرّف الصفقة المراد حذفها.
</Accordion>
<Accordion title="hubspot/describe_action_schema">
**الوصف:** الحصول على المخطط المتوقع لنوع كائن وعملية معينة.
**المعاملات:**
- `recordType` (string, مطلوب): معرّف نوع الكائن (مثال: 'companies').
- `operation` (string, مطلوب): نوع العملية (مثال: 'CREATE_RECORD').
</Accordion>
</AccordionGroup>
## أمثلة الاستخدام
### إعداد Agent أساسي لـ HubSpot
```python
from crewai import Agent, Task, Crew
# Create an agent with HubSpot capabilities
hubspot_agent = Agent(
role="CRM Manager",
goal="Manage company and contact records in HubSpot",
backstory="An AI assistant specialized in CRM management.",
apps=['hubspot'] # All HubSpot actions will be available
)
# Task to create a new company
create_company_task = Task(
description="Create a new company in HubSpot with name 'Innovate Corp' and domain 'innovatecorp.com'.",
agent=hubspot_agent,
expected_output="Company created successfully with confirmation"
)
# Run the task
crew = Crew(
agents=[hubspot_agent],
tasks=[create_company_task]
)
crew.kickoff()
```
### تصفية أدوات HubSpot المحددة
```python
from crewai import Agent, Task, Crew
# Create agent with specific HubSpot actions only
contact_creator = Agent(
role="Contact Creator",
goal="Create new contacts in HubSpot",
backstory="An AI assistant that focuses on creating new contact entries in the CRM.",
apps=['hubspot/create_contact'] # Only contact creation action
)
# Task to create a contact
create_contact = Task(
description="Create a new contact for 'John Doe' with email 'john.doe@example.com'.",
agent=contact_creator,
expected_output="Contact created successfully in HubSpot."
)
crew = Crew(
agents=[contact_creator],
tasks=[create_contact]
)
crew.kickoff()
```
### إدارة جهات الاتصال
```python
from crewai import Agent, Task, Crew
# Create agent with HubSpot contact management capabilities
crm_manager = Agent(
role="CRM Manager",
goal="Manage and organize HubSpot contacts efficiently.",
backstory="An experienced CRM manager who maintains an organized contact database.",
apps=['hubspot'] # All HubSpot actions including contact management
)
# Task to manage contacts
contact_task = Task(
description="Create a new contact for 'Jane Smith' at 'Global Tech Inc.' with email 'jane.smith@globaltech.com'.",
agent=crm_manager,
expected_output="Contact database updated with the new contact."
)
crew = Crew(
agents=[crm_manager],
tasks=[contact_task]
)
crew.kickoff()
```
### الحصول على المساعدة
<Card title="تحتاج مساعدة؟" icon="headset" href="mailto:support@crewai.com">
تواصل مع فريق الدعم للحصول على المساعدة في إعداد تكامل HubSpot أو
استكشاف الأخطاء وإصلاحها.
</Card>

View File

@@ -1,248 +0,0 @@
---
title: تكامل Jira
description: "تتبع المشكلات وإدارة المشاريع مع تكامل Jira لـ CrewAI."
icon: "bug"
mode: "wide"
---
## نظرة عامة
مكّن وكلاءك من إدارة المشكلات والمشاريع وسير العمل عبر Jira. أنشئ المشكلات وحدّثها، وتتبع تقدم المشاريع، وأدر التعيينات، وبسّط إدارة مشاريعك باستخدام الأتمتة المدعومة بالذكاء الاصطناعي.
## المتطلبات الأساسية
قبل استخدام تكامل Jira، تأكد من توفر ما يلي:
- حساب [CrewAI AMP](https://app.crewai.com) مع اشتراك فعّال
- حساب Jira بصلاحيات المشروع المناسبة
- ربط حساب Jira الخاص بك عبر [صفحة التكاملات](https://app.crewai.com/crewai_plus/connectors)
## إعداد تكامل Jira
### 1. ربط حساب Jira الخاص بك
1. انتقل إلى [تكاملات CrewAI AMP](https://app.crewai.com/crewai_plus/connectors)
2. ابحث عن **Jira** في قسم تكاملات المصادقة
3. انقر على **Connect** وأكمل عملية OAuth
4. امنح الصلاحيات اللازمة لإدارة المشكلات والمشاريع
5. انسخ رمز المؤسسة من [إعدادات التكامل](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. تثبيت الحزمة المطلوبة
```bash
uv add crewai-tools
```
### 3. إعداد متغير البيئة
<Note>
لاستخدام التكاملات مع `Agent(apps=[])`, يجب تعيين متغير البيئة
`CREWAI_PLATFORM_INTEGRATION_TOKEN` برمز المؤسسة الخاص بك.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
أو أضفه إلى ملف `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## الإجراءات المتاحة
<AccordionGroup>
<Accordion title="jira/create_issue">
**الوصف:** إنشاء مشكلة في Jira.
**المعاملات:**
- `summary` (string, مطلوب): الملخص - ملخص موجز من سطر واحد للمشكلة. (مثال: "The printer stopped working").
- `project` (string, اختياري): المشروع - المشروع الذي تنتمي إليه المشكلة.
- `issueType` (string, اختياري): نوع المشكلة - الافتراضي هو Task.
- `jiraIssueStatus` (string, اختياري): الحالة - الافتراضي هو أول حالة في المشروع.
- `assignee` (string, اختياري): المكلّف - الافتراضي هو المستخدم المصادق عليه.
- `description` (string, اختياري): الوصف - وصف تفصيلي للمشكلة.
- `additionalFields` (string, اختياري): حقول إضافية - حدد أي حقول أخرى بصيغة JSON.
</Accordion>
<Accordion title="jira/update_issue">
**الوصف:** تحديث مشكلة في Jira.
**المعاملات:**
- `issueKey` (string, مطلوب): مفتاح المشكلة (مثال: "TEST-1234").
- `summary` (string, اختياري): الملخص.
- `issueType` (string, اختياري): نوع المشكلة.
- `jiraIssueStatus` (string, اختياري): الحالة.
- `assignee` (string, اختياري): المكلّف.
- `description` (string, اختياري): الوصف.
- `additionalFields` (string, اختياري): حقول إضافية بصيغة JSON.
</Accordion>
<Accordion title="jira/get_issue_by_key">
**الوصف:** الحصول على مشكلة بواسطة المفتاح في Jira.
**المعاملات:**
- `issueKey` (string, مطلوب): مفتاح المشكلة (مثال: "TEST-1234").
</Accordion>
<Accordion title="jira/filter_issues">
**الوصف:** البحث عن المشكلات في Jira باستخدام الفلاتر.
**المعاملات:**
- `jqlQuery` (object, اختياري): فلتر بصيغة التعبير العادي المنفصل.
- `limit` (string, اختياري): حدود النتائج - الافتراضي 10.
</Accordion>
<Accordion title="jira/search_by_jql">
**الوصف:** البحث عن المشكلات بواسطة JQL في Jira.
**المعاملات:**
- `jqlQuery` (string, مطلوب): استعلام JQL (مثال: "project = PROJECT").
- `paginationParameters` (object, اختياري): معاملات الترقيم.
</Accordion>
<Accordion title="jira/describe_action_schema">
**الوصف:** الحصول على المخطط المتوقع لنوع مشكلة.
**المعاملات:**
- `issueTypeId` (string, مطلوب): معرّف نوع المشكلة.
- `projectKey` (string, مطلوب): مفتاح المشروع.
- `operation` (string, مطلوب): نوع العملية، مثال CREATE_ISSUE أو UPDATE_ISSUE.
</Accordion>
<Accordion title="jira/get_projects">
**الوصف:** الحصول على المشاريع في Jira.
**المعاملات:**
- `paginationParameters` (object, اختياري): معاملات الترقيم.
</Accordion>
<Accordion title="jira/get_issue_types_by_project">
**الوصف:** الحصول على أنواع المشكلات بواسطة المشروع في Jira.
**المعاملات:**
- `project` (string, مطلوب): مفتاح المشروع.
</Accordion>
<Accordion title="jira/get_issue_types">
**الوصف:** الحصول على جميع أنواع المشكلات في Jira.
**المعاملات:** لا توجد معاملات مطلوبة.
</Accordion>
<Accordion title="jira/get_issue_status_by_project">
**الوصف:** الحصول على حالات المشكلات لمشروع معين.
**المعاملات:**
- `project` (string, مطلوب): مفتاح المشروع.
</Accordion>
<Accordion title="jira/get_all_assignees_by_project">
**الوصف:** الحصول على المكلّفين لمشروع معين.
**المعاملات:**
- `project` (string, مطلوب): مفتاح المشروع.
</Accordion>
</AccordionGroup>
## أمثلة الاستخدام
### إعداد Agent أساسي لـ Jira
```python
from crewai import Agent, Task, Crew
from crewai import Agent, Task, Crew
# Create an agent with Jira capabilities
jira_agent = Agent(
role="Issue Manager",
goal="Manage Jira issues and track project progress efficiently",
backstory="An AI assistant specialized in issue tracking and project management.",
apps=['jira'] # All Jira actions will be available
)
# Task to create a bug report
create_bug_task = Task(
description="Create a bug report for the login functionality with high priority and assign it to the development team",
agent=jira_agent,
expected_output="Bug report created successfully with issue key"
)
# Run the task
crew = Crew(
agents=[jira_agent],
tasks=[create_bug_task]
)
crew.kickoff()
```
### تحليل المشاريع وإعداد التقارير
```python
from crewai import Agent, Task, Crew
project_analyst = Agent(
role="Project Analyst",
goal="Analyze project data and generate insights from Jira",
backstory="An experienced project analyst who extracts insights from project management data.",
apps=['jira']
)
# Task to analyze project status
analysis_task = Task(
description="""
1. Get all projects and their issue types
2. Search for all open issues across projects
3. Analyze issue distribution by status and assignee
4. Create a summary report issue with findings
""",
agent=project_analyst,
expected_output="Project analysis completed with summary report created"
)
crew = Crew(
agents=[project_analyst],
tasks=[analysis_task]
)
crew.kickoff()
```
## استكشاف الأخطاء وإصلاحها
### المشاكل الشائعة
**أخطاء الصلاحيات**
- تأكد من أن حساب Jira الخاص بك لديه الصلاحيات اللازمة للمشاريع المستهدفة
- تحقق من أن اتصال OAuth يتضمن النطاقات المطلوبة لـ Jira API
**مفاتيح المشاريع أو المشكلات غير الصالحة**
- تحقق جيداً من مفاتيح المشاريع ومفاتيح المشكلات للتأكد من صحة الصيغة (مثال: "PROJ-123")
- تأكد من وجود المشاريع وإمكانية الوصول إليها من حسابك
**مشاكل استعلام JQL**
- اختبر استعلامات JQL في بحث مشكلات Jira قبل استخدامها في استدعاءات API
- تأكد من صحة إملاء أسماء الحقول في JQL ووجودها في مثيل Jira الخاص بك
### الحصول على المساعدة
<Card title="تحتاج مساعدة؟" icon="headset" href="mailto:support@crewai.com">
تواصل مع فريق الدعم للحصول على المساعدة في إعداد تكامل Jira أو
استكشاف الأخطاء وإصلاحها.
</Card>

View File

@@ -1,261 +0,0 @@
---
title: تكامل Linear
description: "إدارة المشاريع البرمجية وتتبع الأخطاء مع تكامل Linear لـ CrewAI."
icon: "list-check"
mode: "wide"
---
## نظرة عامة
مكّن وكلاءك من إدارة المشكلات والمشاريع وسير عمل التطوير عبر Linear. أنشئ المشكلات وحدّثها، وأدر جداول المشاريع الزمنية، ونظّم الفرق، وبسّط عملية تطوير البرمجيات باستخدام الأتمتة المدعومة بالذكاء الاصطناعي.
## المتطلبات الأساسية
قبل استخدام تكامل Linear، تأكد من توفر ما يلي:
- حساب [CrewAI AMP](https://app.crewai.com) مع اشتراك فعّال
- حساب Linear بصلاحيات مساحة العمل المناسبة
- ربط حساب Linear الخاص بك عبر [صفحة التكاملات](https://app.crewai.com/crewai_plus/connectors)
## إعداد تكامل Linear
### 1. ربط حساب Linear الخاص بك
1. انتقل إلى [تكاملات CrewAI AMP](https://app.crewai.com/crewai_plus/connectors)
2. ابحث عن **Linear** في قسم تكاملات المصادقة
3. انقر على **Connect** وأكمل عملية OAuth
4. امنح الصلاحيات اللازمة لإدارة المشكلات والمشاريع
5. انسخ رمز المؤسسة من [إعدادات التكامل](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. تثبيت الحزمة المطلوبة
```bash
uv add crewai-tools
```
### 3. إعداد متغير البيئة
<Note>
لاستخدام التكاملات مع `Agent(apps=[])`, يجب تعيين متغير البيئة
`CREWAI_PLATFORM_INTEGRATION_TOKEN` برمز المؤسسة الخاص بك.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
أو أضفه إلى ملف `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## الإجراءات المتاحة
<AccordionGroup>
<Accordion title="linear/create_issue">
**الوصف:** إنشاء مشكلة جديدة في Linear.
**المعاملات:**
- `teamId` (string, مطلوب): معرّف الفريق للمشكلة الجديدة.
- `title` (string, مطلوب): العنوان.
- `description` (string, اختياري): الوصف.
- `statusId` (string, اختياري): الحالة.
- `priority` (string, اختياري): الأولوية كعدد صحيح.
- `dueDate` (string, اختياري): تاريخ الاستحقاق بصيغة ISO 8601.
- `cycleId` (string, اختياري): معرّف الدورة المرتبطة.
- `additionalFields` (object, اختياري): حقول إضافية.
</Accordion>
<Accordion title="linear/update_issue">
**الوصف:** تحديث مشكلة في Linear.
**المعاملات:**
- `issueId` (string, مطلوب): معرّف المشكلة المراد تحديثها.
- `title` (string, اختياري): العنوان.
- `description` (string, اختياري): الوصف.
- `statusId` (string, اختياري): الحالة.
- `priority` (string, اختياري): الأولوية.
- `dueDate` (string, اختياري): تاريخ الاستحقاق.
</Accordion>
<Accordion title="linear/get_issue_by_id">
**الوصف:** الحصول على مشكلة بواسطة المعرّف في Linear.
**المعاملات:**
- `issueId` (string, مطلوب): معرّف المشكلة المراد جلبها.
</Accordion>
<Accordion title="linear/search_issue">
**الوصف:** البحث عن المشكلات في Linear.
**المعاملات:**
- `queryTerm` (string, مطلوب): مصطلح البحث.
- `issueFilterFormula` (object, اختياري): فلتر بصيغة التعبير العادي المنفصل.
</Accordion>
<Accordion title="linear/delete_issue">
**الوصف:** حذف مشكلة في Linear.
**المعاملات:**
- `issueId` (string, مطلوب): معرّف المشكلة المراد حذفها.
</Accordion>
<Accordion title="linear/archive_issue">
**الوصف:** أرشفة مشكلة في Linear.
**المعاملات:**
- `issueId` (string, مطلوب): معرّف المشكلة المراد أرشفتها.
</Accordion>
<Accordion title="linear/create_sub_issue">
**الوصف:** إنشاء مشكلة فرعية في Linear.
**المعاملات:**
- `parentId` (string, مطلوب): معرّف المشكلة الأصلية.
- `teamId` (string, مطلوب): معرّف الفريق.
- `title` (string, مطلوب): العنوان.
- `description` (string, اختياري): الوصف.
</Accordion>
<Accordion title="linear/create_project">
**الوصف:** إنشاء مشروع جديد في Linear.
**المعاملات:**
- `teamIds` (object, مطلوب): معرّف (معرّفات) الفريق المرتبطة بالمشروع.
- `projectName` (string, مطلوب): اسم المشروع.
- `description` (string, اختياري): وصف المشروع.
</Accordion>
<Accordion title="linear/update_project">
**الوصف:** تحديث مشروع في Linear.
**المعاملات:**
- `projectId` (string, مطلوب): معرّف المشروع المراد تحديثه.
- `projectName` (string, اختياري): اسم المشروع.
- `description` (string, اختياري): وصف المشروع.
</Accordion>
<Accordion title="linear/get_project_by_id">
**الوصف:** الحصول على مشروع بواسطة المعرّف في Linear.
**المعاملات:**
- `projectId` (string, مطلوب): معرّف المشروع المراد جلبه.
</Accordion>
<Accordion title="linear/delete_project">
**الوصف:** حذف مشروع في Linear.
**المعاملات:**
- `projectId` (string, مطلوب): معرّف المشروع المراد حذفه.
</Accordion>
<Accordion title="linear/search_teams">
**الوصف:** البحث عن الفرق في Linear.
**المعاملات:**
- `teamFilterFormula` (object, اختياري): فلتر بصيغة التعبير العادي المنفصل.
</Accordion>
</AccordionGroup>
## أمثلة الاستخدام
### إعداد Agent أساسي لـ Linear
```python
from crewai import Agent, Task, Crew
from crewai import Agent, Task, Crew
# Create an agent with Linear capabilities
linear_agent = Agent(
role="Development Manager",
goal="Manage Linear issues and track development progress efficiently",
backstory="An AI assistant specialized in software development project management.",
apps=['linear'] # All Linear actions will be available
)
# Task to create a bug report
create_bug_task = Task(
description="Create a high-priority bug report for the authentication system and assign it to the backend team",
agent=linear_agent,
expected_output="Bug report created successfully with issue ID"
)
# Run the task
crew = Crew(
agents=[linear_agent],
tasks=[create_bug_task]
)
crew.kickoff()
```
### إدارة المشاريع والفرق
```python
from crewai import Agent, Task, Crew
project_coordinator = Agent(
role="Project Coordinator",
goal="Coordinate projects and teams in Linear efficiently",
backstory="An experienced project coordinator who manages development cycles and team workflows.",
apps=['linear']
)
# Task to coordinate project setup
project_coordination = Task(
description="""
1. Search for engineering teams in Linear
2. Create a new project for Q2 feature development
3. Associate the project with relevant teams
4. Create initial project milestones as issues
""",
agent=project_coordinator,
expected_output="Q2 project created with teams assigned and initial milestones established"
)
crew = Crew(
agents=[project_coordinator],
tasks=[project_coordination]
)
crew.kickoff()
```
## استكشاف الأخطاء وإصلاحها
### المشاكل الشائعة
**أخطاء الصلاحيات**
- تأكد من أن حساب Linear الخاص بك لديه الصلاحيات اللازمة لمساحة العمل المستهدفة
- تحقق من أن اتصال OAuth يتضمن النطاقات المطلوبة لـ Linear API
**معرّفات ومراجع غير صالحة**
- تحقق جيداً من معرّفات الفرق والمشكلات والمشاريع للتأكد من صحة صيغة UUID
- تأكد من وجود الكيانات المشار إليها وإمكانية الوصول إليها
**مشاكل التاريخ والوقت**
- استخدم صيغة ISO 8601 لتواريخ الاستحقاق والطوابع الزمنية
- تأكد من معالجة المناطق الزمنية بشكل صحيح
### الحصول على المساعدة
<Card title="تحتاج مساعدة؟" icon="headset" href="mailto:support@crewai.com">
تواصل مع فريق الدعم للحصول على المساعدة في إعداد تكامل Linear أو
استكشاف الأخطاء وإصلاحها.
</Card>

View File

@@ -1,269 +0,0 @@
---
title: تكامل Microsoft Excel
description: "إدارة المصنفات والبيانات مع تكامل Microsoft Excel لـ CrewAI."
icon: "table"
mode: "wide"
---
## نظرة عامة
مكّن وكلاءك من إنشاء وإدارة مصنفات Excel وأوراق العمل والجداول والرسوم البيانية في OneDrive أو SharePoint. تعامل مع نطاقات البيانات، وأنشئ المرئيات، وأدر الجداول، وبسّط سير عمل جداول البيانات باستخدام الأتمتة المدعومة بالذكاء الاصطناعي.
## المتطلبات الأساسية
قبل استخدام تكامل Microsoft Excel، تأكد من توفر ما يلي:
- حساب [CrewAI AMP](https://app.crewai.com) مع اشتراك فعّال
- حساب Microsoft 365 مع إمكانية الوصول إلى Excel وOneDrive/SharePoint
- ربط حساب Microsoft الخاص بك عبر [صفحة التكاملات](https://app.crewai.com/crewai_plus/connectors)
## إعداد تكامل Microsoft Excel
### 1. ربط حساب Microsoft الخاص بك
1. انتقل إلى [تكاملات CrewAI AMP](https://app.crewai.com/crewai_plus/connectors)
2. ابحث عن **Microsoft Excel** في قسم تكاملات المصادقة
3. انقر على **Connect** وأكمل عملية OAuth
4. امنح الصلاحيات اللازمة للوصول إلى الملفات ومصنفات Excel
5. انسخ رمز المؤسسة من [إعدادات التكامل](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. تثبيت الحزمة المطلوبة
```bash
uv add crewai-tools
```
### 3. إعداد متغير البيئة
<Note>
لاستخدام التكاملات مع `Agent(apps=[])`, يجب تعيين متغير البيئة
`CREWAI_PLATFORM_INTEGRATION_TOKEN` برمز المؤسسة الخاص بك.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
أو أضفه إلى ملف `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## الإجراءات المتاحة
<AccordionGroup>
<Accordion title="microsoft_excel/create_workbook">
**الوصف:** إنشاء مصنف Excel جديد في OneDrive أو SharePoint.
**المعاملات:**
- `file_path` (string, مطلوب): المسار حيث يتم إنشاء المصنف (مثال: 'MyWorkbook.xlsx')
- `worksheets` (array, اختياري): أوراق العمل الأولية المراد إنشاؤها
</Accordion>
<Accordion title="microsoft_excel/get_workbooks">
**الوصف:** الحصول على جميع مصنفات Excel من OneDrive أو SharePoint.
**المعاملات:**
- `select` (string, اختياري): اختيار خصائص محددة للإرجاع
- `filter` (string, اختياري): تصفية النتائج باستخدام صيغة OData
- `top` (integer, اختياري): عدد العناصر المراد إرجاعها. الحد الأدنى: 1، الحد الأقصى: 999
</Accordion>
<Accordion title="microsoft_excel/get_worksheets">
**الوصف:** الحصول على جميع أوراق العمل في مصنف Excel.
**المعاملات:**
- `file_id` (string, مطلوب): معرّف ملف Excel
</Accordion>
<Accordion title="microsoft_excel/create_worksheet">
**الوصف:** إنشاء ورقة عمل جديدة في مصنف Excel.
**المعاملات:**
- `file_id` (string, مطلوب): معرّف ملف Excel
- `name` (string, مطلوب): اسم ورقة العمل الجديدة
</Accordion>
<Accordion title="microsoft_excel/get_range_data">
**الوصف:** الحصول على البيانات من نطاق محدد في ورقة عمل Excel.
**المعاملات:**
- `file_id` (string, مطلوب): معرّف ملف Excel
- `worksheet_name` (string, مطلوب): اسم ورقة العمل
- `range` (string, مطلوب): عنوان النطاق (مثال: 'A1:C10')
</Accordion>
<Accordion title="microsoft_excel/update_range_data">
**الوصف:** تحديث البيانات في نطاق محدد في ورقة عمل Excel.
**المعاملات:**
- `file_id` (string, مطلوب): معرّف ملف Excel
- `worksheet_name` (string, مطلوب): اسم ورقة العمل
- `range` (string, مطلوب): عنوان النطاق (مثال: 'A1:C10')
- `values` (array, مطلوب): مصفوفة ثنائية الأبعاد من القيم لتعيينها في النطاق
</Accordion>
<Accordion title="microsoft_excel/add_table">
**الوصف:** إنشاء جدول في ورقة عمل Excel.
**المعاملات:**
- `file_id` (string, مطلوب): معرّف ملف Excel
- `worksheet_name` (string, مطلوب): اسم ورقة العمل
- `range` (string, مطلوب): النطاق للجدول (مثال: 'A1:D10')
- `has_headers` (boolean, اختياري): ما إذا كان الصف الأول يحتوي على ترويسات. الافتراضي: true
</Accordion>
<Accordion title="microsoft_excel/add_table_row">
**الوصف:** إضافة صف جديد إلى جدول Excel.
**المعاملات:**
- `file_id` (string, مطلوب): معرّف ملف Excel
- `worksheet_name` (string, مطلوب): اسم ورقة العمل
- `table_name` (string, مطلوب): اسم الجدول
- `values` (array, مطلوب): مصفوفة من القيم للصف الجديد
</Accordion>
<Accordion title="microsoft_excel/create_chart">
**الوصف:** إنشاء رسم بياني في ورقة عمل Excel.
**المعاملات:**
- `file_id` (string, مطلوب): معرّف ملف Excel
- `worksheet_name` (string, مطلوب): اسم ورقة العمل
- `chart_type` (string, مطلوب): نوع الرسم البياني (مثال: 'ColumnClustered', 'Line', 'Pie')
- `source_data` (string, مطلوب): نطاق البيانات للرسم البياني (مثال: 'A1:B10')
- `series_by` (string, اختياري): كيفية تفسير البيانات ('Auto', 'Columns', 'Rows'). الافتراضي: Auto
</Accordion>
<Accordion title="microsoft_excel/get_cell">
**الوصف:** الحصول على قيمة خلية واحدة في ورقة عمل Excel.
**المعاملات:**
- `file_id` (string, مطلوب): معرّف ملف Excel
- `worksheet_name` (string, مطلوب): اسم ورقة العمل
- `row` (integer, مطلوب): رقم الصف (قائم على الصفر)
- `column` (integer, مطلوب): رقم العمود (قائم على الصفر)
</Accordion>
<Accordion title="microsoft_excel/get_used_range">
**الوصف:** الحصول على النطاق المستخدم لورقة عمل Excel (يحتوي على جميع البيانات).
**المعاملات:**
- `file_id` (string, مطلوب): معرّف ملف Excel
- `worksheet_name` (string, مطلوب): اسم ورقة العمل
</Accordion>
<Accordion title="microsoft_excel/get_tables">
**الوصف:** الحصول على جميع الجداول في ورقة عمل Excel.
**المعاملات:**
- `file_id` (string, مطلوب): معرّف ملف Excel
- `worksheet_name` (string, مطلوب): اسم ورقة العمل
</Accordion>
<Accordion title="microsoft_excel/get_table_data">
**الوصف:** الحصول على البيانات من جدول محدد في ورقة عمل Excel.
**المعاملات:**
- `file_id` (string, مطلوب): معرّف ملف Excel
- `worksheet_name` (string, مطلوب): اسم ورقة العمل
- `table_name` (string, مطلوب): اسم الجدول
</Accordion>
<Accordion title="microsoft_excel/delete_worksheet">
**الوصف:** حذف ورقة عمل من مصنف Excel.
**المعاملات:**
- `file_id` (string, مطلوب): معرّف ملف Excel
- `worksheet_name` (string, مطلوب): اسم ورقة العمل المراد حذفها
</Accordion>
<Accordion title="microsoft_excel/delete_table">
**الوصف:** حذف جدول من ورقة عمل Excel.
**المعاملات:**
- `file_id` (string, مطلوب): معرّف ملف Excel
- `worksheet_name` (string, مطلوب): اسم ورقة العمل
- `table_name` (string, مطلوب): اسم الجدول المراد حذفه
</Accordion>
<Accordion title="microsoft_excel/list_names">
**الوصف:** الحصول على جميع النطاقات المسماة في مصنف Excel.
**المعاملات:**
- `file_id` (string, مطلوب): معرّف ملف Excel
</Accordion>
</AccordionGroup>
## أمثلة الاستخدام
### إعداد Agent أساسي لـ Excel
```python
from crewai import Agent, Task, Crew
# Create an agent with Excel capabilities
excel_agent = Agent(
role="Excel Data Manager",
goal="Manage Excel workbooks and data efficiently",
backstory="An AI assistant specialized in Excel data management and analysis.",
apps=['microsoft_excel'] # All Excel actions will be available
)
# Task to create and populate a workbook
data_management_task = Task(
description="Create a new sales report workbook with data analysis and charts",
agent=excel_agent,
expected_output="Excel workbook created with sales data, analysis, and visualizations"
)
# Run the task
crew = Crew(
agents=[excel_agent],
tasks=[data_management_task]
)
crew.kickoff()
```
## استكشاف الأخطاء وإصلاحها
### المشاكل الشائعة
**أخطاء الصلاحيات**
- تأكد من أن حساب Microsoft الخاص بك لديه الصلاحيات المناسبة لـ Excel وOneDrive/SharePoint
- تحقق من أن اتصال OAuth يتضمن النطاقات المطلوبة (Files.Read.All, Files.ReadWrite.All)
**مشاكل النطاق وورقة العمل**
- تحقق من وجود أسماء أوراق العمل في المصنف المحدد
- تأكد من صحة تنسيق عناوين النطاقات (مثال: 'A1:C10')
**مشاكل الرسوم البيانية**
- تحقق من دعم أنواع الرسوم البيانية (ColumnClustered, Line, Pie، إلخ.)
- تأكد من أن نطاقات بيانات المصدر تحتوي على بيانات مناسبة لنوع الرسم البياني
### الحصول على المساعدة
<Card title="تحتاج مساعدة؟" icon="headset" href="mailto:support@crewai.com">
تواصل مع فريق الدعم للحصول على المساعدة في إعداد تكامل Microsoft Excel
أو استكشاف الأخطاء وإصلاحها.
</Card>

View File

@@ -1,218 +0,0 @@
---
title: تكامل Microsoft OneDrive
description: "إدارة الملفات والمجلدات مع تكامل Microsoft OneDrive لـ CrewAI."
icon: "cloud"
mode: "wide"
---
## نظرة عامة
مكّن وكلاءك من رفع وتحميل وإدارة الملفات والمجلدات في Microsoft OneDrive. أتمت عمليات الملفات، ونظّم المحتوى، وأنشئ روابط المشاركة، وبسّط سير عمل التخزين السحابي باستخدام الأتمتة المدعومة بالذكاء الاصطناعي.
## المتطلبات الأساسية
قبل استخدام تكامل Microsoft OneDrive، تأكد من توفر ما يلي:
- حساب [CrewAI AMP](https://app.crewai.com) مع اشتراك فعّال
- حساب Microsoft مع إمكانية الوصول إلى OneDrive
- ربط حساب Microsoft الخاص بك عبر [صفحة التكاملات](https://app.crewai.com/crewai_plus/connectors)
## إعداد تكامل Microsoft OneDrive
### 1. ربط حساب Microsoft الخاص بك
1. انتقل إلى [تكاملات CrewAI AMP](https://app.crewai.com/crewai_plus/connectors)
2. ابحث عن **Microsoft OneDrive** في قسم تكاملات المصادقة
3. انقر على **Connect** وأكمل عملية OAuth
4. امنح الصلاحيات اللازمة للوصول إلى الملفات
5. انسخ رمز المؤسسة من [إعدادات التكامل](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. تثبيت الحزمة المطلوبة
```bash
uv add crewai-tools
```
### 3. إعداد متغير البيئة
<Note>
لاستخدام التكاملات مع `Agent(apps=[])`, يجب تعيين متغير البيئة
`CREWAI_PLATFORM_INTEGRATION_TOKEN` برمز المؤسسة الخاص بك.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
أو أضفه إلى ملف `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## الإجراءات المتاحة
<AccordionGroup>
<Accordion title="microsoft_onedrive/list_files">
**الوصف:** عرض الملفات والمجلدات في OneDrive.
**المعاملات:**
- `top` (integer, اختياري): عدد العناصر المراد استرجاعها (الحد الأقصى 1000). الافتراضي: `50`.
- `orderby` (string, اختياري): الترتيب حسب حقل (مثال: "name asc", "lastModifiedDateTime desc"). الافتراضي: "name asc".
- `filter` (string, اختياري): تعبير فلتر OData.
</Accordion>
<Accordion title="microsoft_onedrive/get_file_info">
**الوصف:** الحصول على معلومات حول ملف أو مجلد محدد.
**المعاملات:**
- `item_id` (string, مطلوب): معرّف الملف أو المجلد.
</Accordion>
<Accordion title="microsoft_onedrive/download_file">
**الوصف:** تحميل ملف من OneDrive.
**المعاملات:**
- `item_id` (string, مطلوب): معرّف الملف المراد تحميله.
</Accordion>
<Accordion title="microsoft_onedrive/upload_file">
**الوصف:** رفع ملف إلى OneDrive.
**المعاملات:**
- `file_name` (string, مطلوب): اسم الملف المراد رفعه.
- `content` (string, مطلوب): محتوى الملف بترميز Base64.
</Accordion>
<Accordion title="microsoft_onedrive/create_folder">
**الوصف:** إنشاء مجلد جديد في OneDrive.
**المعاملات:**
- `folder_name` (string, مطلوب): اسم المجلد المراد إنشاؤه.
</Accordion>
<Accordion title="microsoft_onedrive/delete_item">
**الوصف:** حذف ملف أو مجلد من OneDrive.
**المعاملات:**
- `item_id` (string, مطلوب): معرّف الملف أو المجلد المراد حذفه.
</Accordion>
<Accordion title="microsoft_onedrive/copy_item">
**الوصف:** نسخ ملف أو مجلد في OneDrive.
**المعاملات:**
- `item_id` (string, مطلوب): معرّف الملف أو المجلد المراد نسخه.
- `parent_id` (string, اختياري): معرّف مجلد الوجهة (اختياري، الافتراضي هو الجذر).
- `new_name` (string, اختياري): الاسم الجديد للعنصر المنسوخ (اختياري).
</Accordion>
<Accordion title="microsoft_onedrive/move_item">
**الوصف:** نقل ملف أو مجلد في OneDrive.
**المعاملات:**
- `item_id` (string, مطلوب): معرّف الملف أو المجلد المراد نقله.
- `parent_id` (string, مطلوب): معرّف مجلد الوجهة.
- `new_name` (string, اختياري): الاسم الجديد للعنصر (اختياري).
</Accordion>
<Accordion title="microsoft_onedrive/search_files">
**الوصف:** البحث عن الملفات والمجلدات في OneDrive.
**المعاملات:**
- `query` (string, مطلوب): سلسلة استعلام البحث.
- `top` (integer, اختياري): عدد النتائج المراد إرجاعها (الحد الأقصى 1000). الافتراضي: `50`.
</Accordion>
<Accordion title="microsoft_onedrive/share_item">
**الوصف:** إنشاء رابط مشاركة لملف أو مجلد.
**المعاملات:**
- `item_id` (string, مطلوب): معرّف الملف أو المجلد المراد مشاركته.
- `type` (string, اختياري): نوع رابط المشاركة. القيم: `view`, `edit`, `embed`. الافتراضي: `view`.
- `scope` (string, اختياري): نطاق رابط المشاركة. القيم: `anonymous`, `organization`. الافتراضي: `anonymous`.
</Accordion>
<Accordion title="microsoft_onedrive/get_recent_files">
**الوصف:** الحصول على الملفات التي تم الوصول إليها مؤخراً من OneDrive.
**المعاملات:**
- `top` (integer, اختياري): عدد العناصر المراد استرجاعها (الحد الأقصى 200). الافتراضي: `25`.
</Accordion>
<Accordion title="microsoft_onedrive/get_shared_with_me">
**الوصف:** الحصول على الملفات والمجلدات المشاركة مع المستخدم.
**المعاملات:**
- `top` (integer, اختياري): عدد العناصر المراد استرجاعها (الحد الأقصى 200). الافتراضي: `50`.
</Accordion>
</AccordionGroup>
## أمثلة الاستخدام
### إعداد Agent أساسي لـ Microsoft OneDrive
```python
from crewai import Agent, Task, Crew
# Create an agent with Microsoft OneDrive capabilities
onedrive_agent = Agent(
role="File Manager",
goal="Manage files and folders in OneDrive efficiently",
backstory="An AI assistant specialized in Microsoft OneDrive file operations and organization.",
apps=['microsoft_onedrive'] # All OneDrive actions will be available
)
# Task to list files and create a folder
organize_files_task = Task(
description="List all files in my OneDrive root directory and create a new folder called 'Project Documents'.",
agent=onedrive_agent,
expected_output="List of files displayed and new folder 'Project Documents' created."
)
# Run the task
crew = Crew(
agents=[onedrive_agent],
tasks=[organize_files_task]
)
crew.kickoff()
```
## استكشاف الأخطاء وإصلاحها
### المشاكل الشائعة
**أخطاء المصادقة**
- تأكد من أن حساب Microsoft الخاص بك لديه الصلاحيات اللازمة للوصول إلى الملفات (مثال: `Files.Read`, `Files.ReadWrite`).
- تحقق من أن اتصال OAuth يتضمن جميع النطاقات المطلوبة.
**مشاكل رفع الملفات**
- تأكد من توفير `file_name` و`content` لعمليات رفع الملفات.
- يجب أن يكون المحتوى بترميز Base64 للملفات الثنائية.
**عمليات الملفات (النسخ/النقل)**
- لـ `move_item`، تأكد من توفير كل من `item_id` و`parent_id`.
- تحقق من وجود مجلدات الوجهة وإمكانية الوصول إليها.
### الحصول على المساعدة
<Card title="تحتاج مساعدة؟" icon="headset" href="mailto:support@crewai.com">
تواصل مع فريق الدعم للحصول على المساعدة في إعداد تكامل Microsoft OneDrive
أو استكشاف الأخطاء وإصلاحها.
</Card>

View File

@@ -1,227 +0,0 @@
---
title: تكامل Microsoft Outlook
description: "إدارة البريد الإلكتروني والتقويم وجهات الاتصال مع تكامل Microsoft Outlook لـ CrewAI."
icon: "envelope"
mode: "wide"
---
## نظرة عامة
مكّن وكلاءك من الوصول إلى رسائل Outlook الإلكترونية وأحداث التقويم وجهات الاتصال وإدارتها. أرسل رسائل البريد الإلكتروني، واسترجع الرسائل، وأدر أحداث التقويم، ونظّم جهات الاتصال باستخدام الأتمتة المدعومة بالذكاء الاصطناعي.
## المتطلبات الأساسية
قبل استخدام تكامل Microsoft Outlook، تأكد من توفر ما يلي:
- حساب [CrewAI AMP](https://app.crewai.com) مع اشتراك فعّال
- حساب Microsoft مع إمكانية الوصول إلى Outlook
- ربط حساب Microsoft الخاص بك عبر [صفحة التكاملات](https://app.crewai.com/crewai_plus/connectors)
## إعداد تكامل Microsoft Outlook
### 1. ربط حساب Microsoft الخاص بك
1. انتقل إلى [تكاملات CrewAI AMP](https://app.crewai.com/crewai_plus/connectors)
2. ابحث عن **Microsoft Outlook** في قسم تكاملات المصادقة
3. انقر على **Connect** وأكمل عملية OAuth
4. امنح الصلاحيات اللازمة للوصول إلى البريد والتقويم وجهات الاتصال
5. انسخ رمز المؤسسة من [إعدادات التكامل](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. تثبيت الحزمة المطلوبة
```bash
uv add crewai-tools
```
### 3. إعداد متغير البيئة
<Note>
لاستخدام التكاملات مع `Agent(apps=[])`, يجب تعيين متغير البيئة
`CREWAI_PLATFORM_INTEGRATION_TOKEN` برمز المؤسسة الخاص بك.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
أو أضفه إلى ملف `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## الإجراءات المتاحة
<AccordionGroup>
<Accordion title="microsoft_outlook/get_messages">
**الوصف:** الحصول على رسائل البريد الإلكتروني من صندوق بريد المستخدم.
**المعاملات:**
- `top` (integer, اختياري): عدد الرسائل (الحد الأقصى 1000). الافتراضي: `10`.
- `filter` (string, اختياري): تعبير فلتر OData (مثال: "isRead eq false").
- `search` (string, اختياري): سلسلة استعلام البحث.
- `orderby` (string, اختياري): الترتيب (مثال: "receivedDateTime desc"). الافتراضي: "receivedDateTime desc".
</Accordion>
<Accordion title="microsoft_outlook/send_email">
**الوصف:** إرسال رسالة بريد إلكتروني.
**المعاملات:**
- `to_recipients` (array, مطلوب): مصفوفة عناوين المستلمين.
- `subject` (string, مطلوب): موضوع البريد الإلكتروني.
- `body` (string, مطلوب): محتوى البريد الإلكتروني.
- `body_type` (string, اختياري): نوع المحتوى. القيم: `Text`, `HTML`. الافتراضي: `HTML`.
- `importance` (string, اختياري): مستوى الأهمية. القيم: `low`, `normal`, `high`. الافتراضي: `normal`.
- `cc_recipients` (array, اختياري): مصفوفة عناوين النسخة الكربونية.
</Accordion>
<Accordion title="microsoft_outlook/get_calendar_events">
**الوصف:** الحصول على أحداث التقويم من تقويم المستخدم.
**المعاملات:**
- `top` (integer, اختياري): عدد الأحداث (الحد الأقصى 1000). الافتراضي: `10`.
- `filter` (string, اختياري): تعبير فلتر OData.
- `orderby` (string, اختياري): الترتيب. الافتراضي: "start/dateTime asc".
</Accordion>
<Accordion title="microsoft_outlook/create_calendar_event">
**الوصف:** إنشاء حدث تقويم جديد.
**المعاملات:**
- `subject` (string, مطلوب): موضوع/عنوان الحدث.
- `start_datetime` (string, مطلوب): وقت البداية بصيغة ISO 8601.
- `end_datetime` (string, مطلوب): وقت النهاية بصيغة ISO 8601.
- `timezone` (string, اختياري): المنطقة الزمنية. الافتراضي: `UTC`.
- `location` (string, اختياري): موقع الحدث.
- `attendees` (array, اختياري): مصفوفة عناوين الحضور.
</Accordion>
<Accordion title="microsoft_outlook/get_contacts">
**الوصف:** الحصول على جهات الاتصال من دفتر عناوين المستخدم.
**المعاملات:**
- `top` (integer, اختياري): عدد جهات الاتصال (الحد الأقصى 1000). الافتراضي: `10`.
- `filter` (string, اختياري): تعبير فلتر OData.
</Accordion>
<Accordion title="microsoft_outlook/create_contact">
**الوصف:** إنشاء جهة اتصال جديدة في دفتر عناوين المستخدم.
**المعاملات:**
- `displayName` (string, مطلوب): اسم العرض لجهة الاتصال.
- `givenName` (string, اختياري): الاسم الأول.
- `surname` (string, اختياري): اسم العائلة.
- `emailAddresses` (array, اختياري): مصفوفة عناوين البريد الإلكتروني.
- `jobTitle` (string, اختياري): المسمى الوظيفي.
- `companyName` (string, اختياري): اسم الشركة.
</Accordion>
<Accordion title="microsoft_outlook/reply_to_email">
**الوصف:** الرد على رسالة بريد إلكتروني.
**المعاملات:**
- `message_id` (string, مطلوب): المعرّف الفريد للرسالة المراد الرد عليها.
- `comment` (string, مطلوب): محتوى الرد.
</Accordion>
<Accordion title="microsoft_outlook/forward_email">
**الوصف:** إعادة توجيه رسالة بريد إلكتروني.
**المعاملات:**
- `message_id` (string, مطلوب): المعرّف الفريد للرسالة المراد إعادة توجيهها.
- `to_recipients` (array, مطلوب): مصفوفة عناوين المستلمين.
- `comment` (string, اختياري): رسالة اختيارية لتضمينها فوق المحتوى المُعاد توجيهه.
</Accordion>
<Accordion title="microsoft_outlook/delete_message">
**الوصف:** حذف رسالة بريد إلكتروني.
**المعاملات:**
- `message_id` (string, مطلوب): المعرّف الفريد للرسالة المراد حذفها.
</Accordion>
<Accordion title="microsoft_outlook/update_event">
**الوصف:** تحديث حدث تقويم موجود.
**المعاملات:**
- `event_id` (string, مطلوب): المعرّف الفريد للحدث.
- `subject` (string, اختياري): الموضوع/العنوان الجديد.
- `start_time` (string, اختياري): وقت البداية الجديد بصيغة ISO 8601.
- `location` (string, اختياري): الموقع الجديد.
</Accordion>
<Accordion title="microsoft_outlook/delete_event">
**الوصف:** حذف حدث تقويم.
**المعاملات:**
- `event_id` (string, مطلوب): المعرّف الفريد للحدث المراد حذفه.
</Accordion>
</AccordionGroup>
## أمثلة الاستخدام
### إعداد Agent أساسي لـ Microsoft Outlook
```python
from crewai import Agent, Task, Crew
# Create an agent with Microsoft Outlook capabilities
outlook_agent = Agent(
role="Email Assistant",
goal="Manage emails, calendar events, and contacts efficiently",
backstory="An AI assistant specialized in Microsoft Outlook operations and communication management.",
apps=['microsoft_outlook'] # All Outlook actions will be available
)
# Task to send an email
send_email_task = Task(
description="Send an email to 'colleague@example.com' with subject 'Project Update' and body 'Hi, here is the latest project update. Best regards.'",
agent=outlook_agent,
expected_output="Email sent successfully to colleague@example.com"
)
# Run the task
crew = Crew(
agents=[outlook_agent],
tasks=[send_email_task]
)
crew.kickoff()
```
## استكشاف الأخطاء وإصلاحها
### المشاكل الشائعة
**أخطاء المصادقة**
- تأكد من أن حساب Microsoft الخاص بك لديه الصلاحيات اللازمة للوصول إلى البريد والتقويم وجهات الاتصال.
- النطاقات المطلوبة تشمل: `Mail.Read`, `Mail.Send`, `Calendars.ReadWrite`, `Contacts.ReadWrite`.
**مشاكل إرسال البريد الإلكتروني**
- تأكد من توفير `to_recipients` و`subject` و`body` لـ `send_email`.
- تحقق من صحة صيغة عناوين البريد الإلكتروني.
**إنشاء أحداث التقويم**
- تأكد من توفير `subject` و`start_datetime` و`end_datetime`.
- استخدم صيغة ISO 8601 المناسبة لحقول التاريخ والوقت.
### الحصول على المساعدة
<Card title="تحتاج مساعدة؟" icon="headset" href="mailto:support@crewai.com">
تواصل مع فريق الدعم للحصول على المساعدة في إعداد تكامل Microsoft Outlook
أو استكشاف الأخطاء وإصلاحها.
</Card>

View File

@@ -1,270 +0,0 @@
---
title: تكامل Microsoft SharePoint
description: "إدارة المواقع والقوائم والمستندات مع تكامل Microsoft SharePoint لـ CrewAI."
icon: "folder-tree"
mode: "wide"
---
## نظرة عامة
مكّن وكلاءك من الوصول إلى مواقع SharePoint والقوائم ومكتبات المستندات وإدارتها. استرجع معلومات المواقع، وأدر عناصر القوائم، وارفع الملفات ونظّمها، وبسّط سير عمل SharePoint باستخدام الأتمتة المدعومة بالذكاء الاصطناعي.
## المتطلبات الأساسية
قبل استخدام تكامل Microsoft SharePoint، تأكد من توفر ما يلي:
- حساب [CrewAI AMP](https://app.crewai.com) مع اشتراك فعّال
- حساب Microsoft 365 مع إمكانية الوصول إلى SharePoint
- ربط حساب Microsoft الخاص بك عبر [صفحة التكاملات](https://app.crewai.com/crewai_plus/connectors)
## إعداد تكامل Microsoft SharePoint
### 1. ربط حساب Microsoft الخاص بك
1. انتقل إلى [تكاملات CrewAI AMP](https://app.crewai.com/crewai_plus/connectors)
2. ابحث عن **Microsoft SharePoint** في قسم تكاملات المصادقة
3. انقر على **Connect** وأكمل عملية OAuth
4. امنح الصلاحيات اللازمة للوصول إلى مواقع SharePoint ومحتوياتها
5. انسخ رمز المؤسسة من [إعدادات التكامل](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. تثبيت الحزمة المطلوبة
```bash
uv add crewai-tools
```
### 3. إعداد متغير البيئة
<Note>
لاستخدام التكاملات مع `Agent(apps=[])`, يجب تعيين متغير البيئة
`CREWAI_PLATFORM_INTEGRATION_TOKEN` برمز المؤسسة الخاص بك.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
أو أضفه إلى ملف `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## الإجراءات المتاحة
<AccordionGroup>
<Accordion title="microsoft_sharepoint/get_sites">
**الوصف:** الحصول على جميع مواقع SharePoint التي يمكن للمستخدم الوصول إليها.
**المعاملات:**
- `search` (string, اختياري): استعلام بحث لتصفية المواقع
- `top` (integer, اختياري): عدد العناصر المراد إرجاعها. الحد الأدنى: 1، الحد الأقصى: 999
</Accordion>
<Accordion title="microsoft_sharepoint/get_site">
**الوصف:** الحصول على معلومات حول موقع SharePoint محدد.
**المعاملات:**
- `site_id` (string, مطلوب): معرّف موقع SharePoint
</Accordion>
<Accordion title="microsoft_sharepoint/get_drives">
**الوصف:** عرض جميع مكتبات المستندات (drives) في موقع SharePoint.
**المعاملات:**
- `site_id` (string, مطلوب): معرّف موقع SharePoint الكامل
</Accordion>
<Accordion title="microsoft_sharepoint/get_site_lists">
**الوصف:** الحصول على جميع القوائم في موقع SharePoint.
**المعاملات:**
- `site_id` (string, مطلوب): معرّف موقع SharePoint
</Accordion>
<Accordion title="microsoft_sharepoint/get_list_items">
**الوصف:** الحصول على عناصر من قائمة SharePoint.
**المعاملات:**
- `site_id` (string, مطلوب): معرّف موقع SharePoint
- `list_id` (string, مطلوب): معرّف القائمة
- `expand` (string, اختياري): توسيع البيانات المرتبطة (مثال: 'fields')
</Accordion>
<Accordion title="microsoft_sharepoint/create_list_item">
**الوصف:** إنشاء عنصر جديد في قائمة SharePoint.
**المعاملات:**
- `site_id` (string, مطلوب): معرّف موقع SharePoint
- `list_id` (string, مطلوب): معرّف القائمة
- `fields` (object, مطلوب): قيم الحقول للعنصر الجديد
</Accordion>
<Accordion title="microsoft_sharepoint/update_list_item">
**الوصف:** تحديث عنصر في قائمة SharePoint.
**المعاملات:**
- `site_id` (string, مطلوب): معرّف موقع SharePoint
- `list_id` (string, مطلوب): معرّف القائمة
- `item_id` (string, مطلوب): معرّف العنصر المراد تحديثه
- `fields` (object, مطلوب): قيم الحقول المراد تحديثها
</Accordion>
<Accordion title="microsoft_sharepoint/delete_list_item">
**الوصف:** حذف عنصر من قائمة SharePoint.
**المعاملات:**
- `site_id` (string, مطلوب): معرّف موقع SharePoint
- `list_id` (string, مطلوب): معرّف القائمة
- `item_id` (string, مطلوب): معرّف العنصر المراد حذفه
</Accordion>
<Accordion title="microsoft_sharepoint/upload_file_to_library">
**الوصف:** رفع ملف إلى مكتبة مستندات SharePoint.
**المعاملات:**
- `site_id` (string, مطلوب): معرّف موقع SharePoint
- `file_path` (string, مطلوب): المسار حيث يتم رفع الملف
- `content` (string, مطلوب): محتوى الملف المراد رفعه
</Accordion>
<Accordion title="microsoft_sharepoint/list_files">
**الوصف:** استرجاع الملفات والمجلدات من مكتبة مستندات SharePoint.
**المعاملات:**
- `site_id` (string, مطلوب): معرّف موقع SharePoint الكامل
- `drive_id` (string, مطلوب): معرّف مكتبة المستندات
- `folder_id` (string, اختياري): معرّف المجلد. الافتراضي: 'root'
- `top` (integer, اختياري): الحد الأقصى لعدد العناصر. الافتراضي: 50
</Accordion>
<Accordion title="microsoft_sharepoint/search_files">
**الوصف:** البحث عن الملفات والمجلدات في مكتبة مستندات SharePoint بالكلمات المفتاحية.
**المعاملات:**
- `site_id` (string, مطلوب): معرّف موقع SharePoint الكامل
- `drive_id` (string, مطلوب): معرّف مكتبة المستندات
- `query` (string, مطلوب): كلمات البحث المفتاحية
</Accordion>
<Accordion title="microsoft_sharepoint/delete_file">
**الوصف:** حذف ملف أو مجلد من مكتبة مستندات SharePoint.
**المعاملات:**
- `site_id` (string, مطلوب): معرّف موقع SharePoint الكامل
- `drive_id` (string, مطلوب): معرّف مكتبة المستندات
- `item_id` (string, مطلوب): المعرّف الفريد للملف أو المجلد المراد حذفه
</Accordion>
<Accordion title="microsoft_sharepoint/create_folder">
**الوصف:** إنشاء مجلد جديد في مكتبة مستندات SharePoint.
**المعاملات:**
- `site_id` (string, مطلوب): معرّف موقع SharePoint الكامل
- `drive_id` (string, مطلوب): معرّف مكتبة المستندات
- `folder_name` (string, مطلوب): اسم المجلد الجديد
- `parent_id` (string, اختياري): معرّف المجلد الأصلي. الافتراضي: 'root'
</Accordion>
<Accordion title="microsoft_sharepoint/download_file">
**الوصف:** تحميل محتوى ملف خام من مكتبة مستندات SharePoint.
**المعاملات:**
- `site_id` (string, مطلوب): معرّف موقع SharePoint الكامل
- `drive_id` (string, مطلوب): معرّف مكتبة المستندات
- `item_id` (string, مطلوب): المعرّف الفريد للملف المراد تحميله
</Accordion>
<Accordion title="microsoft_sharepoint/copy_file">
**الوصف:** نسخ ملف أو مجلد إلى موقع جديد داخل SharePoint.
**المعاملات:**
- `site_id` (string, مطلوب): معرّف موقع SharePoint الكامل
- `drive_id` (string, مطلوب): معرّف مكتبة المستندات
- `item_id` (string, مطلوب): المعرّف الفريد للملف أو المجلد المراد نسخه
- `destination_folder_id` (string, مطلوب): معرّف مجلد الوجهة
</Accordion>
<Accordion title="microsoft_sharepoint/move_file">
**الوصف:** نقل ملف أو مجلد إلى موقع جديد داخل SharePoint.
**المعاملات:**
- `site_id` (string, مطلوب): معرّف موقع SharePoint الكامل
- `drive_id` (string, مطلوب): معرّف مكتبة المستندات
- `item_id` (string, مطلوب): المعرّف الفريد للملف أو المجلد المراد نقله
- `destination_folder_id` (string, مطلوب): معرّف مجلد الوجهة
</Accordion>
</AccordionGroup>
## أمثلة الاستخدام
### إعداد Agent أساسي لـ SharePoint
```python
from crewai import Agent, Task, Crew
# Create an agent with SharePoint capabilities
sharepoint_agent = Agent(
role="SharePoint Manager",
goal="Manage SharePoint sites, lists, and documents efficiently",
backstory="An AI assistant specialized in SharePoint content management and collaboration.",
apps=['microsoft_sharepoint'] # All SharePoint actions will be available
)
# Task to organize SharePoint content
content_organization_task = Task(
description="List all accessible SharePoint sites and organize content by department",
agent=sharepoint_agent,
expected_output="SharePoint sites listed and content organized by department"
)
# Run the task
crew = Crew(
agents=[sharepoint_agent],
tasks=[content_organization_task]
)
crew.kickoff()
```
## استكشاف الأخطاء وإصلاحها
### المشاكل الشائعة
**أخطاء الصلاحيات**
- تأكد من أن حساب Microsoft الخاص بك لديه الصلاحيات المناسبة لمواقع SharePoint
- تحقق من أن اتصال OAuth يتضمن النطاقات المطلوبة (Sites.Read.All, Sites.ReadWrite.All)
**مشاكل معرّفات المواقع والقوائم**
- تحقق من صحة معرّفات المواقع والقوائم وصيغتها الصحيحة
- استخدم إجراءات get_sites وget_site_lists لاكتشاف المعرّفات الصالحة
**مشاكل الحقول والمخطط**
- تأكد من تطابق أسماء الحقول تماماً مع مخطط قائمة SharePoint
- تحقق من تضمين الحقول المطلوبة عند إنشاء أو تحديث عناصر القوائم
### الحصول على المساعدة
<Card title="تحتاج مساعدة؟" icon="headset" href="mailto:support@crewai.com">
تواصل مع فريق الدعم للحصول على المساعدة في إعداد تكامل Microsoft SharePoint
أو استكشاف الأخطاء وإصلاحها.
</Card>

View File

@@ -1,205 +0,0 @@
---
title: تكامل Microsoft Teams
description: "التعاون الجماعي والتواصل مع تكامل Microsoft Teams لـ CrewAI."
icon: "users"
mode: "wide"
---
## نظرة عامة
مكّن وكلاءك من الوصول إلى بيانات Teams وإرسال الرسائل وإنشاء الاجتماعات وإدارة القنوات. أتمت التواصل الجماعي، وجدوِل الاجتماعات، واسترجع الرسائل، وبسّط سير عمل التعاون باستخدام الأتمتة المدعومة بالذكاء الاصطناعي.
## المتطلبات الأساسية
قبل استخدام تكامل Microsoft Teams، تأكد من توفر ما يلي:
- حساب [CrewAI AMP](https://app.crewai.com) مع اشتراك فعّال
- حساب Microsoft مع إمكانية الوصول إلى Teams
- ربط حساب Microsoft الخاص بك عبر [صفحة التكاملات](https://app.crewai.com/crewai_plus/connectors)
## إعداد تكامل Microsoft Teams
### 1. ربط حساب Microsoft الخاص بك
1. انتقل إلى [تكاملات CrewAI AMP](https://app.crewai.com/crewai_plus/connectors)
2. ابحث عن **Microsoft Teams** في قسم تكاملات المصادقة
3. انقر على **Connect** وأكمل عملية OAuth
4. امنح الصلاحيات اللازمة للوصول إلى Teams
5. انسخ رمز المؤسسة من [إعدادات التكامل](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. تثبيت الحزمة المطلوبة
```bash
uv add crewai-tools
```
### 3. إعداد متغير البيئة
<Note>
لاستخدام التكاملات مع `Agent(apps=[])`, يجب تعيين متغير البيئة
`CREWAI_PLATFORM_INTEGRATION_TOKEN` برمز المؤسسة الخاص بك.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
أو أضفه إلى ملف `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## الإجراءات المتاحة
<AccordionGroup>
<Accordion title="microsoft_teams/get_teams">
**الوصف:** الحصول على جميع الفرق التي ينتمي إليها المستخدم.
**المعاملات:**
- لا توجد معاملات مطلوبة.
</Accordion>
<Accordion title="microsoft_teams/get_channels">
**الوصف:** الحصول على القنوات في فريق محدد.
**المعاملات:**
- `team_id` (string, مطلوب): معرّف الفريق.
</Accordion>
<Accordion title="microsoft_teams/send_message">
**الوصف:** إرسال رسالة إلى قناة Teams.
**المعاملات:**
- `team_id` (string, مطلوب): معرّف الفريق.
- `channel_id` (string, مطلوب): معرّف القناة.
- `message` (string, مطلوب): محتوى الرسالة.
- `content_type` (string, اختياري): نوع المحتوى (html أو text). الافتراضي: `text`.
</Accordion>
<Accordion title="microsoft_teams/get_messages">
**الوصف:** الحصول على الرسائل من قناة Teams.
**المعاملات:**
- `team_id` (string, مطلوب): معرّف الفريق.
- `channel_id` (string, مطلوب): معرّف القناة.
- `top` (integer, اختياري): عدد الرسائل (الحد الأقصى 50). الافتراضي: `20`.
</Accordion>
<Accordion title="microsoft_teams/create_meeting">
**الوصف:** إنشاء اجتماع Teams.
**المعاملات:**
- `subject` (string, مطلوب): موضوع/عنوان الاجتماع.
- `startDateTime` (string, مطلوب): وقت بداية الاجتماع (صيغة ISO 8601 مع المنطقة الزمنية).
- `endDateTime` (string, مطلوب): وقت نهاية الاجتماع (صيغة ISO 8601 مع المنطقة الزمنية).
</Accordion>
<Accordion title="microsoft_teams/get_team_members">
**الوصف:** الحصول على أعضاء فريق محدد.
**المعاملات:**
- `team_id` (string, مطلوب): المعرّف الفريد للفريق.
- `top` (integer, اختياري): الحد الأقصى لعدد الأعضاء (1-999). الافتراضي: `100`.
</Accordion>
<Accordion title="microsoft_teams/create_channel">
**الوصف:** إنشاء قناة جديدة في فريق.
**المعاملات:**
- `team_id` (string, مطلوب): المعرّف الفريد للفريق.
- `display_name` (string, مطلوب): اسم القناة. الحد الأقصى 50 حرفاً.
- `description` (string, اختياري): وصف اختياري يشرح غرض القناة.
- `membership_type` (string, اختياري): ظهور القناة. القيم: `standard`, `private`. الافتراضي: `standard`.
</Accordion>
<Accordion title="microsoft_teams/reply_to_message">
**الوصف:** الرد على رسالة في قناة Teams.
**المعاملات:**
- `team_id` (string, مطلوب): المعرّف الفريد للفريق.
- `channel_id` (string, مطلوب): المعرّف الفريد للقناة.
- `message_id` (string, مطلوب): المعرّف الفريد للرسالة المراد الرد عليها.
- `message` (string, مطلوب): محتوى الرد.
- `content_type` (string, اختياري): صيغة المحتوى. القيم: `html`, `text`. الافتراضي: `text`.
</Accordion>
<Accordion title="microsoft_teams/update_meeting">
**الوصف:** تحديث اجتماع عبر الإنترنت موجود.
**المعاملات:**
- `meeting_id` (string, مطلوب): المعرّف الفريد للاجتماع.
- `subject` (string, اختياري): عنوان الاجتماع الجديد.
- `startDateTime` (string, اختياري): وقت البداية الجديد بصيغة ISO 8601.
- `endDateTime` (string, اختياري): وقت النهاية الجديد بصيغة ISO 8601.
</Accordion>
<Accordion title="microsoft_teams/delete_meeting">
**الوصف:** حذف اجتماع عبر الإنترنت.
**المعاملات:**
- `meeting_id` (string, مطلوب): المعرّف الفريد للاجتماع المراد حذفه.
</Accordion>
</AccordionGroup>
## أمثلة الاستخدام
### إعداد Agent أساسي لـ Microsoft Teams
```python
from crewai import Agent, Task, Crew
# Create an agent with Microsoft Teams capabilities
teams_agent = Agent(
role="Teams Coordinator",
goal="Manage Teams communication and meetings efficiently",
backstory="An AI assistant specialized in Microsoft Teams operations and team collaboration.",
apps=['microsoft_teams'] # All Teams actions will be available
)
# Task to list teams and channels
explore_teams_task = Task(
description="List all teams I'm a member of and then get the channels for the first team.",
agent=teams_agent,
expected_output="List of teams and channels displayed."
)
# Run the task
crew = Crew(
agents=[teams_agent],
tasks=[explore_teams_task]
)
crew.kickoff()
```
## استكشاف الأخطاء وإصلاحها
### المشاكل الشائعة
**أخطاء المصادقة**
- تأكد من أن حساب Microsoft الخاص بك لديه الصلاحيات اللازمة للوصول إلى Teams.
- النطاقات المطلوبة تشمل: `Team.ReadBasic.All`, `Channel.ReadBasic.All`, `ChannelMessage.Send`, `OnlineMeetings.ReadWrite`.
**إنشاء الاجتماعات**
- تأكد من توفير `subject` و`startDateTime` و`endDateTime`.
- استخدم صيغة ISO 8601 مع المنطقة الزمنية لحقول التاريخ والوقت.
### الحصول على المساعدة
<Card title="تحتاج مساعدة؟" icon="headset" href="mailto:support@crewai.com">
تواصل مع فريق الدعم للحصول على المساعدة في إعداد تكامل Microsoft Teams
أو استكشاف الأخطاء وإصلاحها.
</Card>

View File

@@ -1,168 +0,0 @@
---
title: تكامل Microsoft Word
description: "إنشاء المستندات وإدارتها مع تكامل Microsoft Word لـ CrewAI."
icon: "file-word"
mode: "wide"
---
## نظرة عامة
مكّن وكلاءك من إنشاء وقراءة وإدارة مستندات Word والملفات النصية في OneDrive أو SharePoint. أتمت إنشاء المستندات، واسترجع المحتوى، وأدر خصائص المستندات، وبسّط سير عمل المستندات باستخدام الأتمتة المدعومة بالذكاء الاصطناعي.
## المتطلبات الأساسية
قبل استخدام تكامل Microsoft Word، تأكد من توفر ما يلي:
- حساب [CrewAI AMP](https://app.crewai.com) مع اشتراك فعّال
- حساب Microsoft مع إمكانية الوصول إلى Word وOneDrive/SharePoint
- ربط حساب Microsoft الخاص بك عبر [صفحة التكاملات](https://app.crewai.com/crewai_plus/connectors)
## إعداد تكامل Microsoft Word
### 1. ربط حساب Microsoft الخاص بك
1. انتقل إلى [تكاملات CrewAI AMP](https://app.crewai.com/crewai_plus/connectors)
2. ابحث عن **Microsoft Word** في قسم تكاملات المصادقة
3. انقر على **Connect** وأكمل عملية OAuth
4. امنح الصلاحيات اللازمة للوصول إلى الملفات
5. انسخ رمز المؤسسة من [إعدادات التكامل](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. تثبيت الحزمة المطلوبة
```bash
uv add crewai-tools
```
### 3. إعداد متغير البيئة
<Note>
لاستخدام التكاملات مع `Agent(apps=[])`, يجب تعيين متغير البيئة
`CREWAI_PLATFORM_INTEGRATION_TOKEN` برمز المؤسسة الخاص بك.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
أو أضفه إلى ملف `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## الإجراءات المتاحة
<AccordionGroup>
<Accordion title="microsoft_word/get_documents">
**الوصف:** الحصول على جميع مستندات Word من OneDrive أو SharePoint.
**المعاملات:**
- `top` (integer, اختياري): عدد العناصر المراد إرجاعها (الحد الأدنى 1، الحد الأقصى 999).
- `filter` (string, اختياري): تصفية النتائج باستخدام صيغة OData.
</Accordion>
<Accordion title="microsoft_word/create_text_document">
**الوصف:** إنشاء مستند نصي (.txt) مع محتوى. يُنصح به لإنشاء المحتوى برمجياً.
**المعاملات:**
- `file_name` (string, مطلوب): اسم المستند النصي (يجب أن ينتهي بـ .txt).
- `content` (string, اختياري): المحتوى النصي للمستند.
</Accordion>
<Accordion title="microsoft_word/get_document_content">
**الوصف:** الحصول على محتوى مستند (يعمل بشكل أفضل مع الملفات النصية).
**المعاملات:**
- `file_id` (string, مطلوب): معرّف المستند.
</Accordion>
<Accordion title="microsoft_word/get_document_properties">
**الوصف:** الحصول على خصائص وبيانات وصفية لمستند.
**المعاملات:**
- `file_id` (string, مطلوب): معرّف المستند.
</Accordion>
<Accordion title="microsoft_word/delete_document">
**الوصف:** حذف مستند.
**المعاملات:**
- `file_id` (string, مطلوب): معرّف المستند المراد حذفه.
</Accordion>
<Accordion title="microsoft_word/copy_document">
**الوصف:** نسخ مستند إلى موقع جديد في OneDrive.
**المعاملات:**
- `file_id` (string, مطلوب): معرّف المستند المراد نسخه
- `name` (string, اختياري): الاسم الجديد للمستند المنسوخ
- `parent_id` (string, اختياري): معرّف مجلد الوجهة (الافتراضي هو الجذر)
</Accordion>
<Accordion title="microsoft_word/move_document">
**الوصف:** نقل مستند إلى موقع جديد في OneDrive.
**المعاملات:**
- `file_id` (string, مطلوب): معرّف المستند المراد نقله
- `parent_id` (string, مطلوب): معرّف مجلد الوجهة
- `name` (string, اختياري): الاسم الجديد للمستند المنقول
</Accordion>
</AccordionGroup>
## أمثلة الاستخدام
### إعداد Agent أساسي لـ Microsoft Word
```python
from crewai import Agent, Task, Crew
# Create an agent with Microsoft Word capabilities
word_agent = Agent(
role="Document Manager",
goal="Manage Word documents and text files efficiently",
backstory="An AI assistant specialized in Microsoft Word document operations and content management.",
apps=['microsoft_word'] # All Word actions will be available
)
# Task to create a new text document
create_doc_task = Task(
description="Create a new text document named 'meeting_notes.txt' with content 'Meeting Notes from January 2024: Key discussion points and action items.'",
agent=word_agent,
expected_output="New text document 'meeting_notes.txt' created successfully."
)
# Run the task
crew = Crew(
agents=[word_agent],
tasks=[create_doc_task]
)
crew.kickoff()
```
## استكشاف الأخطاء وإصلاحها
### المشاكل الشائعة
**أخطاء المصادقة**
- تأكد من أن حساب Microsoft الخاص بك لديه الصلاحيات اللازمة للوصول إلى الملفات (`Files.Read.All`, `Files.ReadWrite.All`).
**مشاكل إنشاء الملفات**
- عند إنشاء مستندات نصية، تأكد من أن `file_name` ينتهي بامتداد `.txt`.
- تحقق من أن لديك صلاحيات الكتابة للموقع المستهدف.
### الحصول على المساعدة
<Card title="تحتاج مساعدة؟" icon="headset" href="mailto:support@crewai.com">
تواصل مع فريق الدعم للحصول على المساعدة في إعداد تكامل Microsoft Word
أو استكشاف الأخطاء وإصلاحها.
</Card>

View File

@@ -1,149 +0,0 @@
---
title: تكامل Notion
description: "إدارة المستخدمين والتعليقات مع تكامل Notion لـ CrewAI."
icon: "book"
mode: "wide"
---
## نظرة عامة
مكّن وكلاءك من إدارة المستخدمين وإنشاء التعليقات عبر Notion. يمكنك الوصول إلى معلومات مستخدمي مساحة العمل وإنشاء تعليقات على الصفحات والمناقشات، مما يبسّط سير عمل التعاون باستخدام الأتمتة المدعومة بالذكاء الاصطناعي.
## المتطلبات الأساسية
قبل استخدام تكامل Notion، تأكد من توفر ما يلي:
- حساب [CrewAI AMP](https://app.crewai.com) مع اشتراك فعّال
- حساب Notion بصلاحيات مساحة العمل المناسبة
- ربط حساب Notion الخاص بك عبر [صفحة التكاملات](https://app.crewai.com/crewai_plus/connectors)
## إعداد تكامل Notion
### 1. ربط حساب Notion الخاص بك
1. انتقل إلى [تكاملات CrewAI AMP](https://app.crewai.com/crewai_plus/connectors)
2. ابحث عن **Notion** في قسم تكاملات المصادقة
3. انقر على **Connect** وأكمل عملية OAuth
4. امنح الصلاحيات اللازمة للوصول إلى المستخدمين وإنشاء التعليقات
5. انسخ رمز المؤسسة من [إعدادات التكامل](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. تثبيت الحزمة المطلوبة
```bash
uv add crewai-tools
```
### 3. إعداد متغير البيئة
<Note>
لاستخدام التكاملات مع `Agent(apps=[])`, يجب تعيين متغير البيئة
`CREWAI_PLATFORM_INTEGRATION_TOKEN` برمز المؤسسة الخاص بك.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
أو أضفه إلى ملف `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## الإجراءات المتاحة
<AccordionGroup>
<Accordion title="notion/list_users">
**الوصف:** عرض جميع المستخدمين في مساحة العمل.
**المعاملات:**
- `page_size` (integer, اختياري): عدد العناصر في الاستجابة. الحد الأدنى: 1، الحد الأقصى: 100، الافتراضي: 100
- `start_cursor` (string, اختياري): مؤشر للترقيم.
</Accordion>
<Accordion title="notion/get_user">
**الوصف:** استرجاع مستخدم محدد بواسطة المعرّف.
**المعاملات:**
- `user_id` (string, مطلوب): معرّف المستخدم المراد استرجاعه.
</Accordion>
<Accordion title="notion/create_comment">
**الوصف:** إنشاء تعليق على صفحة أو مناقشة.
**المعاملات:**
- `parent` (object, مطلوب): الصفحة الأصلية أو المناقشة للتعليق عليها.
```json
{
"type": "page_id",
"page_id": "PAGE_ID_HERE"
}
```
- `rich_text` (array, مطلوب): المحتوى النصي الغني للتعليق.
```json
[
{
"type": "text",
"text": {
"content": "This is my comment text"
}
}
]
```
</Accordion>
</AccordionGroup>
## أمثلة الاستخدام
### إعداد Agent أساسي لـ Notion
```python
from crewai import Agent, Task, Crew
# Create an agent with Notion capabilities
notion_agent = Agent(
role="Workspace Manager",
goal="Manage workspace users and facilitate collaboration through comments",
backstory="An AI assistant specialized in user management and team collaboration.",
apps=['notion'] # All Notion actions will be available
)
# Task to list workspace users
user_management_task = Task(
description="List all users in the workspace and provide a summary of team members",
agent=notion_agent,
expected_output="Complete list of workspace users with their details"
)
# Run the task
crew = Crew(
agents=[notion_agent],
tasks=[user_management_task]
)
crew.kickoff()
```
## استكشاف الأخطاء وإصلاحها
### المشاكل الشائعة
**أخطاء الصلاحيات**
- تأكد من أن حساب Notion الخاص بك لديه الصلاحيات المناسبة لقراءة معلومات المستخدمين
- تحقق من أن لديك صلاحيات التعليق على الصفحات أو المناقشات المستهدفة
**مشاكل إنشاء التعليقات**
- تحقق من صحة معرّفات الصفحات أو المناقشات وإمكانية الوصول إليها
- تأكد من اتباع محتوى النص الغني لمواصفات صيغة Notion API
### الحصول على المساعدة
<Card title="تحتاج مساعدة؟" icon="headset" href="mailto:support@crewai.com">
تواصل مع فريق الدعم للحصول على المساعدة في إعداد تكامل Notion أو
استكشاف الأخطاء وإصلاحها.
</Card>

View File

@@ -1,331 +0,0 @@
---
title: تكامل Salesforce
description: "أتمتة CRM والمبيعات مع تكامل Salesforce لـ CrewAI."
icon: "salesforce"
mode: "wide"
---
## نظرة عامة
مكّن وكلاءك من إدارة علاقات العملاء وعمليات المبيعات والبيانات عبر Salesforce. أنشئ السجلات وحدّثها، وأدر العملاء المحتملين والفرص، ونفّذ استعلامات SOQL، وبسّط سير عمل CRM باستخدام الأتمتة المدعومة بالذكاء الاصطناعي.
## المتطلبات الأساسية
قبل استخدام تكامل Salesforce، تأكد من توفر ما يلي:
- حساب [CrewAI AMP](https://app.crewai.com) مع اشتراك فعّال
- حساب Salesforce بالصلاحيات المناسبة
- ربط حساب Salesforce الخاص بك عبر [صفحة التكاملات](https://app.crewai.com/integrations)
## إعداد تكامل Salesforce
### 1. ربط حساب Salesforce الخاص بك
1. انتقل إلى [تكاملات CrewAI AMP](https://app.crewai.com/crewai_plus/connectors)
2. ابحث عن **Salesforce** في قسم تكاملات المصادقة
3. انقر على **Connect** وأكمل عملية OAuth
4. امنح الصلاحيات اللازمة لإدارة CRM والمبيعات
5. انسخ رمز المؤسسة من [إعدادات التكامل](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. تثبيت الحزمة المطلوبة
```bash
uv add crewai-tools
```
### 3. إعداد متغير البيئة
<Note>
لاستخدام التكاملات مع `Agent(apps=[])`, يجب تعيين متغير البيئة
`CREWAI_PLATFORM_INTEGRATION_TOKEN` برمز المؤسسة الخاص بك.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
أو أضفه إلى ملف `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## الأدوات المتاحة
### **إدارة السجلات**
<AccordionGroup>
<Accordion title="salesforce/create_record_contact">
**الوصف:** إنشاء سجل جهة اتصال جديد في Salesforce.
**المعاملات:**
- `LastName` (string, مطلوب): اسم العائلة - هذا الحقل مطلوب
- `FirstName` (string, اختياري): الاسم الأول
- `Email` (string, اختياري): عنوان البريد الإلكتروني
- `accountId` (string, اختياري): معرّف الحساب المرتبط
- `Title` (string, اختياري): المسمى الوظيفي
</Accordion>
<Accordion title="salesforce/create_record_lead">
**الوصف:** إنشاء سجل عميل محتمل جديد في Salesforce.
**المعاملات:**
- `LastName` (string, مطلوب): اسم العائلة - هذا الحقل مطلوب
- `Company` (string, مطلوب): الشركة - هذا الحقل مطلوب
- `FirstName` (string, اختياري): الاسم الأول
- `Email` (string, اختياري): عنوان البريد الإلكتروني
- `Status` (string, اختياري): حالة العميل المحتمل
</Accordion>
<Accordion title="salesforce/create_record_opportunity">
**الوصف:** إنشاء سجل فرصة جديد في Salesforce.
**المعاملات:**
- `Name` (string, مطلوب): اسم الفرصة - هذا الحقل مطلوب
- `StageName` (string, اختياري): مرحلة الفرصة
- `CloseDate` (string, اختياري): تاريخ الإغلاق بصيغة YYYY-MM-DD
- `Amount` (string, اختياري): المبلغ المقدر للبيع
</Accordion>
<Accordion title="salesforce/create_record_account">
**الوصف:** إنشاء سجل حساب جديد في Salesforce.
**المعاملات:**
- `Name` (string, مطلوب): اسم الحساب - هذا الحقل مطلوب
- `Website` (string, اختياري): عنوان URL للموقع الإلكتروني
- `Phone` (string, اختياري): رقم الهاتف
- `Description` (string, اختياري): وصف الحساب
</Accordion>
<Accordion title="salesforce/create_record_task">
**الوصف:** إنشاء سجل مهمة جديد في Salesforce.
**المعاملات:**
- `subject` (string, مطلوب): موضوع المهمة
- `taskSubtype` (string, مطلوب): النوع الفرعي للمهمة - الخيارات: task, email, listEmail, call
- `whatId` (string, اختياري): معرّف الحساب أو الفرصة المرتبطة
- `Status` (string, اختياري): الحالة - الخيارات: Not Started, In Progress, Completed
</Accordion>
</AccordionGroup>
### **تحديث السجلات**
<AccordionGroup>
<Accordion title="salesforce/update_record_contact">
**الوصف:** تحديث سجل جهة اتصال موجود في Salesforce.
**المعاملات:**
- `recordId` (string, مطلوب): معرّف السجل المراد تحديثه
- `FirstName` (string, اختياري): الاسم الأول
- `LastName` (string, اختياري): اسم العائلة
- `Email` (string, اختياري): عنوان البريد الإلكتروني
</Accordion>
<Accordion title="salesforce/update_record_lead">
**الوصف:** تحديث سجل عميل محتمل موجود في Salesforce.
**المعاملات:**
- `recordId` (string, مطلوب): معرّف السجل المراد تحديثه
- `LastName` (string, اختياري): اسم العائلة
- `Company` (string, اختياري): اسم الشركة
- `Status` (string, اختياري): حالة العميل المحتمل
</Accordion>
<Accordion title="salesforce/update_record_opportunity">
**الوصف:** تحديث سجل فرصة موجود في Salesforce.
**المعاملات:**
- `recordId` (string, مطلوب): معرّف السجل المراد تحديثه
- `Name` (string, اختياري): اسم الفرصة
- `StageName` (string, اختياري): مرحلة الفرصة
- `Amount` (string, اختياري): المبلغ المقدر
</Accordion>
<Accordion title="salesforce/update_record_account">
**الوصف:** تحديث سجل حساب موجود في Salesforce.
**المعاملات:**
- `recordId` (string, مطلوب): معرّف السجل المراد تحديثه
- `Name` (string, اختياري): اسم الحساب
- `Website` (string, اختياري): عنوان URL للموقع الإلكتروني
</Accordion>
</AccordionGroup>
### **استرجاع السجلات**
<AccordionGroup>
<Accordion title="salesforce/get_record_by_id_contact">
**الوصف:** الحصول على سجل جهة اتصال بواسطة معرّفه.
**المعاملات:**
- `recordId` (string, مطلوب): معرّف سجل جهة الاتصال
</Accordion>
<Accordion title="salesforce/get_record_by_id_lead">
**الوصف:** الحصول على سجل عميل محتمل بواسطة معرّفه.
**المعاملات:**
- `recordId` (string, مطلوب): معرّف سجل العميل المحتمل
</Accordion>
<Accordion title="salesforce/get_record_by_id_opportunity">
**الوصف:** الحصول على سجل فرصة بواسطة معرّفه.
**المعاملات:**
- `recordId` (string, مطلوب): معرّف سجل الفرصة
</Accordion>
<Accordion title="salesforce/get_record_by_id_account">
**الوصف:** الحصول على سجل حساب بواسطة معرّفه.
**المعاملات:**
- `recordId` (string, مطلوب): معرّف سجل الحساب
</Accordion>
</AccordionGroup>
### **البحث في السجلات**
<AccordionGroup>
<Accordion title="salesforce/search_records_contact">
**الوصف:** البحث عن سجلات جهات الاتصال بتصفية متقدمة.
**المعاملات:**
- `filterFormula` (object, اختياري): فلتر متقدم بصيغة التعبير العادي المنفصل
- `sortBy` (string, اختياري): حقل الفرز
- `sortDirection` (string, اختياري): اتجاه الفرز - الخيارات: ASC, DESC
</Accordion>
<Accordion title="salesforce/search_records_lead">
**الوصف:** البحث عن سجلات العملاء المحتملين بتصفية متقدمة.
**المعاملات:**
- `filterFormula` (object, اختياري): فلتر متقدم
- `sortBy` (string, اختياري): حقل الفرز
</Accordion>
<Accordion title="salesforce/search_records_opportunity">
**الوصف:** البحث عن سجلات الفرص بتصفية متقدمة.
**المعاملات:**
- `filterFormula` (object, اختياري): فلتر متقدم
- `sortBy` (string, اختياري): حقل الفرز
</Accordion>
</AccordionGroup>
### **العمليات المتقدمة**
<AccordionGroup>
<Accordion title="salesforce/write_soql_query">
**الوصف:** تنفيذ استعلامات SOQL مخصصة على بيانات Salesforce.
**المعاملات:**
- `query` (string, مطلوب): استعلام SOQL (مثال: "SELECT Id, Name FROM Account WHERE Name = 'Example'")
</Accordion>
<Accordion title="salesforce/create_custom_object">
**الوصف:** نشر كائن مخصص جديد في Salesforce.
**المعاملات:**
- `label` (string, مطلوب): تسمية الكائن
- `pluralLabel` (string, مطلوب): التسمية الجمعية
- `recordName` (string, مطلوب): اسم السجل
</Accordion>
<Accordion title="salesforce/describe_action_schema">
**الوصف:** الحصول على المخطط المتوقع لعمليات على أنواع كائنات محددة.
**المعاملات:**
- `recordType` (string, مطلوب): نوع السجل المراد وصفه
- `operation` (string, مطلوب): نوع العملية (مثال: "CREATE_RECORD" أو "UPDATE_RECORD")
</Accordion>
</AccordionGroup>
## أمثلة الاستخدام
### إعداد Agent أساسي لـ Salesforce
```python
from crewai import Agent, Task, Crew
from crewai import Agent, Task, Crew
# Create an agent with Salesforce capabilities
salesforce_agent = Agent(
role="CRM Manager",
goal="Manage customer relationships and sales processes efficiently",
backstory="An AI assistant specialized in CRM operations and sales automation.",
apps=['salesforce'] # All Salesforce actions will be available
)
# Task to create a new lead
create_lead_task = Task(
description="Create a new lead for John Doe from Example Corp with email john.doe@example.com",
agent=salesforce_agent,
expected_output="Lead created successfully with lead ID"
)
# Run the task
crew = Crew(
agents=[salesforce_agent],
tasks=[create_lead_task]
)
crew.kickoff()
```
### استعلامات SOQL المتقدمة وإعداد التقارير
```python
from crewai import Agent, Task, Crew
data_analyst = Agent(
role="Sales Data Analyst",
goal="Generate insights from Salesforce data using SOQL queries",
backstory="An analytical AI that excels at extracting meaningful insights from CRM data.",
apps=['salesforce']
)
# Complex task involving SOQL queries and data analysis
analysis_task = Task(
description="""
1. Execute a SOQL query to find all opportunities closing this quarter
2. Search for contacts at companies with opportunities over $100K
3. Create a summary report of the sales pipeline status
4. Update high-value opportunities with next steps
""",
agent=data_analyst,
expected_output="Comprehensive sales pipeline analysis with actionable insights"
)
crew = Crew(
agents=[data_analyst],
tasks=[analysis_task]
)
crew.kickoff()
```
### الحصول على المساعدة
<Card title="تحتاج مساعدة؟" icon="headset" href="mailto:support@crewai.com">
تواصل مع فريق الدعم للحصول على المساعدة في إعداد تكامل Salesforce أو
استكشاف الأخطاء وإصلاحها.
</Card>

View File

@@ -1,196 +0,0 @@
---
title: تكامل Shopify
description: "إدارة التجارة الإلكترونية والمتجر الإلكتروني مع تكامل Shopify لـ CrewAI."
icon: "shopify"
mode: "wide"
---
## نظرة عامة
مكّن وكلاءك من إدارة عمليات التجارة الإلكترونية عبر Shopify. تعامل مع العملاء والطلبات والمنتجات والمخزون وتحليلات المتجر لتبسيط أعمالك التجارية عبر الإنترنت باستخدام الأتمتة المدعومة بالذكاء الاصطناعي.
## المتطلبات الأساسية
قبل استخدام تكامل Shopify، تأكد من توفر ما يلي:
- حساب [CrewAI AMP](https://app.crewai.com) مع اشتراك فعّال
- متجر Shopify بصلاحيات المسؤول المناسبة
- ربط متجر Shopify الخاص بك عبر [صفحة التكاملات](https://app.crewai.com/integrations)
## إعداد تكامل Shopify
### 1. ربط متجر Shopify الخاص بك
1. انتقل إلى [تكاملات CrewAI AMP](https://app.crewai.com/crewai_plus/connectors)
2. ابحث عن **Shopify** في قسم تكاملات المصادقة
3. انقر على **Connect** وأكمل عملية OAuth
4. امنح الصلاحيات اللازمة لإدارة المتجر والمنتجات
5. انسخ رمز المؤسسة من [إعدادات التكامل](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. تثبيت الحزمة المطلوبة
```bash
uv add crewai-tools
```
### 3. إعداد متغير البيئة
<Note>
لاستخدام التكاملات مع `Agent(apps=[])`, يجب تعيين متغير البيئة
`CREWAI_PLATFORM_INTEGRATION_TOKEN` برمز المؤسسة الخاص بك.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
أو أضفه إلى ملف `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## الأدوات المتاحة
### **إدارة العملاء**
<AccordionGroup>
<Accordion title="shopify/get_customers">
**الوصف:** استرجاع قائمة العملاء من متجر Shopify.
**المعاملات:**
- `customerIds` (string, اختياري): قائمة معرّفات العملاء مفصولة بفواصل
- `limit` (string, اختياري): الحد الأقصى لعدد العملاء (الافتراضي: 250)
</Accordion>
<Accordion title="shopify/create_customer">
**الوصف:** إنشاء عميل جديد في متجر Shopify.
**المعاملات:**
- `firstName` (string, مطلوب): الاسم الأول للعميل
- `lastName` (string, مطلوب): اسم العائلة للعميل
- `email` (string, مطلوب): عنوان البريد الإلكتروني للعميل
- `phone` (string, اختياري): رقم الهاتف
- `tags` (string, اختياري): الوسوم كمصفوفة أو قائمة مفصولة بفواصل
</Accordion>
<Accordion title="shopify/update_customer">
**الوصف:** تحديث عميل موجود في متجر Shopify.
**المعاملات:**
- `customerId` (string, مطلوب): معرّف العميل المراد تحديثه
- `firstName` (string, اختياري): الاسم الأول
- `lastName` (string, اختياري): اسم العائلة
- `email` (string, اختياري): عنوان البريد الإلكتروني
</Accordion>
</AccordionGroup>
### **إدارة الطلبات**
<AccordionGroup>
<Accordion title="shopify/get_orders">
**الوصف:** استرجاع قائمة الطلبات من متجر Shopify.
**المعاملات:**
- `orderIds` (string, اختياري): قائمة معرّفات الطلبات مفصولة بفواصل
- `limit` (string, اختياري): الحد الأقصى لعدد الطلبات (الافتراضي: 250)
</Accordion>
<Accordion title="shopify/create_order">
**الوصف:** إنشاء طلب جديد في متجر Shopify.
**المعاملات:**
- `email` (string, مطلوب): عنوان البريد الإلكتروني للعميل
- `lineItems` (object, مطلوب): عناصر سطر الطلب بصيغة JSON
- `fulfillmentStatus` (string, اختياري): حالة التنفيذ - الخيارات: fulfilled, null, partial, restocked
</Accordion>
<Accordion title="shopify/get_abandoned_carts">
**الوصف:** استرجاع سلال التسوق المهجورة من متجر Shopify.
**المعاملات:**
- `status` (string, اختياري): عرض عمليات الدفع بالحالة المحددة - الخيارات: open, closed (الافتراضي: open)
- `limit` (string, اختياري): الحد الأقصى لعدد السلال (الافتراضي: 250)
</Accordion>
</AccordionGroup>
### **إدارة المنتجات**
<AccordionGroup>
<Accordion title="shopify/get_products">
**الوصف:** استرجاع قائمة المنتجات من متجر Shopify.
**المعاملات:**
- `title` (string, اختياري): تصفية حسب عنوان المنتج
- `status` (string, اختياري): تصفية حسب الحالة - الخيارات: active, archived, draft
- `limit` (string, اختياري): الحد الأقصى لعدد المنتجات (الافتراضي: 250)
</Accordion>
<Accordion title="shopify/create_product">
**الوصف:** إنشاء منتج جديد في متجر Shopify.
**المعاملات:**
- `title` (string, مطلوب): عنوان المنتج
- `productType` (string, مطلوب): نوع/فئة المنتج
- `vendor` (string, مطلوب): مورد المنتج
- `productDescription` (string, اختياري): وصف المنتج
- `price` (string, اختياري): سعر المنتج
</Accordion>
<Accordion title="shopify/update_product">
**الوصف:** تحديث منتج موجود في متجر Shopify.
**المعاملات:**
- `productId` (string, مطلوب): معرّف المنتج المراد تحديثه
- `title` (string, اختياري): عنوان المنتج
- `price` (string, اختياري): سعر المنتج
</Accordion>
</AccordionGroup>
## أمثلة الاستخدام
### إعداد Agent أساسي لـ Shopify
```python
from crewai import Agent, Task, Crew
from crewai import Agent, Task, Crew
# Create an agent with Shopify capabilities
shopify_agent = Agent(
role="E-commerce Manager",
goal="Manage online store operations and customer relationships efficiently",
backstory="An AI assistant specialized in e-commerce operations and online store management.",
apps=['shopify'] # All Shopify actions will be available
)
# Task to create a new customer
create_customer_task = Task(
description="Create a new VIP customer Jane Smith with email jane.smith@example.com and phone +1-555-0123",
agent=shopify_agent,
expected_output="Customer created successfully with customer ID"
)
# Run the task
crew = Crew(
agents=[shopify_agent],
tasks=[create_customer_task]
)
crew.kickoff()
```
### الحصول على المساعدة
<Card title="تحتاج مساعدة؟" icon="headset" href="mailto:support@crewai.com">
تواصل مع فريق الدعم للحصول على المساعدة في إعداد تكامل Shopify أو
استكشاف الأخطاء وإصلاحها.
</Card>

View File

@@ -1,170 +0,0 @@
---
title: تكامل Slack
description: "التواصل الجماعي والتعاون مع تكامل Slack لـ CrewAI."
icon: "slack"
mode: "wide"
---
## نظرة عامة
مكّن وكلاءك من إدارة التواصل الجماعي عبر Slack. أرسل الرسائل، وابحث في المحادثات، وأدر القنوات، ونسّق أنشطة الفريق لتبسيط سير عمل التعاون باستخدام الأتمتة المدعومة بالذكاء الاصطناعي.
## المتطلبات الأساسية
قبل استخدام تكامل Slack، تأكد من توفر ما يلي:
- حساب [CrewAI AMP](https://app.crewai.com) مع اشتراك فعّال
- مساحة عمل Slack بالصلاحيات المناسبة
- ربط مساحة عمل Slack الخاصة بك عبر [صفحة التكاملات](https://app.crewai.com/integrations)
## إعداد تكامل Slack
### 1. ربط مساحة عمل Slack الخاصة بك
1. انتقل إلى [تكاملات CrewAI AMP](https://app.crewai.com/crewai_plus/connectors)
2. ابحث عن **Slack** في قسم تكاملات المصادقة
3. انقر على **Connect** وأكمل عملية OAuth
4. امنح الصلاحيات اللازمة للتواصل الجماعي
5. انسخ رمز المؤسسة من [إعدادات التكامل](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. تثبيت الحزمة المطلوبة
```bash
uv add crewai-tools
```
### 3. إعداد متغير البيئة
<Note>
لاستخدام التكاملات مع `Agent(apps=[])`, يجب تعيين متغير البيئة
`CREWAI_PLATFORM_INTEGRATION_TOKEN` برمز المؤسسة الخاص بك.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
أو أضفه إلى ملف `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## الأدوات المتاحة
### **إدارة المستخدمين**
<AccordionGroup>
<Accordion title="slack/list_members">
**الوصف:** عرض جميع الأعضاء في قناة Slack.
**المعاملات:**
- لا توجد معاملات مطلوبة
</Accordion>
<Accordion title="slack/get_user_by_email">
**الوصف:** البحث عن مستخدم في مساحة عمل Slack بواسطة عنوان بريده الإلكتروني.
**المعاملات:**
- `email` (string, مطلوب): عنوان البريد الإلكتروني للمستخدم في مساحة العمل
</Accordion>
<Accordion title="slack/get_users_by_name">
**الوصف:** البحث عن المستخدمين بواسطة اسمهم أو اسم العرض.
**المعاملات:**
- `name` (string, مطلوب): الاسم الحقيقي للمستخدم للبحث عنه
- `displayName` (string, مطلوب): اسم عرض المستخدم للبحث عنه
</Accordion>
</AccordionGroup>
### **إدارة القنوات**
<AccordionGroup>
<Accordion title="slack/list_channels">
**الوصف:** عرض جميع القنوات في مساحة عمل Slack.
**المعاملات:**
- لا توجد معاملات مطلوبة
</Accordion>
</AccordionGroup>
### **المراسلة**
<AccordionGroup>
<Accordion title="slack/send_message">
**الوصف:** إرسال رسالة إلى قناة Slack.
**المعاملات:**
- `channel` (string, مطلوب): اسم القناة أو معرّفها
- `message` (string, مطلوب): نص الرسالة المراد إرسالها
- `botName` (string, مطلوب): اسم البوت الذي يرسل هذه الرسالة
- `botIcon` (string, مطلوب): أيقونة البوت - يمكن أن تكون عنوان URL لصورة أو رمز تعبيري
</Accordion>
<Accordion title="slack/send_direct_message">
**الوصف:** إرسال رسالة مباشرة إلى مستخدم محدد في Slack.
**المعاملات:**
- `memberId` (string, مطلوب): معرّف المستخدم المستلم
- `message` (string, مطلوب): نص الرسالة المراد إرسالها
- `botName` (string, مطلوب): اسم البوت الذي يرسل هذه الرسالة
- `botIcon` (string, مطلوب): أيقونة البوت
</Accordion>
</AccordionGroup>
### **البحث والاكتشاف**
<AccordionGroup>
<Accordion title="slack/search_messages">
**الوصف:** البحث عن الرسائل عبر مساحة عمل Slack.
**المعاملات:**
- `query` (string, مطلوب): استعلام بحث باستخدام صيغة بحث Slack للعثور على الرسائل المطابقة
</Accordion>
</AccordionGroup>
## أمثلة الاستخدام
### إعداد Agent أساسي لـ Slack
```python
from crewai import Agent, Task, Crew
# Create an agent with Slack capabilities
slack_agent = Agent(
role="Team Communication Manager",
goal="Facilitate team communication and coordinate collaboration efficiently",
backstory="An AI assistant specialized in team communication and workspace coordination.",
apps=['slack'] # All Slack actions will be available
)
# Task to send project updates
update_task = Task(
description="Send a project status update to the #general channel with current progress",
agent=slack_agent,
expected_output="Project update message sent successfully to team channel"
)
# Run the task
crew = Crew(
agents=[slack_agent],
tasks=[update_task]
)
crew.kickoff()
```
## التواصل مع الدعم
<Card title="تحتاج مساعدة؟" icon="headset" href="mailto:support@crewai.com">
تواصل مع فريق الدعم للحصول على المساعدة في إعداد تكامل Slack أو
استكشاف الأخطاء وإصلاحها.
</Card>

View File

@@ -1,202 +0,0 @@
---
title: تكامل Stripe
description: "معالجة المدفوعات وإدارة الاشتراكات مع تكامل Stripe لـ CrewAI."
icon: "stripe"
mode: "wide"
---
## نظرة عامة
مكّن وكلاءك من إدارة المدفوعات والاشتراكات وفواتير العملاء عبر Stripe. تعامل مع بيانات العملاء، ومعالجة الاشتراكات، وإدارة المنتجات، وتتبع المعاملات المالية لتبسيط سير عمل المدفوعات باستخدام الأتمتة المدعومة بالذكاء الاصطناعي.
## المتطلبات الأساسية
قبل استخدام تكامل Stripe، تأكد من توفر ما يلي:
- حساب [CrewAI AMP](https://app.crewai.com) مع اشتراك فعّال
- حساب Stripe بصلاحيات API المناسبة
- ربط حساب Stripe الخاص بك عبر [صفحة التكاملات](https://app.crewai.com/integrations)
## إعداد تكامل Stripe
### 1. ربط حساب Stripe الخاص بك
1. انتقل إلى [تكاملات CrewAI AMP](https://app.crewai.com/crewai_plus/connectors)
2. ابحث عن **Stripe** في قسم تكاملات المصادقة
3. انقر على **Connect** وأكمل عملية OAuth
4. امنح الصلاحيات اللازمة لمعالجة المدفوعات
5. انسخ رمز المؤسسة من [إعدادات التكامل](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. تثبيت الحزمة المطلوبة
```bash
uv add crewai-tools
```
### 3. إعداد متغير البيئة
<Note>
لاستخدام التكاملات مع `Agent(apps=[])`, يجب تعيين متغير البيئة
`CREWAI_PLATFORM_INTEGRATION_TOKEN` برمز المؤسسة الخاص بك.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
أو أضفه إلى ملف `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## الأدوات المتاحة
### **إدارة العملاء**
<AccordionGroup>
<Accordion title="stripe/create_customer">
**الوصف:** إنشاء عميل جديد في حساب Stripe.
**المعاملات:**
- `emailCreateCustomer` (string, مطلوب): عنوان البريد الإلكتروني للعميل
- `name` (string, اختياري): الاسم الكامل للعميل
- `description` (string, اختياري): وصف العميل للمرجع الداخلي
</Accordion>
<Accordion title="stripe/get_customer_by_id">
**الوصف:** استرجاع عميل محدد بواسطة معرّف عميل Stripe.
**المعاملات:**
- `idGetCustomer` (string, مطلوب): معرّف عميل Stripe المراد استرجاعه
</Accordion>
<Accordion title="stripe/get_customers">
**الوصف:** استرجاع قائمة العملاء مع تصفية اختيارية.
**المعاملات:**
- `emailGetCustomers` (string, اختياري): تصفية العملاء حسب البريد الإلكتروني
- `limitGetCustomers` (string, اختياري): الحد الأقصى لعدد العملاء (الافتراضي: 10)
</Accordion>
<Accordion title="stripe/update_customer">
**الوصف:** تحديث معلومات عميل موجود.
**المعاملات:**
- `customerId` (string, مطلوب): معرّف العميل المراد تحديثه
- `emailUpdateCustomer` (string, اختياري): عنوان البريد الإلكتروني المحدّث
- `name` (string, اختياري): اسم العميل المحدّث
</Accordion>
</AccordionGroup>
### **إدارة الاشتراكات**
<AccordionGroup>
<Accordion title="stripe/create_subscription">
**الوصف:** إنشاء اشتراك جديد لعميل.
**المعاملات:**
- `customerIdCreateSubscription` (string, مطلوب): معرّف العميل الذي سيُنشأ له الاشتراك
- `plan` (string, مطلوب): معرّف خطة الاشتراك
</Accordion>
<Accordion title="stripe/get_subscriptions">
**الوصف:** استرجاع الاشتراكات مع تصفية اختيارية.
**المعاملات:**
- `customerIdGetSubscriptions` (string, اختياري): تصفية الاشتراكات حسب معرّف العميل
- `subscriptionStatus` (string, اختياري): تصفية حسب حالة الاشتراك - الخيارات: incomplete, trialing, active, past_due, canceled, unpaid
</Accordion>
</AccordionGroup>
### **إدارة المنتجات**
<AccordionGroup>
<Accordion title="stripe/create_product">
**الوصف:** إنشاء منتج جديد في كتالوج Stripe.
**المعاملات:**
- `productName` (string, مطلوب): اسم المنتج
- `description` (string, اختياري): وصف المنتج
</Accordion>
<Accordion title="stripe/get_products">
**الوصف:** استرجاع قائمة المنتجات مع تصفية اختيارية.
**المعاملات:**
- `limitGetProducts` (string, اختياري): الحد الأقصى لعدد المنتجات (الافتراضي: 10)
</Accordion>
</AccordionGroup>
### **العمليات المالية**
<AccordionGroup>
<Accordion title="stripe/get_balance_transactions">
**الوصف:** استرجاع معاملات الرصيد من حساب Stripe.
**المعاملات:**
- `balanceTransactionType` (string, اختياري): تصفية حسب نوع المعاملة - الخيارات: charge, refund, payment, payment_refund
</Accordion>
<Accordion title="stripe/get_plans">
**الوصف:** استرجاع خطط الاشتراك من حساب Stripe.
**المعاملات:**
- `isPlanActive` (boolean, اختياري): تصفية حسب حالة الخطة
</Accordion>
</AccordionGroup>
## أمثلة الاستخدام
### إعداد Agent أساسي لـ Stripe
```python
from crewai import Agent, Task, Crew
from crewai import Agent, Task, Crew
# Create an agent with Stripe capabilities
stripe_agent = Agent(
role="Payment Manager",
goal="Manage customer payments, subscriptions, and billing operations efficiently",
backstory="An AI assistant specialized in payment processing and subscription management.",
apps=['stripe'] # All Stripe actions will be available
)
# Task to create a new customer
create_customer_task = Task(
description="Create a new premium customer John Doe with email john.doe@example.com",
agent=stripe_agent,
expected_output="Customer created successfully with customer ID"
)
# Run the task
crew = Crew(
agents=[stripe_agent],
tasks=[create_customer_task]
)
crew.kickoff()
```
## مرجع حالات الاشتراك
فهم حالات الاشتراك:
- **incomplete** - الاشتراك يتطلب طريقة دفع أو تأكيد الدفع
- **trialing** - الاشتراك في فترة تجريبية
- **active** - الاشتراك نشط وحالي
- **past_due** - فشل الدفع لكن الاشتراك لا يزال نشطاً
- **canceled** - تم إلغاء الاشتراك
- **unpaid** - فشل الدفع والاشتراك لم يعد نشطاً
يمكّن هذا التكامل أتمتة شاملة لإدارة المدفوعات والاشتراكات، مما يسمح لوكلاء الذكاء الاصطناعي بالتعامل مع عمليات الفوترة بسلاسة ضمن نظام Stripe البيئي.

View File

@@ -1,262 +0,0 @@
---
title: تكامل Zendesk
description: "دعم العملاء وإدارة مكتب المساعدة مع تكامل Zendesk لـ CrewAI."
icon: "headset"
mode: "wide"
---
## نظرة عامة
مكّن وكلاءك من إدارة عمليات دعم العملاء عبر Zendesk. أنشئ التذاكر وحدّثها، وأدر المستخدمين، وتتبع مقاييس الدعم، وبسّط سير عمل خدمة العملاء باستخدام الأتمتة المدعومة بالذكاء الاصطناعي.
## المتطلبات الأساسية
قبل استخدام تكامل Zendesk، تأكد من توفر ما يلي:
- حساب [CrewAI AMP](https://app.crewai.com) مع اشتراك فعّال
- حساب Zendesk بصلاحيات API المناسبة
- ربط حساب Zendesk الخاص بك عبر [صفحة التكاملات](https://app.crewai.com/integrations)
## إعداد تكامل Zendesk
### 1. ربط حساب Zendesk الخاص بك
1. انتقل إلى [تكاملات CrewAI AMP](https://app.crewai.com/crewai_plus/connectors)
2. ابحث عن **Zendesk** في قسم تكاملات المصادقة
3. انقر على **Connect** وأكمل عملية OAuth
4. امنح الصلاحيات اللازمة لإدارة التذاكر والمستخدمين
5. انسخ رمز المؤسسة من [إعدادات التكامل](https://app.crewai.com/crewai_plus/settings/integrations)
### 2. تثبيت الحزمة المطلوبة
```bash
uv add crewai-tools
```
### 3. إعداد متغير البيئة
<Note>
لاستخدام التكاملات مع `Agent(apps=[])`, يجب تعيين متغير البيئة
`CREWAI_PLATFORM_INTEGRATION_TOKEN` برمز المؤسسة الخاص بك.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
أو أضفه إلى ملف `.env`:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## الأدوات المتاحة
### **إدارة التذاكر**
<AccordionGroup>
<Accordion title="zendesk/create_ticket">
**الوصف:** إنشاء تذكرة دعم جديدة في Zendesk.
**المعاملات:**
- `ticketSubject` (string, مطلوب): سطر موضوع التذكرة
- `ticketDescription` (string, مطلوب): أول تعليق يظهر على التذكرة
- `requesterName` (string, مطلوب): اسم المستخدم الذي يطلب الدعم
- `requesterEmail` (string, مطلوب): بريد المستخدم الذي يطلب الدعم
- `ticketType` (string, اختياري): نوع التذكرة - الخيارات: problem, incident, question, task
- `ticketPriority` (string, اختياري): مستوى الأولوية - الخيارات: urgent, high, normal, low
- `ticketStatus` (string, اختياري): حالة التذكرة - الخيارات: new, open, pending, hold, solved, closed
</Accordion>
<Accordion title="zendesk/update_ticket">
**الوصف:** تحديث تذكرة دعم موجودة في Zendesk.
**المعاملات:**
- `ticketId` (string, مطلوب): معرّف التذكرة المراد تحديثها
- `requesterName` (string, مطلوب): اسم المستخدم الذي طلب هذه التذكرة
- `requesterEmail` (string, مطلوب): بريد المستخدم الذي طلب هذه التذكرة
- `ticketSubject` (string, اختياري): موضوع التذكرة المحدّث
- `ticketPriority` (string, اختياري): الأولوية المحدّثة
- `ticketStatus` (string, اختياري): الحالة المحدّثة
</Accordion>
<Accordion title="zendesk/get_ticket_by_id">
**الوصف:** استرجاع تذكرة محددة بواسطة معرّفها.
**المعاملات:**
- `ticketId` (string, مطلوب): معرّف التذكرة المراد استرجاعها
</Accordion>
<Accordion title="zendesk/add_comment_to_ticket">
**الوصف:** إضافة تعليق أو ملاحظة داخلية إلى تذكرة موجودة.
**المعاملات:**
- `ticketId` (string, مطلوب): معرّف التذكرة لإضافة التعليق إليها
- `commentBody` (string, مطلوب): رسالة التعليق
- `isInternalNote` (boolean, اختياري): عيّن إلى true للملاحظات الداخلية بدلاً من الردود العامة
</Accordion>
<Accordion title="zendesk/search_tickets">
**الوصف:** البحث عن التذاكر باستخدام فلاتر ومعايير مختلفة.
**المعاملات:**
- `ticketSubject` (string, اختياري): تصفية حسب النص في موضوع التذكرة
- `ticketStatus` (string, اختياري): تصفية حسب الحالة
- `ticketPriority` (string, اختياري): تصفية حسب الأولوية
- `sort_by` (string, اختياري): حقل الفرز - الخيارات: created_at, updated_at, priority, status
- `sort_order` (string, اختياري): اتجاه الفرز - الخيارات: asc, desc
</Accordion>
</AccordionGroup>
### **إدارة المستخدمين**
<AccordionGroup>
<Accordion title="zendesk/create_user">
**الوصف:** إنشاء مستخدم جديد في Zendesk.
**المعاملات:**
- `name` (string, مطلوب): الاسم الكامل للمستخدم
- `email` (string, اختياري): عنوان البريد الإلكتروني
- `phone` (string, اختياري): رقم الهاتف
- `role` (string, اختياري): دور المستخدم - الخيارات: admin, agent, end-user
</Accordion>
<Accordion title="zendesk/update_user">
**الوصف:** تحديث معلومات مستخدم موجود.
**المعاملات:**
- `userId` (string, مطلوب): معرّف المستخدم المراد تحديثه
- `name` (string, اختياري): اسم المستخدم المحدّث
- `email` (string, اختياري): البريد الإلكتروني المحدّث
- `role` (string, اختياري): الدور المحدّث
</Accordion>
<Accordion title="zendesk/get_user_by_id">
**الوصف:** استرجاع مستخدم محدد بواسطة معرّفه.
**المعاملات:**
- `userId` (string, مطلوب): معرّف المستخدم المراد استرجاعه
</Accordion>
<Accordion title="zendesk/search_users">
**الوصف:** البحث عن المستخدمين باستخدام معايير مختلفة.
**المعاملات:**
- `name` (string, اختياري): تصفية حسب اسم المستخدم
- `email` (string, اختياري): تصفية حسب البريد الإلكتروني
- `role` (string, اختياري): تصفية حسب الدور
</Accordion>
</AccordionGroup>
### **أدوات إدارية**
<AccordionGroup>
<Accordion title="zendesk/get_ticket_fields">
**الوصف:** استرجاع جميع الحقول القياسية والمخصصة المتاحة للتذاكر.
**المعاملات:**
- `paginationParameters` (object, اختياري): إعدادات الترقيم
</Accordion>
<Accordion title="zendesk/get_ticket_audits">
**الوصف:** الحصول على سجلات التدقيق (السجل للقراءة فقط) للتذاكر.
**المعاملات:**
- `ticketId` (string, اختياري): الحصول على سجلات التدقيق لتذكرة محددة
</Accordion>
</AccordionGroup>
## مستويات أولوية التذاكر
فهم مستويات الأولوية:
- **urgent** - مشاكل حرجة تتطلب اهتماماً فورياً
- **high** - مشاكل مهمة يجب معالجتها بسرعة
- **normal** - أولوية قياسية لمعظم التذاكر
- **low** - مشاكل ثانوية يمكن معالجتها عند الإمكان
## سير عمل حالة التذكرة
تقدم حالة التذكرة القياسي:
- **new** - أُنشئت حديثاً، لم تُعيّن بعد
- **open** - يتم العمل عليها بنشاط
- **pending** - في انتظار رد العميل أو إجراء خارجي
- **hold** - متوقفة مؤقتاً
- **solved** - تم حل المشكلة، في انتظار تأكيد العميل
- **closed** - اكتملت التذكرة وأُغلقت
## أمثلة الاستخدام
### إعداد Agent أساسي لـ Zendesk
```python
from crewai import Agent, Task, Crew
from crewai import Agent, Task, Crew
# Create an agent with Zendesk capabilities
zendesk_agent = Agent(
role="Support Manager",
goal="Manage customer support tickets and provide excellent customer service",
backstory="An AI assistant specialized in customer support operations and ticket management.",
apps=['zendesk'] # All Zendesk actions will be available
)
# Task to create a new support ticket
create_ticket_task = Task(
description="Create a high-priority support ticket for John Smith who is unable to access his account after password reset",
agent=zendesk_agent,
expected_output="Support ticket created successfully with ticket ID"
)
# Run the task
crew = Crew(
agents=[zendesk_agent],
tasks=[create_ticket_task]
)
crew.kickoff()
```
### إدارة التذاكر المتقدمة
```python
from crewai import Agent, Task, Crew
ticket_manager = Agent(
role="Ticket Manager",
goal="Manage support ticket workflows and ensure timely resolution",
backstory="An AI assistant that specializes in support ticket triage and workflow optimization.",
apps=['zendesk']
)
# Task to manage ticket lifecycle
ticket_workflow = Task(
description="""
1. Create a new support ticket for account access issues
2. Add internal notes with troubleshooting steps
3. Update ticket priority based on customer tier
4. Add resolution comments and close the ticket
""",
agent=ticket_manager,
expected_output="Complete ticket lifecycle managed from creation to resolution"
)
crew = Crew(
agents=[ticket_manager],
tasks=[ticket_workflow]
)
crew.kickoff()
```

View File

@@ -1,99 +0,0 @@
---
title: "CrewAI AMP"
description: "نشر ومراقبة وتوسيع سير عمل وكلاء الذكاء الاصطناعي"
icon: "globe"
mode: "wide"
---
## مقدمة
توفر منصة CrewAI AMP (منصة إدارة الوكلاء) بيئة لنشر ومراقبة وتوسيع أطقمك ووكلائك في بيئة إنتاجية.
<Frame>
<img
src="/images/enterprise/crewai-enterprise-dashboard.png"
alt="لوحة تحكم CrewAI AMP"
/>
</Frame>
تعمل منصة CrewAI AMP على توسيع قوة إطار العمل مفتوح المصدر بميزات مصممة لعمليات النشر الإنتاجية والتعاون وقابلية التوسع. انشر أطقمك على بنية تحتية مُدارة وراقب تنفيذها في الوقت الفعلي.
## الميزات الرئيسية
<CardGroup cols={2}>
<Card title="نشر الأطقم" icon="rocket">
انشر أطقمك على بنية تحتية مُدارة بنقرات قليلة
</Card>
<Card title="الوصول عبر API" icon="code">
الوصول إلى أطقمك المنشورة عبر REST API للتكامل مع الأنظمة الحالية
</Card>
<Card title="المراقبة" icon="chart-line">
راقب أطقمك مع تتبع تفصيلي للتنفيذ والسجلات
</Card>
<Card title="مستودع الأدوات" icon="toolbox">
انشر وثبّت الأدوات لتعزيز قدرات أطقمك
</Card>
<Card title="بث Webhook" icon="webhook">
بث الأحداث والتحديثات في الوقت الفعلي إلى أنظمتك
</Card>
<Card title="استوديو الأطقم" icon="paintbrush">
أنشئ وخصص الأطقم باستخدام واجهة بدون كود/منخفضة الكود
</Card>
</CardGroup>
## خيارات النشر
<CardGroup cols={3}>
<Card title="تكامل GitHub" icon="github">
اتصل مباشرة بمستودعات GitHub الخاصة بك لنشر الكود
</Card>
<Card title="استوديو الأطقم" icon="palette">
انشر الأطقم المنشأة عبر واجهة استوديو الأطقم بدون كود
</Card>
<Card title="النشر عبر CLI" icon="terminal">
استخدم واجهة سطر أوامر CrewAI لسير عمل نشر أكثر تقدمًا
</Card>
</CardGroup>
## البدء
<Steps>
<Step title="إنشاء حساب">
أنشئ حسابك على [app.crewai.com](https://app.crewai.com)
<Card title="التسجيل" icon="user" href="https://app.crewai.com/signup">
التسجيل
</Card>
</Step>
<Step title="بناء طاقمك الأول">
استخدم الكود أو استوديو الأطقم لبناء طاقمك
<Card
title="بناء طاقم"
icon="paintbrush"
href="/ar/enterprise/guides/build-crew"
>
بناء طاقم
</Card>
</Step>
<Step title="نشر طاقمك">
انشر طاقمك على منصة Enterprise
<Card
title="نشر طاقم"
icon="rocket"
href="/ar/enterprise/guides/deploy-to-amp"
>
نشر طاقم
</Card>
</Step>
<Step title="الوصول إلى طاقمك">
تكامل مع طاقمك عبر نقاط نهاية API المُنشأة
<Card
title="الوصول عبر API"
icon="code"
href="/ar/enterprise/guides/kickoff-crew"
>
استخدام API الطاقم
</Card>
</Step>
</Steps>
للحصول على تعليمات مفصلة، اطلع على [دليل النشر](/ar/enterprise/guides/deploy-to-amp) أو انقر على الزر أدناه للبدء.

View File

@@ -1,152 +0,0 @@
---
title: الأسئلة الشائعة
description: "الأسئلة المتكررة حول CrewAI AMP"
icon: "circle-question"
mode: "wide"
---
<AccordionGroup>
<Accordion title="كيف يتم التعامل مع تنفيذ المهام في العملية الهرمية؟">
في العملية الهرمية، يتم إنشاء وكيل مدير تلقائيًا ينسق سير العمل، ويفوض المهام ويتحقق من النتائج لتنفيذ مبسط وفعال. يستخدم وكيل المدير الأدوات لتسهيل تفويض المهام وتنفيذها بواسطة الوكلاء تحت إشراف المدير. يُعد نموذج اللغة الخاص بالمدير (LLM) أساسيًا للعملية الهرمية ويجب إعداده بشكل صحيح لضمان العمل السليم.
</Accordion>
<Accordion title="أين يمكنني الحصول على أحدث توثيق لـ CrewAI؟">
يتوفر أحدث توثيق لـ CrewAI على موقع التوثيق الرسمي: https://docs.crewai.com/
<Card href="https://docs.crewai.com/" icon="books">توثيق CrewAI</Card>
</Accordion>
<Accordion title="ما الاختلافات الرئيسية بين العمليات الهرمية والتسلسلية في CrewAI؟">
#### العملية الهرمية:
- يتم تفويض المهام وتنفيذها بناءً على سلسلة قيادة منظمة
- يجب تحديد نموذج لغة المدير (`manager_llm`) لوكيل المدير
- يشرف وكيل المدير على تنفيذ المهام والتخطيط والتفويض والتحقق
- لا يتم تعيين المهام مسبقًا؛ يقوم المدير بتخصيص المهام للوكلاء بناءً على قدراتهم
#### العملية التسلسلية:
- يتم تنفيذ المهام واحدة تلو الأخرى، مما يضمن إكمال المهام بتقدم منظم
- يُستخدم مخرج مهمة واحدة كسياق للمهمة التالية
- يتبع تنفيذ المهام الترتيب المحدد مسبقًا في قائمة المهام
#### أي عملية أفضل للمشاريع المعقدة؟
العملية الهرمية أنسب للمشاريع المعقدة لأنها تسمح بـ:
- **تخصيص وتفويض ديناميكي للمهام**: يمكن لوكيل المدير تعيين المهام بناءً على قدرات الوكلاء
- **التحقق والإشراف المنظم**: يراجع وكيل المدير مخرجات المهام ويضمن إكمالها
- **إدارة المهام المعقدة**: تحكم دقيق في توفر الأدوات على مستوى الوكيل
</Accordion>
<Accordion title="ما فوائد استخدام الذاكرة في إطار عمل CrewAI؟">
- **التعلم التكيفي**: تصبح الأطقم أكثر كفاءة بمرور الوقت، حيث تتكيف مع المعلومات الجديدة وتحسن نهجها في المهام
- **التخصيص المحسن**: تمكّن الذاكرة الوكلاء من تذكر تفضيلات المستخدم والتفاعلات السابقة، مما يؤدي إلى تجارب مخصصة
- **تحسين حل المشكلات**: يساعد الوصول إلى مخزن ذاكرة غني الوكلاء في اتخاذ قرارات أكثر استنارة، بالاعتماد على الدروس المستفادة والرؤى السياقية
</Accordion>
<Accordion title="ما الغرض من تعيين حد أقصى لعدد الطلبات في الدقيقة (RPM) للوكيل؟">
يمنع تعيين حد أقصى لعدد الطلبات في الدقيقة للوكيل من إجراء عدد كبير جدًا من الطلبات إلى الخدمات الخارجية، مما يساعد في تجنب حدود المعدل وتحسين الأداء.
</Accordion>
<Accordion title="ما الدور الذي يلعبه المدخل البشري في تنفيذ المهام داخل طاقم CrewAI؟">
يتيح المدخل البشري للوكلاء طلب معلومات إضافية أو توضيحات عند الحاجة. هذه الميزة ضرورية في عمليات صنع القرار المعقدة أو عندما يحتاج الوكلاء إلى مزيد من التفاصيل لإكمال مهمة بفعالية.
لدمج المدخل البشري في تنفيذ الوكيل، عيّن علامة `human_input` في تعريف المهمة. عند التفعيل، يطلب الوكيل من المستخدم إدخالًا قبل تقديم إجابته النهائية. يمكن أن يوفر هذا الإدخال سياقًا إضافيًا أو يوضح الغموض أو يتحقق من مخرجات الوكيل.
للحصول على إرشادات تنفيذ مفصلة، راجع [دليل الإنسان في الحلقة](/ar/enterprise/guides/human-in-the-loop).
</Accordion>
<Accordion title="ما خيارات التخصيص المتقدمة المتاحة لتكييف وتعزيز سلوك وقدرات الوكيل في CrewAI؟">
يوفر CrewAI مجموعة من خيارات التخصيص المتقدمة:
- **تخصيص نموذج اللغة**: يمكن تخصيص الوكلاء بنماذج لغوية محددة (`llm`) ونماذج لغوية لاستدعاء الدوال (`function_calling_llm`)
- **إعدادات الأداء والتصحيح**: ضبط أداء الوكيل ومراقبة عملياته
- **الوضع المفصل**: يتيح تسجيلًا مفصلًا لإجراءات الوكيل، مفيد للتصحيح والتحسين
- **حد RPM**: يحدد العدد الأقصى للطلبات في الدقيقة (`max_rpm`)
- **الحد الأقصى للتكرارات**: تسمح خاصية `max_iter` للمستخدمين بتحديد العدد الأقصى للتكرارات التي يمكن للوكيل تنفيذها لمهمة واحدة
- **التفويض والاستقلالية**: التحكم في قدرة الوكيل على التفويض أو طرح الأسئلة عبر خاصية `allow_delegation` (الافتراضي: True)
- **دمج المدخل البشري**: يمكن للوكلاء طلب معلومات إضافية أو توضيحات عند الحاجة
</Accordion>
<Accordion title="في أي سيناريوهات يكون المدخل البشري مفيدًا بشكل خاص في تنفيذ الوكيل؟">
يكون المدخل البشري مفيدًا بشكل خاص عندما:
- **يحتاج الوكلاء إلى معلومات إضافية أو توضيحات**: عندما يواجه الوكلاء غموضًا أو بيانات غير مكتملة
- **يحتاج الوكلاء إلى اتخاذ قرارات معقدة أو حساسة**: يمكن للمدخل البشري المساعدة في صنع القرارات الأخلاقية أو الدقيقة
- **الإشراف والتحقق من مخرجات الوكيل**: يمكن للمدخل البشري المساعدة في التحقق من النتائج ومنع الأخطاء
- **تخصيص سلوك الوكيل**: يمكن للمدخل البشري توفير ملاحظات لتحسين استجابات الوكيل بمرور الوقت
- **تحديد وحل الأخطاء أو القيود**: يساعد المدخل البشري في معالجة فجوات قدرات الوكيل
</Accordion>
<Accordion title="ما أنواع الذاكرة المختلفة المتاحة في CrewAI؟">
أنواع الذاكرة المختلفة المتاحة في CrewAI هي:
- **الذاكرة قصيرة المدى**: تخزين مؤقت للسياق الفوري
- **الذاكرة طويلة المدى**: تخزين دائم للأنماط والمعلومات المكتسبة
- **ذاكرة الكيانات**: تخزين مركز على كيانات محددة وخصائصها
- **الذاكرة السياقية**: ذاكرة تحافظ على السياق عبر التفاعلات
تعرف على المزيد حول أنواع الذاكرة المختلفة:
<Card href="https://docs.crewai.com/concepts/memory" icon="brain">ذاكرة CrewAI</Card>
</Accordion>
<Accordion title="كيف أستخدم Output Pydantic في مهمة؟">
لاستخدام Output Pydantic في مهمة، تحتاج إلى تعريف المخرج المتوقع للمهمة كنموذج Pydantic. إليك مثال سريع:
<Steps>
<Step title="تعريف نموذج Pydantic">
```python
from pydantic import BaseModel
class User(BaseModel):
name: str
age: int
```
</Step>
<Step title="إنشاء مهمة مع Output Pydantic">
```python
from crewai import Task, Crew, Agent
from my_models import User
task = Task(
description="Create a user with the provided name and age",
expected_output=User, # This is the Pydantic model
agent=agent,
tools=[tool1, tool2]
)
```
</Step>
<Step title="تعيين خاصية output_pydantic في الوكيل">
```python
from crewai import Agent
from my_models import User
agent = Agent(
role='User Creator',
goal='Create users',
backstory='I am skilled in creating user accounts',
tools=[tool1, tool2],
output_pydantic=User
)
```
</Step>
</Steps>
إليك درسًا تعليميًا حول كيفية الحصول على مخرجات منظمة بشكل متسق من وكلائك:
<iframe
className="w-full aspect-video rounded-xl"
src="https://www.youtube.com/embed/dNpKQk5uxHw"
title="المخرجات المنظمة في CrewAI"
frameBorder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowFullScreen
></iframe>
</Accordion>
<Accordion title="كيف يمكنني إنشاء أدوات مخصصة لوكلاء CrewAI؟">
يمكنك إنشاء أدوات مخصصة عن طريق إنشاء فئة فرعية من فئة `BaseTool` المقدمة من CrewAI أو باستخدام مُزخرف الأداة (tool decorator). ينطوي إنشاء الفئة الفرعية على تعريف فئة جديدة ترث من `BaseTool`، مع تحديد الاسم والوصف وطريقة `_run` للمنطق التشغيلي. يتيح لك مُزخرف الأداة إنشاء كائن `Tool` مباشرة مع الخصائص المطلوبة والمنطق الوظيفي.
<Card href="/ar/learn/create-custom-tools" icon="code">دليل أدوات CrewAI</Card>
</Accordion>
<Accordion title="كيف يمكنك التحكم في العدد الأقصى للطلبات في الدقيقة التي يمكن للطاقم بأكمله تنفيذها؟">
تحدد خاصية `max_rpm` العدد الأقصى للطلبات في الدقيقة التي يمكن للطاقم تنفيذها لتجنب حدود المعدل، وستتجاوز إعدادات `max_rpm` الفردية للوكلاء إذا قمت بتعيينها.
</Accordion>
</AccordionGroup>

View File

@@ -1,217 +0,0 @@
---
title: "البناء باستخدام الذكاء الاصطناعي"
description: "كل ما يحتاجه وكلاء البرمجة بالذكاء الاصطناعي للبناء والنشر والتوسع مع CrewAI — المهارات، وثائق مقروءة آلياً، النشر، وميزات المؤسسات."
icon: robot
mode: "wide"
---
# البناء باستخدام الذكاء الاصطناعي
CrewAI مُصمَّم أصلاً للعمل مع الذكاء الاصطناعي. تجمع هذه الصفحة ما يحتاجه وكيل البرمجة بالذكاء الاصطناعي للبناء مع CrewAI — سواءً كان Claude Code أو Codex أو Cursor أو Gemini CLI أو أي مساعد آخر يساعد المطوّر على إيصال الـ crews والـ flows.
### وكلاء البرمجة المدعومون
<CardGroup cols={5}>
<Card title="Claude Code" icon="message-bot" color="#D97706" />
<Card title="Cursor" icon="arrow-pointer" color="#3B82F6" />
<Card title="Codex" icon="terminal" color="#10B981" />
<Card title="Windsurf" icon="wind" color="#06B6D4" />
<Card title="Gemini CLI" icon="sparkles" color="#8B5CF6" />
</CardGroup>
<Note>
صُممت هذه الصفحة للبشر وللمساعدين الذكيين على حدٍّ سواء. إذا كنت وكيل برمجة، ابدأ بـ **Skills** للحصول على سياق CrewAI، ثم استخدم **llms.txt** للوصول الكامل إلى الوثائق.
</Note>
---
## 1. Skills — علِّم وكيلك CrewAI
**Skills** حزم تعليمات تمنح وكلاء البرمجة معرفة عميقة بـ CrewAI — كيفية إنشاء هيكل Flows، وضبط Crews، استخدام الأدوات، واتباع اتفاقيات الإطار.
<Tabs>
<Tab title="Claude Code (سوق الإضافات)">
<img src="https://cdn.simpleicons.org/anthropic/D97706" alt="Anthropic" width="28" style={{display: "inline", verticalAlign: "middle", marginRight: "8px"}} />
مهارات CrewAI متاحة في **سوق إضافات Claude Code** — نفس قناة التوزيع التي تستخدمها شركات رائدة في مجال الذكاء الاصطناعي:
```shell
/plugin marketplace add crewAIInc/skills
/plugin install crewai-skills@crewai-plugins
/reload-plugins
```
تُفعَّل أربع مهارات تلقائياً عند طرح أسئلة متعلقة بـ CrewAI:
| المهارة | متى تُستخدم |
|---------|-------------|
| `getting-started` | مشاريع جديدة، الاختيار بين `LLM.call()` / `Agent` / `Crew` / `Flow`، ربط `crew.py` / `main.py` |
| `design-agent` | ضبط الوكلاء — الدور، الهدف، الخلفية، الأدوات، نماذج اللغة، الذاكرة، الحدود الآمنة |
| `design-task` | وصف المهام، التبعيات، المخرجات المنظمة (`output_pydantic`، `output_json`)، المراجعة البشرية |
| `ask-docs` | الاستعلام من [خادم CrewAI docs MCP](https://docs.crewai.com/mcp) للحصول على تفاصيل واجهة البرمجة الحالية |
</Tab>
<Tab title="npx (أي وكيل)">
يعمل مع Claude Code أو Codex أو Cursor أو Gemini CLI أو أي وكيل برمجة:
```shell
npx skills add crewaiinc/skills
```
يُجلب من [سجل skills.sh](https://skills.sh/crewaiinc/skills).
</Tab>
</Tabs>
<Steps>
<Step title="ثبِّت حزمة المهارات الرسمية">
استخدم إحدى الطريقتين أعلاه — سوق إضافات Claude Code أو `npx skills add`. كلاهما يثبّت الحزمة الرسمية [crewAIInc/skills](https://github.com/crewAIInc/skills).
</Step>
<Step title="يحصل وكيلك فوراً على خبرة CrewAI">
تعلّم الحزمة وكيلك:
- **Flows** — تطبيقات ذات حالة، خطوات، وتشغيل crews
- **Crews والوكلاء** — أنماط YAML أولاً، الأدوار، المهام، التفويض
- **الأدوات والتكاملات** — البحث، واجهات API، خوادم MCP، وأدوات CrewAI الشائعة
- **هيكل المشروع** — هياكل CLI واتفاقيات المستودع
- **أنماط محدثة** — يتماشى مع وثائق CrewAI الحالية وأفضل الممارسات
</Step>
<Step title="ابدأ البناء">
يمكن لوكيلك الآن إنشاء هيكل وبناء مشاريع CrewAI دون أن تعيد شرح الإطار في كل جلسة.
</Step>
</Steps>
<CardGroup cols={2}>
<Card title="مفهوم Skills" icon="bolt" href="/ar/concepts/skills">
كيف تعمل المهارات في وكلاء CrewAI — الحقن، التفعيل، والأنماط.
</Card>
<Card title="صفحة Skills" icon="wand-magic-sparkles" href="/ar/skills">
نظرة على حزمة crewAIInc/skills وما تتضمنه.
</Card>
<Card title="AGENTS.md والأدوات" icon="terminal" href="/ar/guides/coding-tools/agents-md">
إعداد AGENTS.md لـ Claude Code وCodex وCursor وGemini CLI.
</Card>
<Card title="سجل skills.sh" icon="globe" href="https://skills.sh/crewaiinc/skills">
القائمة الرسمية — المهارات، إحصاءات التثبيت، والتدقيق.
</Card>
</CardGroup>
---
## 2. llms.txt — وثائق مقروءة آلياً
ينشر CrewAI ملف `llms.txt` يمنح المساعدين الذكيين وصولاً مباشراً إلى الوثائق الكاملة بصيغة مقروءة آلياً.
```
https://docs.crewai.com/llms.txt
```
<Tabs>
<Tab title="ما هو llms.txt؟">
[`llms.txt`](https://llmstxt.org/) معيار ناشئ لجعل الوثائق قابلة للاستهلاك من قبل نماذج اللغة الكبيرة. بدلاً من استخراج HTML، يمكن لوكيلك جلب ملف نصي واحد منظم بكل المحتوى المطلوب.
ملف `llms.txt` الخاص بـ CrewAI **متاح فعلياً** — يمكن لوكيلك استخدامه الآن.
</Tab>
<Tab title="كيفية الاستخدام">
وجِّه وكيل البرمجة إلى عنوان URL عندما يحتاج إلى مرجع CrewAI:
```
Fetch https://docs.crewai.com/llms.txt for CrewAI documentation.
```
يمكن للعديد من وكلاء البرمجة (Claude Code، Cursor، وغيرهما) جلب عناوين URL مباشرة. يحتوي الملف على وثائق منظمة تغطي مفاهيم CrewAI وواجهات البرمجة والأدلة.
</Tab>
<Tab title="لماذا يهم">
- **دون استخراج ويب** — محتوى نظيف ومنظم في طلب واحد
- **دائماً محدث** — يُقدَّم مباشرة من docs.crewai.com
- **محسّن لنماذج اللغة** — مُنسَّق لنوافذ السياق لا للمتصفحات
- **يُكمّل Skills** — المهارات تعلّم الأنماط، وllms.txt يوفّر المرجع
</Tab>
</Tabs>
---
## 3. النشر للمؤسسات
انتقل من crew محلي إلى الإنتاج على **CrewAI AMP** (منصة إدارة الوكلاء) في دقائق.
<Steps>
<Step title="ابنِ محلياً">
أنشئ الهيكل واختبر crew أو flow:
```bash
crewai create crew my_crew
cd my_crew
crewai run
```
</Step>
<Step title="جهّز للنشر">
تأكد أن هيكل مشروعك جاهز:
```bash
crewai deploy --prepare
```
راجع [دليل التحضير](/ar/enterprise/guides/prepare-for-deployment) لتفاصيل الهيكل والمتطلبات.
</Step>
<Step title="انشر على AMP">
ادفع إلى منصة CrewAI AMP:
```bash
crewai deploy
```
يمكنك أيضاً النشر عبر [تكامل GitHub](/ar/enterprise/guides/deploy-to-amp) أو [Crew Studio](/ar/enterprise/guides/enable-crew-studio).
</Step>
<Step title="الوصول عبر API">
يحصل الـ crew المنشور على نقطة نهاية REST. دمجه في أي تطبيق:
```bash
curl -X POST https://app.crewai.com/api/v1/crews/<crew-id>/kickoff \
-H "Authorization: Bearer $CREWAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"inputs": {"topic": "AI agents"}}'
```
</Step>
</Steps>
<CardGroup cols={2}>
<Card title="النشر على AMP" icon="rocket" href="/ar/enterprise/guides/deploy-to-amp">
دليل النشر الكامل — CLI وGitHub وCrew Studio.
</Card>
<Card title="مقدمة عن AMP" icon="globe" href="/ar/enterprise/introduction">
نظرة على المنصة — ما يوفّره AMP لـ crews في الإنتاج.
</Card>
</CardGroup>
---
## 4. ميزات المؤسسات
CrewAI AMP مُصمَّم لفرق الإنتاج. إليك ما تحصل عليه بعد النشر.
<CardGroup cols={2}>
<Card title="المراقبة والرصد" icon="chart-line">
مسارات تنفيذ مفصّلة، وسجلات، ومقاييس أداء لكل تشغيل crew. راقب قرارات الوكلاء، استدعاءات الأدوات، وإكمال المهام في الوقت الفعلي.
</Card>
<Card title="Crew Studio" icon="paintbrush">
واجهة منخفضة/بدون كود لإنشاء crews وتخصيصها ونشرها بصرياً — ثم التصدير إلى الشيفرة أو النشر مباشرة.
</Card>
<Card title="بث الويبهوك" icon="webhook">
بث أحداث فورية من تنفيذات الـ crews إلى أنظمتك. تكامل مع Slack أو Zapier أو أي مستهلك ويبهوك.
</Card>
<Card title="إدارة الفريق" icon="users">
SSO وRBAC وضوابط على مستوى المؤسسة. أدر من يمكنه إنشاء crews ونشرها والوصول إليها.
</Card>
<Card title="مستودع الأدوات" icon="toolbox">
انشر وشارك أدواتاً مخصصة عبر مؤسستك. ثبّت أدوات المجتمع من السجل.
</Card>
<Card title="Factory (استضافة ذاتية)" icon="server">
شغّل CrewAI AMP على بنيتك التحتية. قدرات المنصة كاملة مع ضوابط إقامة البيانات والامتثال.
</Card>
</CardGroup>
<AccordionGroup>
<Accordion title="لمن مخصص AMP؟">
لفرق تحتاج نقل سير عمل وكلاء الذكاء الاصطناعي من النماذج الأولية إلى الإنتاج — مع المراقبة وضوابط الوصول والبنية التحتية القابلة للتوسع. سواءً كنت ناشئاً أو مؤسسة كبيرة، يتولى AMP التعقيد التشغيلي لتتفرغ لبناء الوكلاء.
</Accordion>
<Accordion title="ما خيارات النشر المتاحة؟">
- **السحابة (app.crewai.com)** — تُدار من CrewAI، أسرع طريق إلى الإنتاج
- **Factory (استضافة ذاتية)** — على بنيتك التحتية لسيطرة كاملة على البيانات
- **هجين** — دمج السحابة والاستضافة الذاتية حسب حساسية البيانات
</Accordion>
<Accordion title="كيف يعمل التسعير؟">
سجّل في [app.crewai.com](https://app.crewai.com) لمعرفة الخطط الحالية. تسعير المؤسسات وFactory متاح عند الطلب.
</Accordion>
</AccordionGroup>
<Card title="استكشف CrewAI AMP →" icon="arrow-right" href="https://app.crewai.com">
سجّل وانشر أول crew لك في الإنتاج.
</Card>

View File

@@ -1,105 +0,0 @@
---
title: "توثيق CrewAI"
description: "ابنِ Agents ذكاء اصطناعي تعاونية وCrews وFlows — جاهزة للإنتاج من اليوم الأول."
icon: "house"
mode: "wide"
---
<div
style={{
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
gap: 20,
textAlign: 'center',
padding: '48px 24px',
borderRadius: 16,
background: 'linear-gradient(180deg, rgba(235,102,88,0.12) 0%, rgba(201,76,60,0.08) 100%)',
border: '1px solid rgba(235,102,88,0.18)'
}}
>
<img src="/images/crew_only_logo.png" alt="CrewAI" width="250" height="100" />
<div style={{ maxWidth: 720 }}>
<h1 style={{ marginBottom: 12 }}>أطلق أنظمة متعددة الـ Agents بثقة</h1>
<p style={{ color: 'var(--mint-text-2)' }}>
صمم Agents، ونسّق Crews، وأتمت Flows مع حواجز حماية وذاكرة ومعرفة ومراقبة مدمجة.
</p>
</div>
<div style={{ display: 'flex', flexWrap: 'wrap', gap: 12, justifyContent: 'center' }}>
<a className="button button-primary" href="/ar/quickstart">ابدأ الآن</a>
<a className="button" href="/ar/changelog">سجل التغييرات</a>
<a className="button" href="/ar/api-reference/introduction">مرجع API</a>
</div>
</div>
<div style={{ marginTop: 32 }} />
## ابدأ
<CardGroup cols={3}>
<Card title="مقدمة" href="/ar/introduction" icon="sparkles">
نظرة عامة على مفاهيم CrewAI وبنيته المعمارية وما يمكنك بناؤه باستخدام Agents وCrews وFlows.
</Card>
<Card title="التثبيت" href="/ar/installation" icon="wrench">
التثبيت عبر `uv`، وإعداد مفاتيح API، وتهيئة CLI للتطوير المحلي.
</Card>
<Card title="البداية السريعة" href="/ar/quickstart" icon="rocket">
أنشئ أول Crew لك في دقائق. تعلم بيئة التشغيل الأساسية وهيكل المشروع ودورة التطوير.
</Card>
</CardGroup>
## ابنِ الأساسيات
<CardGroup cols={3}>
<Card title="Agents" href="/ar/concepts/agents" icon="users">
أنشئ Agents بأدوات وذاكرة ومعرفة ومخرجات منظمة باستخدام Pydantic. يتضمن قوالب وأفضل الممارسات.
</Card>
<Card title="Flows" href="/ar/concepts/flows" icon="arrow-progress">
نسّق خطوات start/listen/router، وأدر الحالة، واحفظ التنفيذ، واستأنف سير العمل الطويل.
</Card>
<Card title="المهام والعمليات" href="/ar/concepts/tasks" icon="check">
حدد عمليات متسلسلة أو هرمية أو مختلطة مع حواجز حماية واستدعاءات راجعة ومحفزات تدخل بشري.
</Card>
</CardGroup>
## رحلة المؤسسات
<CardGroup cols={3}>
<Card title="نشر الأتمتة" href="/ar/enterprise/features/automations" icon="server">
إدارة البيئات وإعادة النشر بأمان ومراقبة التشغيل المباشر من لوحة تحكم المؤسسات.
</Card>
<Card title="المحفزات والـ Flows" href="/ar/enterprise/guides/automation-triggers" icon="bolt">
ربط Gmail وSlack وSalesforce والمزيد. تمرير بيانات المحفزات إلى Crews وFlows تلقائيًا.
</Card>
<Card title="إدارة الفريق" href="/ar/enterprise/guides/team-management" icon="users-gear">
دعوة أعضاء الفريق وتهيئة التحكم في الوصول المبني على الأدوار وإدارة الوصول إلى أتمتة الإنتاج.
</Card>
</CardGroup>
## ما الجديد
<CardGroup cols={2}>
<Card title="نظرة عامة على المحفزات" href="/ar/enterprise/guides/automation-triggers" icon="sparkles">
نظرة شاملة موحدة على Gmail وDrive وOutlook وTeams وOneDrive وHubSpot والمزيد — الآن مع نماذج بيانات وCrews.
</Card>
<Card title="أدوات التكامل" href="/ar/tools/integration/overview" icon="plug">
استدعاء أتمتة CrewAI الحالية أو Amazon Bedrock Agents مباشرة من Crews باستخدام مجموعة أدوات التكامل المحدّثة.
</Card>
</CardGroup>
<Callout title="استكشف الأنماط الواقعية" icon="github">
تصفح <a href="/ar/examples/cookbooks">الأمثلة وكتب الوصفات</a> للحصول على تطبيقات مرجعية شاملة عبر Agents وFlows وأتمتة المؤسسات.
</Callout>
## ابقَ على تواصل
<CardGroup cols={2}>
<Card title="امنحنا نجمة على GitHub" href="https://github.com/crewAIInc/crewAI" icon="star">
إذا ساعدك CrewAI في الإطلاق بشكل أسرع، امنحنا نجمة وشارك مشاريعك مع المجتمع.
</Card>
<Card title="انضم إلى المجتمع" href="https://community.crewai.com" icon="comments">
اطرح أسئلة واعرض سير العمل واطلب ميزات جديدة جنبًا إلى جنب مع المطورين الآخرين.
</Card>
</CardGroup>

View File

@@ -1,80 +0,0 @@
---
title: "سير عمل التدخل البشري (HITL)"
description: "تعلم كيفية تنفيذ سير عمل التدخل البشري في CrewAI لتعزيز صنع القرار"
icon: "user-check"
mode: "wide"
---
التدخل البشري (HITL) هو نهج قوي يجمع بين الذكاء الاصطناعي والخبرة البشرية لتعزيز صنع القرار وتحسين نتائج المهام. يوفر CrewAI طرقًا متعددة لتنفيذ HITL حسب احتياجاتك.
## اختيار نهج HITL
يوفر CrewAI نهجين رئيسيين لتنفيذ سير عمل التدخل البشري:
| النهج | الأنسب لـ | التكامل | الإصدار |
|----------|----------|-------------|---------|
| **قائم على Flow** (مزخرف `@human_feedback`) | التطوير المحلي، المراجعة عبر وحدة التحكم، سير العمل المتزامن | [التغذية الراجعة البشرية في Flows](/ar/learn/human-feedback-in-flows) | **1.8.0+** |
| **قائم على Webhook** (المؤسسات) | نشر الإنتاج، سير العمل غير المتزامن، التكاملات الخارجية (Slack، Teams، إلخ) | هذا الدليل | - |
<Tip>
إذا كنت تبني Flows وتريد إضافة خطوات مراجعة بشرية مع توجيه بناءً على التعليقات، اطلع على دليل [التغذية الراجعة البشرية في Flows](/ar/learn/human-feedback-in-flows) لمزخرف `@human_feedback`.
</Tip>
## إعداد سير عمل HITL القائم على Webhook
<Steps>
<Step title="تهيئة المهمة">
أعدّ مهمتك مع تمكين إدخال بشري.
</Step>
<Step title="توفير عنوان Webhook URL">
عند تشغيل Crew، أدرج عنوان Webhook URL لإدخال بشري.
</Step>
<Step title="تلقي إشعار Webhook">
بمجرد إتمام Crew المهمة التي تتطلب إدخالاً بشريًا، ستتلقى إشعار Webhook.
</Step>
<Step title="مراجعة مخرجات المهمة">
سيتوقف النظام في حالة `Pending Human Input`. راجع مخرجات المهمة بعناية.
</Step>
<Step title="إرسال التغذية الراجعة البشرية">
استدعِ نقطة نهاية الاستئناف لـ Crew.
<Warning>
**مهم: يجب توفير عناوين Webhook URL مرة أخرى**:
يجب توفير نفس عناوين Webhook URL في استدعاء الاستئناف التي استخدمتها في استدعاء الانطلاق.
</Warning>
</Step>
<Step title="معالجة التعليقات السلبية">
إذا قدمت تعليقات سلبية، سيعيد Crew محاولة المهمة مع سياق إضافي من تعليقاتك.
</Step>
<Step title="استمرار التنفيذ">
عند إرسال تعليقات إيجابية، سيستمر التنفيذ إلى الخطوات التالية.
</Step>
</Steps>
## أفضل الممارسات
- **كن محددًا**: قدم تعليقات واضحة وقابلة للتنفيذ
- **ابقَ ذا صلة**: أدرج فقط معلومات تساعد في تحسين تنفيذ المهمة
- **كن في الوقت المناسب**: استجب لمطالبات HITL بسرعة لتجنب تأخير سير العمل
- **راجع بعناية**: تحقق من تعليقاتك قبل الإرسال لضمان الدقة
## حالات الاستخدام الشائعة
سير عمل HITL مفيدة بشكل خاص لـ:
- ضمان الجودة والتحقق
- سيناريوهات صنع القرار المعقدة
- العمليات الحساسة أو عالية المخاطر
- المهام الإبداعية التي تتطلب حكمًا بشريًا
- مراجعات الامتثال والتنظيم
## ميزات المؤسسات
<Card title="منصة إدارة HITL للـ Flow" icon="users-gear" href="/ar/enterprise/features/flow-hitl-management">
يوفر CrewAI Enterprise نظام إدارة HITL شامل لـ Flows مع مراجعة داخل المنصة وتعيين المستجيبين والأذونات وسياسات التصعيد وإدارة SLA والتوجيه الديناميكي والتحليلات الكاملة. [تعلم المزيد](/ar/enterprise/features/flow-hitl-management)
</Card>

View File

@@ -1,278 +0,0 @@
---
title: البدء السريع
description: ابنِ أول Flow في CrewAI خلال دقائق — التنسيق والحالة وفريقًا بوكيل واحد ينتج تقريرًا فعليًا.
icon: rocket
mode: "wide"
---
### شاهد: بناء Agents و Flows في CrewAI باستخدام Coding Agent Skills
قم بتثبيت مهارات وكيل البرمجة الخاصة بنا (Claude Code، Codex، ...) لتشغيل وكلاء البرمجة بسرعة مع CrewAI.
يمكنك تثبيتها باستخدام `npx skills add crewaiinc/skills`
<iframe src="https://www.loom.com/embed/befb9f68b81f42ad8112bfdd95a780af" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen style={{width: "100%", height: "400px"}}></iframe>
في هذا الدليل ستُنشئ **Flow** يحدد موضوع بحث، ويشغّل **طاقمًا بوكيل واحد** (باحث يستخدم البحث على الويب)، وينتهي بتقرير **Markdown** على القرص. يُعد Flow الطريقة الموصى بها لتنظيم التطبيقات الإنتاجية: يمتلك **الحالة** و**ترتيب التنفيذ**، بينما **الوكلاء** ينفّذون العمل داخل خطوة الطاقم.
إذا لم تُكمل تثبيت CrewAI بعد، اتبع [دليل التثبيت](/ar/installation) أولًا.
## المتطلبات الأساسية
- بيئة Python وواجهة سطر أوامر CrewAI (راجع [التثبيت](/ar/installation))
- نموذج لغوي مهيأ بالمفاتيح الصحيحة — راجع [LLMs](/ar/concepts/llms#setting-up-your-llm)
- مفتاح API من [Serper.dev](https://serper.dev/) (`SERPER_API_KEY`) للبحث على الويب في هذا الدرس
## ابنِ أول Flow لك
<Steps>
<Step title="أنشئ مشروع Flow">
من الطرفية، أنشئ مشروع Flow (اسم المجلد يستخدم شرطة سفلية، مثل `latest_ai_flow`):
<CodeGroup>
```shell Terminal
crewai create flow latest-ai-flow
cd latest_ai_flow
```
</CodeGroup>
يُنشئ ذلك تطبيق Flow ضمن `src/latest_ai_flow/`، بما في ذلك طاقمًا أوليًا في `crews/content_crew/` ستستبدله بطاقم بحث **بوكيل واحد** في الخطوات التالية.
</Step>
<Step title="اضبط وكيلًا واحدًا في `agents.yaml`">
استبدل محتوى `src/latest_ai_flow/crews/content_crew/config/agents.yaml` بباحث واحد. تُملأ المتغيرات مثل `{topic}` من `crew.kickoff(inputs=...)`.
```yaml agents.yaml
# src/latest_ai_flow/crews/content_crew/config/agents.yaml
researcher:
role: >
باحث بيانات أول في {topic}
goal: >
اكتشاف أحدث التطورات في {topic}
backstory: >
أنت باحث مخضرم تكشف أحدث المستجدات في {topic}.
تجد المعلومات الأكثر صلة وتعرضها بوضوح.
```
</Step>
<Step title="اضبط مهمة واحدة في `tasks.yaml`">
```yaml tasks.yaml
# src/latest_ai_flow/crews/content_crew/config/tasks.yaml
research_task:
description: >
أجرِ بحثًا معمقًا عن {topic}. استخدم البحث على الويب للعثور على معلومات
حديثة وموثوقة. السنة الحالية 2026.
expected_output: >
تقرير بصيغة Markdown بأقسام واضحة: الاتجاهات الرئيسية، أدوات أو شركات بارزة،
والآثار. بين 800 و1200 كلمة تقريبًا. دون إحاطة المستند بأكمله بكتل كود.
agent: researcher
output_file: output/report.md
```
</Step>
<Step title="اربط صف الطاقم (`content_crew.py`)">
اجعل الطاقم المُولَّد يشير إلى YAML وأرفق `SerperDevTool` بالباحث.
```python content_crew.py
# src/latest_ai_flow/crews/content_crew/content_crew.py
from typing import List
from crewai import Agent, Crew, Process, Task
from crewai.agents.agent_builder.base_agent import BaseAgent
from crewai.project import CrewBase, agent, crew, task
from crewai_tools import SerperDevTool
@CrewBase
class ResearchCrew:
"""طاقم بحث بوكيل واحد داخل Flow."""
agents: List[BaseAgent]
tasks: List[Task]
agents_config = "config/agents.yaml"
tasks_config = "config/tasks.yaml"
@agent
def researcher(self) -> Agent:
return Agent(
config=self.agents_config["researcher"], # type: ignore[index]
verbose=True,
tools=[SerperDevTool()],
)
@task
def research_task(self) -> Task:
return Task(
config=self.tasks_config["research_task"], # type: ignore[index]
)
@crew
def crew(self) -> Crew:
return Crew(
agents=self.agents,
tasks=self.tasks,
process=Process.sequential,
verbose=True,
)
```
</Step>
<Step title="عرّف Flow في `main.py`">
اربط الطاقم بـ Flow: خطوة `@start()` تضبط الموضوع في **الحالة**، وخطوة `@listen` تشغّل الطاقم. يظل `output_file` للمهمة يكتب `output/report.md`.
```python main.py
# src/latest_ai_flow/main.py
from pydantic import BaseModel
from crewai.flow import Flow, listen, start
from latest_ai_flow.crews.content_crew.content_crew import ResearchCrew
class ResearchFlowState(BaseModel):
topic: str = ""
report: str = ""
class LatestAiFlow(Flow[ResearchFlowState]):
@start()
def prepare_topic(self, crewai_trigger_payload: dict | None = None):
if crewai_trigger_payload:
self.state.topic = crewai_trigger_payload.get("topic", "AI Agents")
else:
self.state.topic = "AI Agents"
print(f"الموضوع: {self.state.topic}")
@listen(prepare_topic)
def run_research(self):
result = ResearchCrew().crew().kickoff(inputs={"topic": self.state.topic})
self.state.report = result.raw
print("اكتمل طاقم البحث.")
@listen(run_research)
def summarize(self):
print("مسار التقرير: output/report.md")
def kickoff():
LatestAiFlow().kickoff()
def plot():
LatestAiFlow().plot()
if __name__ == "__main__":
kickoff()
```
<Tip>
إذا كان اسم الحزمة ليس `latest_ai_flow`، عدّل استيراد `ResearchCrew` ليطابق مسار الوحدة في مشروعك.
</Tip>
</Step>
<Step title="متغيرات البيئة">
في جذر المشروع، ضبط `.env`:
- `SERPER_API_KEY` — من [Serper.dev](https://serper.dev/)
- مفاتيح مزوّد النموذج حسب الحاجة — راجع [إعداد LLM](/ar/concepts/llms#setting-up-your-llm)
</Step>
<Step title="التثبيت والتشغيل">
<CodeGroup>
```shell Terminal
crewai install
crewai run
```
</CodeGroup>
يُنفّذ `crewai run` نقطة دخول Flow المعرّفة في المشروع (نفس أمر الطواقم؛ نوع المشروع `"flow"` في `pyproject.toml`).
</Step>
<Step title="تحقق من المخرجات">
يجب أن ترى سجلات من Flow والطاقم. افتح **`output/report.md`** للتقرير المُولَّد (مقتطف):
<CodeGroup>
```markdown output/report.md
# وكلاء الذكاء الاصطناعي في 2026: المشهد والاتجاهات
## ملخص تنفيذي
## أبرز الاتجاهات
- **استخدام الأدوات والتنسيق** — …
- **التبني المؤسسي** — …
## الآثار
```
</CodeGroup>
سيكون الملف الفعلي أطول ويعكس نتائج بحث مباشرة.
</Step>
</Steps>
## كيف يترابط هذا
1. **Flow** — يشغّل `LatestAiFlow` أولًا `prepare_topic` ثم `run_research` ثم `summarize`. الحالة (`topic`، `report`) على Flow.
2. **الطاقم** — يشغّل `ResearchCrew` مهمة واحدة بوكيل واحد: الباحث يستخدم **Serper** للبحث على الويب ثم يكتب التقرير.
3. **المُخرَج** — يكتب `output_file` للمهمة التقرير في `output/report.md`.
للتعمق في أنماط Flow (التوجيه، الاستمرارية، الإنسان في الحلقة)، راجع [ابنِ أول Flow](/ar/guides/flows/first-flow) و[Flows](/ar/concepts/flows). للطواقم دون Flow، راجع [Crews](/ar/concepts/crews). لوكيل `Agent` واحد و`kickoff()` بلا مهام، راجع [Agents](/ar/concepts/agents#direct-agent-interaction-with-kickoff).
<Check>
أصبح لديك Flow كامل مع طاقم وكيل وتقرير محفوظ — قاعدة قوية لإضافة خطوات أو طواقم أو أدوات.
</Check>
### اتساق التسمية
يجب أن تطابق مفاتيح YAML (`researcher`، `research_task`) أسماء الدوال في صف `@CrewBase`. راجع [Crews](/ar/concepts/crews) لنمط الديكورات الكامل.
## النشر
ادفع Flow إلى **[CrewAI AMP](https://app.crewai.com)** بعد أن يعمل محليًا ويكون المشروع في مستودع **GitHub**. من جذر المشروع:
<CodeGroup>
```bash المصادقة
crewai login
```
```bash إنشاء نشر
crewai deploy create
```
```bash الحالة والسجلات
crewai deploy status
crewai deploy logs
```
```bash إرسال التحديثات بعد تغيير الكود
crewai deploy push
```
```bash عرض النشرات أو حذفها
crewai deploy list
crewai deploy remove <deployment_id>
```
</CodeGroup>
<Tip>
غالبًا ما يستغرق **النشر الأول حوالي دقيقة**. المتطلبات الكاملة ومسار الواجهة الويب في [النشر على AMP](/ar/enterprise/guides/deploy-to-amp).
</Tip>
<CardGroup cols={2}>
<Card title="دليل النشر" icon="book" href="/ar/enterprise/guides/deploy-to-amp">
النشر على AMP خطوة بخطوة (CLI ولوحة التحكم).
</Card>
<Card
title="المجتمع"
icon="comments"
href="https://community.crewai.com"
>
ناقش الأفكار وشارك مشاريعك وتواصل مع مطوري CrewAI.
</Card>
</CardGroup>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,135 @@
---
title: "مقدمة"
description: "المرجع الكامل لواجهة برمجة تطبيقات CrewAI AMP REST"
icon: "code"
mode: "wide"
---
# واجهة برمجة تطبيقات CrewAI AMP
مرحبًا بك في مرجع واجهة برمجة تطبيقات CrewAI AMP. تتيح لك هذه الواجهة التفاعل برمجيًا مع الأطقم المنشورة، مما يمكّنك من دمجها مع تطبيقاتك وسير عملك وخدماتك.
## البدء السريع
<Steps>
<Step title="الحصول على بيانات اعتماد API">
انتقل إلى صفحة تفاصيل طاقمك في لوحة تحكم CrewAI AMP وانسخ رمز Bearer من علامة تبويب الحالة.
</Step>
<Step title="اكتشاف المدخلات المطلوبة">
استخدم نقطة النهاية `GET /inputs` لمعرفة المعاملات التي يتوقعها طاقمك.
</Step>
<Step title="بدء تنفيذ الطاقم">
استدعِ `POST /kickoff` مع مدخلاتك لبدء تنفيذ الطاقم واستلام
`kickoff_id`.
</Step>
<Step title="مراقبة التقدم">
استخدم `GET /status/{kickoff_id}` للتحقق من حالة التنفيذ واسترجاع النتائج.
</Step>
</Steps>
## المصادقة
تتطلب جميع طلبات API المصادقة باستخدام رمز Bearer. أدرج رمزك في ترويسة `Authorization`:
```bash
curl -H "Authorization: Bearer YOUR_CREW_TOKEN" \
https://your-crew-url.crewai.com/inputs
```
### أنواع الرموز
| نوع الرمز | النطاق | حالة الاستخدام |
| :-------------------- | :------------------------ | :----------------------------------------------------------- |
| **Bearer Token** | وصول على مستوى المؤسسة | عمليات الطاقم الكاملة، مثالي للتكامل بين الخوادم |
| **User Bearer Token** | وصول محدد بالمستخدم | صلاحيات محدودة، مناسب للعمليات الخاصة بالمستخدم |
<Tip>
يمكنك العثور على كلا نوعي الرموز في علامة تبويب الحالة من صفحة تفاصيل طاقمك في
لوحة تحكم CrewAI AMP.
</Tip>
## عنوان URL الأساسي
لكل طاقم منشور نقطة نهاية API فريدة خاصة به:
```
https://your-crew-name.crewai.com
```
استبدل `your-crew-name` بعنوان URL الفعلي لطاقمك من لوحة التحكم.
## سير العمل النموذجي
1. **الاكتشاف**: استدعِ `GET /inputs` لفهم ما يحتاجه طاقمك
2. **التنفيذ**: أرسل المدخلات عبر `POST /kickoff` لبدء المعالجة
3. **المراقبة**: استعلم عن `GET /status/{kickoff_id}` حتى الاكتمال
4. **النتائج**: استخرج المخرجات النهائية من الاستجابة المكتملة
## معالجة الأخطاء
تستخدم الواجهة أكواد حالة HTTP القياسية:
| الكود | المعنى |
| ----- | :----------------------------------------- |
| `200` | نجاح |
| `400` | طلب غير صالح - تنسيق مدخلات غير صحيح |
| `401` | غير مصرّح - رمز bearer غير صالح |
| `404` | غير موجود - المورد غير موجود |
| `422` | خطأ في التحقق - مدخلات مطلوبة مفقودة |
| `500` | خطأ في الخادم - تواصل مع الدعم |
## الاختبار التفاعلي
<Info>
**لماذا لا يوجد زر "إرسال"؟** نظرًا لأن كل مستخدم CrewAI AMP لديه عنوان URL
فريد للطاقم، نستخدم **وضع المرجع** بدلاً من بيئة تفاعلية لتجنب
الالتباس. يوضح لك هذا بالضبط كيف يجب أن تبدو الطلبات بدون
أزرار إرسال غير فعالة.
</Info>
تعرض لك كل صفحة نقطة نهاية:
- **تنسيق الطلب الدقيق** مع جميع المعاملات
- **أمثلة الاستجابة** لحالات النجاح والخطأ
- **عينات الكود** بلغات متعددة (cURL، Python، JavaScript، إلخ)
- **أمثلة المصادقة** بتنسيق رمز Bearer الصحيح
### **لاختبار واجهتك الفعلية:**
<CardGroup cols={2}>
<Card title="نسخ أمثلة cURL" icon="terminal">
انسخ أمثلة cURL واستبدل العنوان URL + الرمز بقيمك الحقيقية
</Card>
<Card title="استخدام Postman/Insomnia" icon="play">
استورد الأمثلة في أداة اختبار API المفضلة لديك
</Card>
</CardGroup>
**مثال على سير العمل:**
1. **انسخ مثال cURL هذا** من أي صفحة نقطة نهاية
2. **استبدل `your-actual-crew-name.crewai.com`** بعنوان URL الحقيقي لطاقمك
3. **استبدل رمز Bearer** برمزك الحقيقي من لوحة التحكم
4. **نفّذ الطلب** في طرفيتك أو عميل API
## هل تحتاج مساعدة؟
<CardGroup cols={2}>
<Card
title="دعم المؤسسات"
icon="headset"
href="mailto:support@crewai.com"
>
احصل على مساعدة في تكامل API واستكشاف الأخطاء وإصلاحها
</Card>
<Card
title="لوحة تحكم المؤسسات"
icon="chart-line"
href="https://app.crewai.com"
>
إدارة أطقمك وعرض سجلات التنفيذ
</Card>
</CardGroup>

View File

@@ -0,0 +1,6 @@
---
title: "GET /status/{kickoff_id}"
description: "الحصول على حالة التنفيذ"
openapi: "/enterprise-api.en.yaml GET /status/{kickoff_id}"
mode: "wide"
---

2305
docs/edge/ar/changelog.mdx Normal file

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More