Commit Graph
847 Commits
Author SHA1 Message Date
Joao MouraandClaude Opus 5.5 374ee68ee6 feat(cli): add crewai deploy test to run a deployment once
`crewai deploy test [-u UUID] [--inputs JSON] [--timeout SECONDS]` starts
one run of the project's deployment through AMP API v1 with the CLI login,
polls its status every 3 s, prints the result, and exits 0 only when the
run succeeds. A refusal, a failed, stopped, paused or unknown state, three
failed status reads in a row, or the timeout each exit 1 with the reason.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 19:43:30 -07:00
Lorenze Jay bc5728b885 [docs-freeze] docs: snapshot and changelog for v1.15.32 (#8692) 2026-10-27 20:03:47 -03:00
Lorenze Jay ca3243d29b [docs-freeze] docs: snapshot and changelog for v1.15.31 (#8684) 2026-10-27 14:36:11 -07:00
Lorenze Jay 2a404d5524 feat(flow): support conversational flow context compaction (#8627) 2026-10-27 17:29:56 -03:00
Sathyajith MC aed2a7ea93 docs: use HTTPS for CrewAI AMP link in CLI concept doc (#8474) 2026-10-26 07:30:47 +00:00
leom1919andleom1919 2cc84c5a69 docs: fix internal anchor links pointing to English slugs on translated pages (#8456)
* docs: fix internal anchor links pointing to English slugs on translated pages

The ko/pt-BR/ar translations localize the headings, but many internal
links still reference the English heading slugs, so the anchors no
longer resolve. The audit also surfaced three broken anchors in the
English docs themselves.

Fixes (every target verified against the rendered id= attributes on
the live docs site):
- #setting-up-your-llm -> llm-설정하기 / configurando-seu-llm / إعداد-llm-الخاص-بك
- #direct-agent-interaction-with-kickoff -> kickoff-을-사용한-에이전트-직접-상호작용 (ko);
  section not translated in pt-BR/ar -> page-level link
- #event-listeners (broken on the en page too) -> "Creating a Custom
  Event Listener" section per locale
- #task-guardrails -> 작업-가드레일 / guardrails-em-tarefas / حراس-المهام
- #building-your-crews -> بناء-فرق-crew-الخاصة-بك (ar); not translated
  in ko/pt-BR -> page-level link
- #persistence -> flow-persistence (en) / 플로우-지속성 / persistência-de-flow /
  استمرارية-التدفق
- #router -> الموجّه (ar, diacritics preserved)
- #advanced-mcpserveradapter -> متقدم-mcpserveradapter (ar); not
  translated in ko/pt-BR -> page-level link
- #enabling-unsafe-mode -> enabling-unsafe_mode (en, underscore) ; section
  not translated in ko/pt-BR/ar -> page-level link
- #provider-configuration-examples -> أمثلة-إعداد-المزودين (ar)

38 link fixes across 28 files, applied to both docs/edge and
docs/v1.15.28 (56 files).

Fixes #8455

* docs: revert changes under docs/v1.15.28 per review

Versioned docs under docs/v*/ are frozen release snapshots and must not be modified. Restoring all files under docs/v1.15.28/ to their original content; retaining only the docs/edge/ fixes.

---------

Co-authored-by: leom1919 <leom1919@users.noreply.github.com>
2026-10-26 07:29:16 +00:00
lester076 8177dd4df7 docs(hooks): fix CrewBase imports in examples (#8582) 2026-10-26 11:16:51 +05:30
João Moura 38db11e332 [docs-freeze] docs: snapshot and changelog for v1.15.30 (#8482) 2026-10-23 22:55:48 -03:00
João Moura 0bb7113861 [docs-freeze] docs: snapshot and changelog for v1.15.29 (#8473) 2026-10-23 14:35:20 -03:00
A ABDULLAH 8660dd47ca fix(files): swap Bedrock image and document size limits (#8159)
* fix(files): swap Bedrock image and document size limits

BEDROCK_CONSTRAINTS capped images at 4.5 MB and PDFs at 3.75 MB, the
reverse of the Bedrock Converse API limits (3.75 MB per image, 4.5 MB
per document). Images between the two sizes skipped AUTO-mode
optimization and were sent as-is, and PDFs in that range were rejected
in STRICT mode.

Swap the two values, add processor tests for both cases, and correct
the provider constraints table in the files docs (en, ar, ko, pt-BR).

* test(files): check optimized Bedrock image against configured limit

Assert that AUTO mode both shrinks the image and brings it within
BEDROCK_CONSTRAINTS.image.max_size_bytes, instead of comparing against a
hard-coded 3.75 MiB threshold.
2026-10-23 13:50:46 +00:00
leom1919 f76ee29450 docs(examples): fix broken crewAI-examples links after repo reorganization (#8393)
The crewAI-examples repo was reorganized (#277): flows moved under flows/, lead_score_flow renamed to lead-score-flow, crewai-langgraph renamed to CrewAI-LangGraph, Notebooks renamed to notebooks. Several docs pages still point to the old paths, which now 404.

Fixes, all verified against the live repo tree:
- tree/main/email_auto_responder_flow -> tree/main/flows/email_auto_responder_flow
- tree/main/lead-score-flow -> tree/main/flows/lead-score-flow
- tree/main/meeting_assistant_flow -> tree/main/flows/meeting_assistant_flow
- tree/main/write_a_book_with_flows -> tree/main/flows/write_a_book_with_flows
- tree/main/flows/lead_score_flow -> tree/main/flows/lead-score-flow
- tree/main/integrations/crewai-langgraph -> tree/main/integrations/CrewAI-LangGraph
- tree/main/Notebooks -> tree/main/notebooks (incl. Simple QA Crew + Flow)

Scope: docs/edge and docs/v1.15.28, en/ko/pt-BR/ar. 68 link replacements across 20 files. The flows/content_creator_flow link is left untouched on purpose: that path currently exists as a broken submodule in crewAI-examples (gitlink without .gitmodules), so it needs fixing on the repo side first.
2026-10-22 13:07:06 +05:30
leom1919andleom1919 5daf9cfc01 docs(tools): fix dead and outdated links in browserbase load and langtrace guides (#8359)
Co-authored-by: leom1919 <leom1919@users.noreply.github.com>
2026-10-21 16:43:39 +00:00
leom1919andleom1919 a71be46d53 docs(tools): fix dead external links in stagehand, tavily extract and ai mind guides (#8356)
Co-authored-by: leom1919 <leom1919@users.noreply.github.com>
2026-10-21 22:12:17 +05:30
leom1919 af4efdc685 docs(observability): fix dead galileo sdk-examples repo link (#8348) 2026-10-21 08:35:41 +00:00
Wilson_Jiang b523e6124f docs: fix dead repo links in observability guides (Braintrust SDK, OpenInference) (#8310) 2026-10-20 21:34:47 +05:30
Rip&TearandClaude Sonnet 5.5 c08008b624 fix(tools): default-deny non-global IPs in SSRF check (#7826)
* fix(tools): default-deny non-global IPs in SSRF check

is_blocked_ip used hand-written denylists that missed CGNAT
(100.64.0.0/10, incl. Alibaba metadata 100.100.100.200), 198.18.0.0/15,
Azure WireServer (168.63.129.16), and IPv6 forms wrapping private IPv4
(NAT64, 6to4).

Block anything that is not is_global, keep explicit entries for ranges
is_global may allow or that vary by Python version, and unwrap
IPv4-mapped and NAT64 (64:ff9b::/96) addresses so the embedded IPv4 is
checked. 6to4, Teredo and local-use NAT64 are non-global and blocked.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* docs(tools): note CGNAT is blocked by SSRF-safe scrape tools

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* fix(tools): block IPv6 transition ranges explicitly in is_blocked_ip

6to4 and local-use NAT64 were is_global=True before the CVE-2024-4032
fix (Python <3.10.15 / <3.11.10), so they relied on the interpreter to
be blocked. Add them, Teredo, IPv4-compatible (::/96), IPv4-translated
(::ffff:0:0:0/96) and deprecated site-local (fec0::/10) to the explicit
IPv6 list, which also closes forms is_global allows on every version.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-20 10:52:08 +05:30
Lorenze Jay d06c91401f feat(flow): add opt-in per-turn conversation tracing (#8291)
* feat(flow): add opt-in per-turn conversation tracing

* fix(flow): avoid completing turns paused for human feedback
2026-10-20 10:19:59 +05:30
João MouraandClaude Opus 5.5 3da49f872b feat(cli): crewai eval runs the crew itself, so a coding agent gets a verdict from one command (#8270)
* feat(cli): crewai eval runs the crew itself, so a coding agent gets a verdict from one command

Most `crewai eval` attempts stopped before an evaluation began because the
project had no traced run. Telemetry since Sept 25: 117 projects stopped as
"untraced", 97 of them with no terminal (coding agents), and 67 of those never
got further. With no terminal the command could only print steps, and without
a login those steps could not work: an unattended anonymous run never uploads
its trace.

- With no traced run, or when the project's files changed since the last one,
  `crewai eval` runs the crew and evaluates that run. No question, with or
  without a terminal: running the command is the request to have the run
  graded, and the grade is read off its trace. Tracing is on for that run only;
  nothing is written to the project's `.env`.
- crewAI's tracing approves the upload of that run through the existing
  handshake: a token in CREWAI_EVAL_AWAITING_RUN that counts only while its file
  exists in the user's crewAI data folder, so a `.env` cannot claim it. Shared
  as `crewai_core.eval_handshake`; the run app keeps its own copy because it
  also runs against a project's older crewai-core, and a test pins the two.
- The run app's Evaluate on an untraced run closes the app and runs the crew
  again, traced, through `crewai eval`'s own path, instead of a notice.
- Counts: `eval_ran_crew:{no_traced_run,project_changed,run_again}`,
  `eval_finished:{passed,failed,inconclusive,unknown}`, and
  `eval_stopped:untraced_after_run` replacing the catch-all `untraced`
  (`declined` is gone with the question). The CLI tests no longer send usage
  counts.

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

* fix(cli): a project that turned tracing off is asked before crewai eval runs it

`CREWAI_TRACING_ENABLED=false` is the project's no, and nothing overrules it,
not even a run `crewai eval` started.

- `crewai eval` at a terminal asks to turn tracing on before running the crew.
  A yes writes it to the project's `.env`; a no runs nothing (exit 0,
  `eval_stopped:declined`). With no terminal it stops and says how to turn it
  on (`eval_stopped:tracing_off`), which a coding agent can do itself.
- The run app's Evaluate on an untraced run asks the same question in a modal
  (TurnTracingOnScreen) before running the crew again. Otherwise it still runs
  it again with no question.
- crewAI's tracing respects an explicit off again: `should_enable_tracing`
  checks it before a run `crewai eval` started, and `execution._tracing_disabled`
  is back to what main has.

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

* fix(tracing): the telemetry opt-out no longer turns tracing off; an evaluated run says where its trace goes

- `OTEL_SDK_DISABLED` is the telemetry opt-out, a separate setting from
  tracing, which has its own (`CREWAI_TRACING_ENABLED`, `tracing=`).
  `execution._tracing_disabled` no longer reads it. The trace session's own
  TracerProvider records even when the OpenTelemetry SDK is switched off
  (`session._trace_provider`), because the SDK otherwise hands out tracers that
  record nothing. A provider a host passes in is left as it is. Tests that used
  `OTEL_SDK_DISABLED` as a way to stop a trace now cover the two real switches;
  new tests show a traced run, anonymous or logged in, recorded and uploaded
  with it set.
- A run app opened to run the crew for an evaluation (`crewai eval`, or
  Evaluate on a run that was not traced) shows one plain note on mount: "This
  run will be evaluated: its trace is sent to CrewAI AMP, which grades it."

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

* fix(cli): say where the trace goes only when the yes is inferred from crewai eval

The note, in the run app ("This run will be evaluated: its trace is sent to
CrewAI AMP, which grades it.") and in `crewai eval`'s line, is for the case
where nobody turned tracing on: not `tracing=True` on the crew or flow, not
`CREWAI_TRACING_ENABLED=true`, not a consent a person gave once
(`crewai_core.user_data.is_tracing_enabled`), and not the yes they just gave to
turn it on. A project or a person who opted in is told nothing new.

The run `crewai eval` starts no longer sets `CREWAI_TRACING_ENABLED=true`:
the handshake alone turns tracing on for it, so the setting a run reads is the
project's own.

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

* fix(cli): turn tracing on once with a note, pin the eval handshake, and keep the saved login to trusted AMPs

From the review on #8270, and João's call on the note:

- The first `crewai eval` that infers the yes turns tracing on for the
  project (`CREWAI_TRACING_ENABLED=true` in `.env` and for the run) and says
  so once, in the command and in the run app: "Tracing is now on for this
  project…". Afterwards the project traces and nothing more is said. A run
  whose crew or flow sets `tracing=False` is never told its trace is sent.
- The handshake's folder is found from the account's home in the account
  database, never `HOME` or `XDG_DATA_HOME`, so a project's `.env` cannot plant
  a token file that approves an upload. Both copies (crewai-core, the run app)
  are pinned to the same folder and file by a test.
- The token file carries the AMP origins `crewai eval` trusted before the
  project's `.env` was loaded. A run it started sends the saved login only
  there over HTTPS or loopback; an AMP the `.env` chose gets an anonymous
  grant.
- Evaluate on an untraced run carries that run's definition, inputs (prompted
  ones included) and trained-agents file into the re-run. The conversational
  flow consumes the request too, and a crew or flow that sets `tracing=False`
  says why it cannot be evaluated instead of paying for another run.
- "The project changed" also sees deleted files: each evaluation keeps the
  list of the project's files (`.crewai/eval_project_state.json`) and the next
  one compares against it. That list is taken after this command's own
  project-id write, so the write is no change.
- The OpenTelemetry override probes its provider and warns if an SDK version
  still records nothing, instead of failing silently.
- The stale `sdk` case of `test_disabled_execution_does_not_collect_or_request_grants`
  is gone; the handshake tests are typed (type-checker CI).

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

* fix(cli): keep the saved login off a project's AMP on every path crewai eval runs

From the second review round on #8270:

- Evaluate's re-run runs in a process that already loaded the project's
  `.env`, so it passes this machine's AMPs (`_machine_amp_origins`) as the
  trusted set instead of reading `CREWAI_PLUS_URL` there (`eval_crew(
  trusted_amp_origins=…)`).
- A project's `.env` can neither set nor replace `crewai eval`'s token:
  `run_crew.load_project_env` keeps the token the process was started with and
  drops one a `.env` sets. The JSON-crew, declarative-flow and eval paths all
  load `.env` through it.
- `crewai eval` turns tracing on only when every credential this machine holds
  (the saved login, or a PAT or integration token from before the `.env`) may
  go to the AMP the run would trace to. A project's crewai older than the
  handshake would otherwise send it to an AMP the `.env` names. A newer crewai
  still traces the run anonymously through the handshake.
- A conversational flow named by its definition is re-run by that definition.
- Code quality: no redundant assignment in `_awaiting_dir`, no unused names in
  the credential test.

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

* fix(cli): crewai eval does not run a crew whose trace would carry the login to an untrusted AMP

When tracing is on for the run (the project's .env, or a consent given once)
and a credential of this machine would go to an AMP the command does not
trust, the crew is not run. A project's crewai older than the handshake would
send the login there, and the CLI cannot tell which crewai the project runs.
The command stops (`eval_stopped:untrusted_amp`) and says how to go on: log
in to that AMP, or remove CREWAI_PLUS_URL from the project's .env. A project
that turned tracing off is not asked to turn it on toward such an AMP. With
no credential on the machine, there is nothing to protect and the run goes on.

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

* Ask at a terminal before tracing is first turned on

A person running `crewai eval` at a terminal, in a project that never
turned tracing on, is now asked on crewAI's trace consent screen before
the crew runs; a yes turns tracing on for the project, a no (or the
screen timing out) runs nothing and is counted as `declined`. The run
app's Evaluate on an untraced run asks on its own consent screen the same
way. With nobody at a terminal (a coding agent, a script) the yes is
still inferred from the command, tracing is turned on and said once.

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

* Keep main's Iterator import, which the rebase over #8187 dropped

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

* A run-app test no longer leaves .crewai/last_eval.json in the repo

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

* Two run-app tests from #7963 no longer leave .crewai/last_eval.json in the repo

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

* Never run the crew toward an AMP the login must not reach; check before asking

`crewai eval` now refuses to run the crew whenever a credential of this
machine would go with the trace to an AMP it does not trust, whatever the
tracing setting: `tracing=True` in code is invisible to the CLI, and a
project's crewai older than the handshake sends the credential wherever
the run traces. The run app's Evaluate makes the same check before it
asks anything, so a yes can never write CREWAI_TRACING_ENABLED=true to
`.env` for a re-run that is then refused.

Which credentials are this machine's is read from the environment as it
was before any project `.env` was loaded (`run_crew.environment_before_project`),
so on Evaluate's re-run a CREWAI_USER_PAT the project's own `.env` brought
is the project's, as on any run of it.

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

* Run the crew only toward an AMP this machine trusts, login or not

Whether this machine holds a login right now no longer decides: with no
login yet, `crewai eval` still wrote CREWAI_TRACING_ENABLED=true toward a
CREWAI_PLUS_URL the project's `.env` chose, and the first run after
`crewai login` would have carried the login there. Toward an AMP this
command does not trust, the crew is now never run, nobody is asked and
nothing is written, in `crewai eval` and the run app's Evaluate alike.
That also drops the credential bookkeeping from b26ccaf44, which the
rule no longer needs.

The telemetry docs no longer say OTEL_SDK_DISABLED turns off everything:
it disables OpenTelemetry instrumentation and CrewAI's telemetry, not AMP
tracing, which has its own switches.

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

* Pin that a project's own token never blocks Evaluate's re-run

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 04:11:15 -03:00
Vidit Ostwal c661df9816 feat(agents): promote AgentExecutor out of experimental (#8192)
* feat(agents): promote AgentExecutor out of experimental

The default executor was still imported from crewai.experimental. Move it to a stable module and keep the old import as a deprecation warning.

* fix(agents): stabilize executor discriminator

* feat(agents): remove CrewAgentExecutor

AgentExecutor is the only executor. Selecting the deleted class fails immediately, with no compatibility path.

* feat(agents): drop experimental AgentExecutor compatibility

The experimental import path and the legacy experimental discriminator are no longer accepted.

* docs: address executor review comments

Translate the remaining hook comments, document the full executor type, and stop the removal test from hiding an eager export.

* docs: keep translated hook sketches on AgentExecutor

The locale class sketches only needed the CrewAgentExecutor rename. LiteAgent and None stay on the English page, which documents the full type.
2026-10-15 14:33:38 -07:00
João Moura eb15c66cef [docs-freeze] docs: snapshot and changelog for v1.15.28 (#8147) 2026-10-14 01:46:47 -03:00
João MouraandClaude Opus 5.5 75808b0eca fix(flow): learn from resumed human feedback and keep the reviewed output's type (#8142)
* fix(flow): learn from human feedback that resumes a paused flow

With learn=True, lessons were distilled only when the reply arrived
during the same run. A reply that resumes a paused flow (resume /
resume_async after from_pending, which is how async providers such as
AMP's email review work) went through outcome collapse and routing but
never reached _distill_and_store_lessons, so it taught nothing.

Resume now stores lessons under the same conditions as an in-run reply:
memory available, non-empty feedback, the method's learn_source and
learn_strict, and the persisted LLM config. Both paths share one helper.
A strict distillation failure fails the resume before the pending review
is cleared, so it can be retried.

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

* fix(flow): undo the recorded reply when strict learning fails on resume

_finalize_human_feedback appends the reply to human_feedback_history and
sets last_human_feedback before lessons are stored. With learn_strict, a
distillation failure re-raises and the review stays pending, so a retry
on the same instance recorded the reply twice. Restore both on failure.
Lesson storage stays after outcome collapse, so a collapse failure never
leaves lessons behind to be stored again on retry.

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

* fix(flow): keep the reviewed output's type when learn=True pre-reviews it

Pre-review always returned PreReviewResult.improved_output, a str, so a
method returning a Pydantic model or a dict reached the reviewer, and
last_human_feedback.output, as a repr string. Text output is still
rewritten as text; a Pydantic model is now rewritten as the same model
(response_model=type(output)); other outputs are shown unchanged.

LiteLLM-routed models return structured output as a JSON string, which
PreReviewResult/DistilledLessons.model_validate rejected, so pre-review
and lesson storage silently did nothing for them. One parser now accepts
an instance, a JSON string, or a dict.

Docs (en, ar, ko, pt-BR): drop the nonexistent learn_limit, document
learn_source and learn_strict, say lessons are also learned from replies
that resume a paused flow, how each output type is pre-reviewed, and that
downstream steps should read last_human_feedback.output. Correct the
HumanFeedbackResult.output docstring and the learn/learn_strict field
descriptions.

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

* fix(flow): keep pre-review failures and unseen fields from leaking into the output

model_dump_json() ran before the pre-review try, so a Pydantic output that
cannot be serialized failed the feedback step even with learn_strict off.
It now runs inside the try and falls back to the original output.

A reviewed Pydantic model is rebuilt from what the LLM saw, so a SecretStr
(sent masked) or an excluded field (not sent) came back as the mask or the
default. Fields the review left unchanged now keep their original values.

Also pin that a retry after a persistence failure that follows lesson
storage offers the lessons to memory again.

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

* fix(flow): keep nested hidden values when pre-review edits sibling fields

The unchanged-field restore only looked at top-level fields, so editing a
sibling inside a nested model, or one item of a list of models, kept the
LLM's masked secret and default excluded values for that whole object.
The restore now recurses into nested models and same-length lists of
models.

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

* fix(flow): skip pre-review for models holding secrets or excluded fields

Restoring hidden values after the review kept growing edge cases: aliased
fields compared by name discarded the review's edit, dicts of models were
not recursed, and reordered lists paired the wrong items, which could
copy one account's secret onto another. Drop the merge. A Pydantic output
is pre-reviewed only when the LLM sees all of it; one holding a Secret,
SecretStr, SecretBytes or Field(exclude=True) value at any depth reaches
the reviewer unchanged. Docs updated in en, ar, ko and pt-BR.

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

* docs(flow): say a resumed review's Pydantic output arrives as a dict

PendingFeedbackContext persists method_output as JSON, so after
from_pending and resume, last_human_feedback.output is a dict even when
the method returned a model. The docstring and docs said "same type"
without that qualification. Also say learn_strict covers distillation
and submitting lessons, not the background memory write. Pin the dict
behavior with a pause/resume test. Docs in en, ar, ko and pt-BR.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 03:05:26 +00:00
Nora Reidy c0eda9f538 docs: consolidate MongoDB documentation improvements (#8097)
* docs: consolidate MongoDB documentation improvements

Combines previously closed MongoDB docs PRs (#6847, #6845, #6721,
#6626, #6760, #6759) into a single PR per the updated contribution
guidelines requiring a linked open issue.

RagTool only supports chromadb and qdrant as vector store backends;
MongoDB Atlas is covered separately by MongoDBVectorSearchTool, which
is already listed in the database-data tools overview, so the RagTool
data-sources bullet was dropped rather than reintroduced.

Fixes #8096

* revert gemini change

* ai review feedback

* memory wording

* translations
2026-10-13 11:36:15 +05:30
João MouraandClaude Opus 5.5 ab423144c1 docs: correct deploy and platform-tool guidance in the project AGENTS.md (#8084)
* docs: correct deploy and platform-tool guidance in the project AGENTS.md

The AGENTS.md that `crewai create` ships told coding agents that
`crewai deploy remove <id>` works (the CLI only takes `-u <uuid>`), that a
deploy needs a GitHub repository (with no origin it uploads a ZIP), that
PLATFORM_APPS is the source of truth for action selectors (some of its
action names resolve to no tool), and to measure quality with
`crewai test`. Its router example also declared no labels, so
`crewai flow plot` could not draw the branches.

- Template: platform token, selector syntax, `apps:` YAML example and
  selector check; router labels; deploy prerequisites, `-y`, `.env`
  upload, org commands, `project_id`; best practice points at
  `crewai eval` inside the eval markers.
- Docs: quickstart deploy prerequisite and `remove -u`, and router
  labels in concepts/flows, in en, ar, ko and pt-BR.
- Tests parse every documented deploy/org command against the real CLI,
  run the routing example through the plot builder, and check the best
  practices stay numbered without gaps for crew and tool projects.

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

* docs: base the quickstart ZIP-deploy note on any git origin

The CLI deploys from git whenever an `origin` exists, GitHub or not, and
uploads a ZIP only when there is none. The quickstart said "GitHub
origin ... without one", which reads as if a non-GitHub origin takes the
ZIP path.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 22:22:59 +00:00
João MouraandClaude Opus 5.5 744bf60367 fix(cli): show why a deployment failed and fix deploy remove and lockfile checks (#8083)
* fix(cli): show why a deployment failed and fix deploy remove and lockfile checks

- deploy status prints AMP's error_message and error_suggested_fix when a
  deployment has failed, verbatim (no Rich markup), instead of only
  "Provisioning Failed, try again."
- deploy remove -u names the removed UUID instead of the local project, and
  a failed removal prints the API's error.
- deploy validate asks `uv lock --check` (offline) whether uv.lock is current
  instead of comparing file times, which flagged metadata-only edits that
  `uv lock` never clears. File times remain the fallback without uv or for
  poetry.lock.

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

* docs: note that deploy status prints the failure reason

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

* fix(cli): print deploy validate findings without Rich markup

render_report printed codes, titles, details and hints as Rich markup, so
bracketed text vanished: `[stale_lockfile]`, `[project]`,
`[tool.hatch.build.targets.wheel]`, `crewai[tools]`. Raw `uv` stderr in
the new unverified_lockfile detail could also raise MarkupError on a stray
closing tag. Escape every finding field. Also bound the test fixture's
`uv lock` with a timeout.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 17:21:16 -03:00
Lorenze Jay 6b93fa0e25 [docs-freeze] docs: snapshot and changelog for v1.15.27 (#8004) 2026-10-09 19:33:27 -03:00
Melanie Hart Buehler 140bfcb89a docs(rag): add XPU to OpenCLIP provider device options (#7923) 2026-10-09 14:05:39 +00:00
Georgi AtsevandJoão Moura d38ceafb68 feat(llms): add deepinfra as an openai-compatible provider (#7459)
* feat(llms): add deepinfra as an openai-compatible provider

Register deepinfra in the OpenAI-compatible provider registry so
LLM(model="deepinfra/<org>/<model>") routes natively with DEEPINFRA_API_KEY
and no LiteLLM install. Model ids keep their org/model form,
DEEPINFRA_BASE_URL overrides the endpoint, and the docs accordion is added
in en, ar, ko and pt-BR, stating that the provider uses the native OpenAI
client and needs no LiteLLM install.

The model id check requires exactly one slash with both parts non-empty, and
it also runs on the explicit provider="deepinfra" path, where a malformed id
raises a ValueError that shows the expected form.

deepinfra/ model strings previously routed through LiteLLM; is_litellm=True
keeps that path.

* fix(llms): reject malformed deepinfra/ ids before the LiteLLM fallback

A deepinfra/<model> reference that is not org/model fell through to
LiteLLM, so the same bad id failed later and differently depending on
what was installed. The prefixed form now raises the same ValueError as
provider="deepinfra", with the example and the echoed value written the
way the caller wrote the id; both branches share one helper.

---------

Co-authored-by: João Moura <joaomdmoura@gmail.com>
2026-10-09 05:12:19 -03:00
João Moura bb235ef172 [docs-freeze] docs: snapshot and changelog for v1.15.26 (#7962) 2026-10-08 18:45:30 -03:00
Lorenze Jay 1d4015439a [docs-freeze] docs: snapshot and changelog for v1.15.25 (#7946) 2026-10-07 18:51:56 -05:00
Lorenze Jay d5efc45847 [docs-freeze] docs: snapshot and changelog for v1.15.24 (#7942) 2026-10-07 10:39:31 -07:00
Lorenze Jay c6bf5ef5d4 feat(flow): queue relevant background replies (OSS-192) (#7911)
* feat(flow): queue relevant background replies (OSS-192)

* fix(flow): fence queued output after shared reply interruption

* fix(flow): keep prepared delivery retries side effect free
2026-10-07 09:18:05 -07:00
Lorenze JayandVidit Ostwal 19d4154b0b feat(flow): add experimental turn and reply identities (OSS-197) (#7909)
* feat(flow): introduce experimental turn and public reply identities

This update adds a new module for handling public replies within an existing conversational flow. It introduces the `TurnRunner`, which manages the lifecycle of turns and replies, allowing for experimental features such as tracking input revisions and reply identities. The changes include new classes for `TurnRecord`, `ReplyRecord`, and `TurnState`, enhancing the flow's capabilities while maintaining backward compatibility with existing APIs. Additionally, tests have been added to ensure the functionality of the new features.

* fix docs

* fix(flow): preserve live turn state and terminal events

* fix(flow): remove redundant failure terminal marker

---------

Co-authored-by: Vidit Ostwal <110953813+Vidit-Ostwal@users.noreply.github.com>
2026-10-07 13:56:34 +05:30
Lorenze Jay 738c8e19e3 feat(flow): add experimental job lifecycle and runner (#7864) 2026-10-02 17:03:54 -07:00
Lorenze Jay deaa71e168 [docs-freeze] docs: snapshot and changelog for v1.15.23 (#7805) 2026-09-28 21:14:14 +00:00
Lorenze Jay 7a01af2791 [docs-freeze] docs: snapshot and changelog for v1.15.22 (#7521) 2026-09-16 15:09:40 -07:00
5990ead5ec feat(cli): record why a deployment create failed (#7451)
* feat(cli): record why a deployment create failed

`crewai deploy create` counts every attempt (`Create Crew Deployment`) and every
success (`Crew Deployment Created`), but the gap between them carried no cause:
among clients able to emit the success span, the CLI succeeds 96.7% of the time
and the run TUI 36.4%, and nothing said why. A third span, `Crew Deployment
Failed`, now fires for every failure after the attempt is counted, with a closed
vocabulary `reason` (api_4xx, api_5xx, invalid_response, network_error,
zip_error, user_declined, unexpected), the HTTP `status_code` when the API
answered, and the existing `source`. Never the error message.

The request path is factored into `_request_crew_creation`; every exception is
classified, reported and re-raised unchanged, so CLI and TUI behaviour is the
same as before. HTTP failures are classified before `_validate_response`, which
still prints and exits as it did.

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

* fix(cli): classify deploy create failures by status and by stage

Review fixes on the failure span. Check the HTTP class before the body so a
gateway's HTML page counts as api_4xx / api_5xx with its code. Treat a 2xx
whose body is not a JSON object carrying uuid and status as invalid_response
and exit cleanly, instead of emitting a success span and crashing in the
display step. Recognise archive failures by a dedicated ArchiveError
(a ValueError) raised from create_project_zip, so the git helpers' own
ValueErrors no longer read as zip_error; a failed ZIP write is wrapped and
its partial file removed.

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

* fix(cli): treat staging and temp-file failures as archive errors

`create_project_zip` only wrapped the ZIP write, so an `OSError` while
staging files or creating the temporary archive escaped as a bare
`OSError` and the deploy command recorded it as `unexpected` instead of
`zip_error`. The archive boundary now covers staging, temp-file creation
and the write; the staging directory is removed on every path, and no
partial archive is left behind.

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

* feat(cli): tell a non-JSON 2xx apart from a non-creation 2xx

A proxy's 200 HTML page and a JSON body missing the creation fields were
both recorded as `invalid_response`. They are different failures, one in
the network path and one in the API contract, so the deploy failure span
now records `invalid_json` for the first and `invalid_creation_response`
for the second. Requested in review.

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

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
Co-authored-by: Vidit Ostwal <110953813+Vidit-Ostwal@users.noreply.github.com>
2026-09-16 23:37:14 +05:30
João MouraandClaude Fable 5.1 6b6a39d503 fix(events): Improve coding agents instructions (#7447)
* feat: scaffold project with assistant instruction files

- Updated project creation to include `CLAUDE.md` and `GEMINI.md` that import `AGENTS.md`, ensuring consistent guidance across coding assistants.
- Implemented utility functions to copy assistant instruction files during project setup.
- Enhanced documentation in `AGENTS.md` to emphasize the importance of keeping telemetry enabled for optimal performance.
- Added tests to verify the correct scaffolding of assistant instruction files and their contents.

* fix(cli): neutral observability guidance in scaffolded AGENTS.md

- State the observability rule as the user's decision, never a fix for
  console warnings, speed, or a "clean" configuration
- Rewrite the AMP section as built-in capabilities: no "free",
  "proactively", "sales pitch", or scripted pitches
- Turn the research mandate into a list of sources to consult when
  version details matter
- Retarget the scaffold tests to the new wording

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

* fix(cli): scaffold assistant files for JSON crews and harden telemetry tests

- create_json_crew, the default `crewai create crew` path, now copies
  AGENTS.md, CLAUDE.md and GEMINI.md; AGENTS.md documents the JSON layout
- span helper no longer depends on OTEL_SDK_DISABLED being popped by an
  earlier test; thread-scope test stops its worker before leaving the mock
- single import style in the shutdown test

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

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-16 02:07:57 -03:00
Lorenze Jay 993a96c4e0 feat(tracing): port trace events sessions to OSS (#7464)
* feat(tracing): port enterprise event sessions to OSS

* fix(tracing): address review findings and verify concurrent exports

* fix(tracing): keep redactor ownership in enterprise integrations

* test(tracing): isolate intentional failures from cleanup assertions
2026-09-15 13:09:40 -07:00
Melanie Hart BuehlerandVidit Ostwal 21678f8ac6 docs(rag): add xpu to embedding device options (#6808)
* docs(rag): add xpu to embedding device options

* address copilot review

* docs(rag): sync Korean and Portuguese RagTool pages

---------

Co-authored-by: Vidit Ostwal <110953813+Vidit-Ostwal@users.noreply.github.com>
2026-09-14 05:51:43 +00:00
Gamal OsamaandVidit Ostwal c860613c7a feat(embeddings): add openrouter as a supported embedding provider (#7127)
* feat(embeddings): add openrouter provider type definitions

* feat(embeddings): implement OpenRouterProvider

* feat(embeddings): export openrouter provider package symbols

* feat(embeddings): register openrouter in allowed embedding providers

* feat(embeddings): register openrouter provider and overloads in factory

* feat(tools): add openrouter embedding service support

* test(embeddings): add comprehensive openrouter provider and factory tests

* test(embeddings): add openrouter build test in embedding factory

* test(embeddings): add openrouter model key alias and env tests

* test(tools): add openrouter tests for embedding service

* docs: add openrouter embedder configuration example

* docs(ar): sync openrouter embedder translation

* docs(ko): sync openrouter embedder translation

* docs(pt-BR): sync openrouter embedder translation

* feat(embeddings): allow model alias and None fields in OpenRouterProviderConfig

* fix(tools): resolve EMBEDDINGS_OPENROUTER_API_KEY before OPENROUTER_API_KEY

* test(tools): add regression tests for openrouter env var precedence and fallback

* feat(embeddings): drop organization_id and resolve api_key via OPENROUTER_API_KEY only

* fix(tools): use OPENROUTER_API_KEY in embedding service and update tests

* docs: switch openrouter knowledge example to model_name and document OPENROUTER_API_KEY

* fix(tools): default openrouter model to namespaced openai/text-embedding-3-small

---------

Co-authored-by: Vidit Ostwal <110953813+Vidit-Ostwal@users.noreply.github.com>
2026-09-10 12:24:15 +05:30
Lorenze Jay a8d330de00 [docs-freeze] docs: snapshot and changelog for v1.15.21 (#7363) 2026-09-09 22:54:07 +00:00
João MouraandClaude Opus 5 d729cade6b fix(openai): surface gateway errors reported inside an HTTP 200 (#7342)
* fix(openai): surface gateway errors reported inside an HTTP 200

OpenAI-compatible gateways commit `200 OK` as soon as the upstream provider
accepts a request, so a later provider failure arrives in the body as an
`error` object with no `choices`. That reached the SDK's parse helper and
surfaced as `TypeError: 'NoneType' object is not iterable`, naming neither the
provider, the status, nor the fact that a timeout happened.

The four non-streaming paths now inspect the raw body before parsing and raise
the exception the upstream code maps to, so a masked 504 is catchable exactly
like an honest one. Streaming already had this guard inside the SDK.

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

* test(openai): teach the tool-cache fake about with_raw_response

The provider now reads the raw body before parsing, so a client double that
only implements `create` no longer satisfies it. Same shape as the fixes to the
reasoning-effort retry and Snowflake doubles.

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

* test(tracing): reset the TraceCollectionListener singleton between tests

TraceCollectionListener caches a TraceBatchManager on the class and
`_initialized` short-circuits `__init__`, so batch state survives for the whole
xdist worker. `test_nested_agent_executor_flow_does_not_finalize_parent_batch`
left `trace_batch_id="debug-trace-batch"` behind, which moved every later trace
POST from /tracing/ephemeral/batches to /tracing/batches/<id>/events. The
recorded cassette then stopped matching, the agent retried, and the second call
found the cassette consumed -- surfacing as ConnectionError in an unrelated
test hundreds of tests later.

Reproduced deterministically by running the leaking test followed by
tests/tracing/test_trace_enable_disable.py::test_trace_calls_when_enabled_via_env;
fails on a68b5e903 too, so this predates the gateway fix it was blocking.

An autouse fixture now clears the cached instance after each test. Two canaries
pin the invariant and fail without the fixture.

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

* test(tracing): drop the unwritable _listeners_setup canary

Both review bots flagged that the canary read `_listeners_setup` off the class,
where it is always False, so it could never fail. Correct, and the suggested fix
does not work either: `BaseEventListener.__init__` calls `setup_listeners`
(base_event_listener.py:16), which sets the flag on the instance
(trace_listener.py:229), so reading it back through `TraceCollectionListener()`
is always True. Neither read observes a leak, so the canary is deleted rather
than replaced, with the reasoning recorded so it is not re-added.

The same finding showed the fixture was resetting two class attributes that are
never assigned at class level. Only dropping `_instance` is load-bearing, so the
fixture is now one line.

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

* docs(tracing): correct why the _listeners_setup canary is unwritable

setup_listeners returns early when tracing is off and no override applies
(trace_listener.py:213-220), assigning the flag at :229 only when it actually
registers. Construction therefore does not always set it, as the previous note
claimed: with tracing disabled the flag never even reaches the instance dict.

The instance read reports ambient tracing state rather than isolation, which is
a better reason not to assert on it than the one recorded before.

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

* fix(tests): clear trace batch state in place instead of dropping the singleton

Dropping `TraceCollectionListener._instance` made the next construction re-run
`setup_listeners`, re-registering its handlers on the event bus. That broke
tests/telemetry/test_task_failure_instrumentation.py, which requires exactly one
handler per event: the re-registered `on_task_failed` made two. Verified against
a53ecc17f, where the same sequence passes -- the regression was mine.

The leak that needed fixing was batch state, not registration, so the fixture
now clears the manager's batch fields in place. Handler cleanup already belongs
to `cleanup_event_handlers`, and `first_time_handler` keeps its reference to the
same manager object.

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

* fix(tests): clear tracing context vars so the listener can re-register

Bugbot flagged that keeping the singleton leaves `_listeners_setup` set, so after
`cleanup_event_handlers` wipes the bus `setup_listeners` returns early
(trace_listener.py:208) and tracing silently registers nothing for the rest of
the worker. Confirmed: after a tracing-enabled run, re-running setup restores 0
of 119 handler entries.

Dropping the singleton fixes that but previously broke
test_task_failure_instrumentation. The real cause was a third leak: the
`_tracing_enabled` context var stayed set, so the replacement listener still
believed tracing was on and re-registered `on_task_failed` next to telemetry's.
Clearing the context vars is what makes replacing the listener safe, so the
fixture now does both, and a canary pins it (fails with `assert True is False`
without the drop).

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

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-09 15:12:57 -07:00
Vidit Ostwal 4ed4aba6cd fix(cli): keep deploy push on the AMP create source (#7345)
Push was choosing ZIP vs git from a local origin remote, so adding origin later rebuilt the last ZIP with no files. Prefer AMP zip_deployment from status, and fall back to the old origin heuristic when that field is missing.
2026-09-10 00:23:40 +05:30
b92e80be53 chore(tools): make the vision_tool more dynamic (#7350)
* chore(tools): make the vision_tool more dynamic

* tackle review comments

* chore: update tool specifications

* refactor(tools): simplify vision tool model selection

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: ViditOstwal <viditostwal@gmail.com>
Co-authored-by: Vidit Ostwal <110953813+Vidit-Ostwal@users.noreply.github.com>
2026-09-09 22:18:53 +05:30
Vidit Ostwal 79befd0ce5 docs: clarify that tracing is managed separately from telemetry (#7311)
Users who disable telemetry still need the tracing docs to understand first-run trace viewing and how the two settings relate.
2026-09-08 23:08:10 +05:30
oxy-giedriusandClaude Opus 5 fe62d04cdb fix(oxylabs): report scrape failures instead of raising IndexError (#7044)
* fix(oxylabs): report scrape failures instead of raising IndexError

The oxylabs SDK logs HTTP errors and returns an empty response rather than
raising, so the unchecked `response.results[0]` in every Oxylabs tool turned a
rejected request into `IndexError: list index out of range`. Invalid credentials
-- the most likely first-run mistake -- gave no indication of the cause. A
result carrying a non-2xx `status_code` had the same problem one level down: the
job ran, the page did not come back, and the tool returned its empty content as
though the scrape had succeeded, handing the agent "[]".

Both are now reported as a `ToolFailure` naming what went wrong, so the agent
gets something it can act on and the framework records the call as failed:

    401 Unauthorized
    400 Bad Request - Parameter `parsing_instructions` can be used just with
    `parse` parameter set to `true`.

Because the SDK keeps the cause only in its own log, the failing call is run
with a handler attached to the `oxylabs` logger and the status, the API's
explanation and timeouts are read back off it. `code` and `retryable` are set
from the status, so 429 and 5xx are marked worth retrying. Nothing about the
caller's logging configuration is changed; an application that has silenced the
SDK still gets the generic failure.

Content that is neither a string nor a dict is also serialized properly:
`parsing_instructions` commonly yields a list, and the previous `str()`
fallback produced a Python repr with single quotes instead of JSON.

The client construction and response handling these four tools duplicated
verbatim now live in a shared `OxylabsBaseTool`, following the existing
`SerpApiBaseTool` pattern, so the handling above exists in one place. The
generated tool specs change only by the new `locale` field, confirming the
tools' public surface is otherwise untouched.

Also add the `locale` option to the Google Search config, which the docs
already documented but the config model silently dropped, and correct two
copy-paste errors in the docs across all four locales.

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

* fix(oxylabs): keep concurrent scrape diagnoses apart

The error capture attached a fresh handler to the shared `oxylabs` logger for
each scrape, so two scrapes in flight at once each saw both errors. `_diagnose`
reads the first HTTP status it finds, so a timeout could be reported as the
other request's 400 -- `retryable=False` on a failure that was worth retrying.

One handler now serves every scrape and routes each record to the capture of
the call that caused it via a `ContextVar`, which isolates threads and asyncio
tasks alike. Serializing the captures would have fixed the cross-talk too, but
at the cost of running every scrape one at a time. The handler stays attached
once installed: it is inert outside a capture, and detaching it would race with
concurrent scrapes.

The regression test forces the interleaving -- one capture is held open while
the other call logs -- and fails against the previous implementation.

Also drive `config` through the public constructor in the tests instead of
assigning `__dict__["config"]`, so they would catch `__init__` dropping a
supplied config.

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

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-08 12:42:48 +05:30
143e902178 docs: use organization UUIDs in the skill install reference (#7273)
Organization names are not unique, so the documented `@org/name` form can
resolve to the wrong organization and fail to find the skill. Document the
`@org-uuid/name` form instead, and add a note pointing at `crewai org list`
for the UUID.

Applies to the agent-side registry refs too: they resolve through the same
`/skills/:org/:name` endpoint and the same `~/.crewai/skills/{org}/{name}/`
cache path, so leaving them as `@acme` would contradict the install command.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Vidit Ostwal <110953813+Vidit-Ostwal@users.noreply.github.com>
2026-09-04 13:26:07 -07:00
João Moura a024115e4e [docs-freeze] docs: snapshot and changelog for v1.15.20 (#7271) 2026-09-04 09:42:07 -03:00
João Moura 04e2efbdab [docs-freeze] docs: snapshot and changelog for v1.15.19 (#7266) 2026-09-04 08:28:16 -03:00
Fang KaiqiandVidit Ostwal b608a3595c docs: remove CodeInterpreterTool from AI/ML overview examples (#7100)
Co-authored-by: Vidit Ostwal <110953813+Vidit-Ostwal@users.noreply.github.com>
2026-09-02 10:31:18 +05:30