Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/crewAIInc/crewAI
/ functions
Functions
13,282 in github.com/crewAIInc/crewAI
⨍
Functions
13,282
◇
Types & classes
2,710
↳
Endpoints
764
↓ 23 callers
Function
_mock_response
Build a ``requests.Response``-like mock with the attributes used by ``_make_request``.
lib/crewai-tools/tests/tools/brave_search_tool_test.py:37
↓ 23 callers
Method
reset
Reset (delete all) memories in scope. Args: scope: Scope to reset. If None and root_scope is set, resets only wit
lib/crewai/src/crewai/memory/unified_memory.py:1015
↓ 23 callers
Function
reset_emission_counter
Reset the emission sequence counter to 1. Resets for the current context only.
lib/crewai/src/crewai/events/base_events.py:49
↓ 22 callers
Method
_generate_description
(self)
lib/crewai-tools/src/crewai_tools/tools/patronus_eval_tool/patronus_eval_tool.py:102
↓ 22 callers
Method
get
Look up a node by event ID. Args: event_id: The event's unique identifier. Returns: The node, or None if not
lib/crewai/src/crewai/state/event_record.py:148
↓ 22 callers
Method
supports_multimodal
Check if the model supports multimodal inputs. For litellm, check common vision-enabled model prefixes. Returns: True if
lib/crewai/src/crewai/llm.py:2670
↓ 21 callers
Method
_effective_stream
Return the call-scoped streaming mode for this instance.
lib/crewai/src/crewai/llms/base_llm.py:237
↓ 21 callers
Method
_emit_call_started_event
Emit LLM call started event.
lib/crewai/src/crewai/llms/base_llm.py:545
↓ 21 callers
Function
_run_without_import_check
Run validation with the subprocess-based import check stubbed out; the classifier is exercised directly in its own tests below.
lib/cli/tests/deploy/test_validate.py:104
↓ 21 callers
Method
copy
Create a deep copy of the Agent.
lib/crewai/src/crewai/agents/agent_builder/base_agent.py:689
↓ 21 callers
Function
get_platform_integration_token
Get the platform integration token from the current context or environment. Returns: The integration token if set, otherwise None.
lib/crewai/src/crewai/context.py:39
↓ 21 callers
Method
post
(ctx)
lib/crewai/tests/hooks/test_interception_conformance.py:128
↓ 21 callers
Method
query
Query across all knowledge sources to find the most relevant information. Returns the top_k most relevant chunks. Raises:
lib/crewai/src/crewai/knowledge/knowledge.py:135
↓ 21 callers
Method
retrieve
Retrieve a prompt by kind and key. Args: kind: The kind of prompt. key: The key of the specific prompt to retrieve.
lib/crewai/src/crewai/utilities/i18n.py:100
↓ 21 callers
Method
save
(self, documents)
lib/crewai/tests/agents/test_agent.py:1917
↓ 21 callers
Function
summarize_messages
Summarize messages to fit within context window. Uses structured context compaction: preserves system messages, splits at message boundaries,
lib/crewai/src/crewai/utilities/agent_utils.py:995
↓ 20 callers
Function
_create_analyst_agent
Create a simple analyst agent for file analysis.
lib/crewai/tests/test_agent_multimodal.py:104
↓ 20 callers
Function
create_init_file
(directory, content)
lib/crewai/tests/cli/test_utils.py:21
↓ 20 callers
Function
create_smart_task
Smart task factory that automatically assigns a mock agent when guardrails are present. This maintains backward compatibility while handling
lib/crewai/tests/test_task_guardrails.py:17
↓ 20 callers
Method
errors
Retrieve an error message by key. Args: error: The key of the error message to retrieve. Returns: The error
lib/crewai/src/crewai/utilities/i18n.py:67
↓ 20 callers
Method
feature_usage_span
Records that a feature was used. One span = one count. Args: feature: Feature identifier, e.g. "planning:creation",
lib/crewai/src/crewai/telemetry/telemetry.py:1045
↓ 20 callers
Function
get_crewai_version
Return the installed crewAI version string. Falls back to ``"unknown"`` when neither crewai nor crewai-core are pip-installed (e.g. running d
lib/crewai-core/src/crewai_core/version.py:25
↓ 20 callers
Function
is_context_length_exceeded
Check if the exception is due to context length exceeding. Args: exception: The exception to check Returns: bool: True if th
lib/crewai/src/crewai/utilities/agent_utils.py:773
↓ 20 callers
Function
join_scope_paths
Join a root scope with an inner scope, handling edge cases properly. Args: root: The root scope prefix (e.g. '/crew/research-crew').
lib/crewai/src/crewai/memory/utils.py:67
↓ 20 callers
Method
r_locked
Context manager for acquiring a read lock. Yields: None
lib/crewai/src/crewai/utilities/rw_lock.py:45
↓ 20 callers
Function
validate_file_path
Validate that a file path is safe to read. Resolves symlinks and ``..`` components, then checks that the resolved path falls within *base_dir
lib/crewai-tools/src/crewai_tools/security/safe_path.py:77
↓ 19 callers
Method
_handle_trace_event
Generic handler for context end events. Args: event_type: Type of the event. source: Source object that triggered the
lib/crewai/src/crewai/events/listeners/tracing/trace_listener.py:876
↓ 19 callers
Function
_sanitize_collection_name
Sanitize a collection name to meet ChromaDB requirements. Requirements: 1. 3-63 characters long 2. Starts and ends with alphanumeric char
lib/crewai/src/crewai/rag/chromadb/utils.py:296
↓ 19 callers
Function
format_multimodal_content
Format text and files as provider-specific multimodal content blocks. This is the main high-level API for converting files to content blocks
lib/crewai-files/src/crewai_files/formatting/api.py:82
↓ 19 callers
Method
from_pending
Create a Flow instance from a pending feedback state. This classmethod is used to restore a flow that was paused waiting for async hu
lib/crewai/src/crewai/flow/runtime/__init__.py:1168
↓ 19 callers
Method
get_token_usage_summary
Get summary of token usage for this LLM instance. The counters are cumulative for the lifetime of this instance: they grow across eve
lib/crewai/src/crewai/llms/base_llm.py:966
↓ 19 callers
Method
resolve
Resolve a file to its delivery format for a provider. Args: file: The file to resolve. provider: Provider name (e.g.,
lib/crewai-files/src/crewai_files/resolution/resolver.py:164
↓ 19 callers
Function
run_command
Run a shell command and return output. Args: cmd: Command to run as list of strings. cwd: Working directory for command. Ret
lib/devtools/src/crewai_devtools/cli.py:65
↓ 18 callers
Method
__setattr__
(self, name: str, value: Any)
lib/crewai/src/crewai/llms/base_llm.py:196
↓ 18 callers
Method
_prepare_responses_params
Prepare parameters for OpenAI Responses API. The Responses API uses a different structure than Chat Completions: - `input` instead of
lib/crewai/src/crewai/llms/providers/openai/completion.py:795
↓ 18 callers
Method
arun
Executes the tool asynchronously. Args: *args: Positional arguments for the tool. **kwargs: Keyword arguments for the
lib/crewai/src/crewai/tools/base_tool.py:554
↓ 18 callers
Method
fail
(params, **kwargs)
lib/crewai/tests/llms/openai/test_tools_reasoning_effort_retry.py:177
↓ 18 callers
Function
register_after_tool_call_hook
Register a global after_tool_call hook. Global hooks are added to all tool executions automatically. This is a convenience function for regis
lib/crewai/src/crewai/hooks/tool_hooks.py:244
↓ 18 callers
Function
register_before_tool_call_hook
Register a global before_tool_call hook. Global hooks are added to all tool executions automatically. This is a convenience function for regi
lib/crewai/src/crewai/hooks/tool_hooks.py:207
↓ 18 callers
Method
remember_many
Store multiple items in memory (non-blocking). The encoding pipeline runs in a background thread. This method returns immediately so
lib/crewai/src/crewai/memory/unified_memory.py:523
↓ 18 callers
Function
to_serializable
Converts a Python object into a JSON-compatible representation. Supports primitives, datetime objects, collections, dictionaries, dataclasses
lib/crewai/src/crewai/utilities/serialization.py:18
↓ 18 callers
Method
w_locked
Context manager for acquiring a write lock. Yields: None
lib/crewai/src/crewai/utilities/rw_lock.py:71
↓ 17 callers
Method
_handle_tool_execution
Handle tool execution with proper event emission. Args: function_name: Name of the function to execute function_args:
lib/crewai/src/crewai/llms/base_llm.py:714
↓ 17 callers
Function
_is_python_ref
(value: Any)
lib/crewai/src/crewai/project/json_loader.py:608
↓ 17 callers
Method
_prepare_completion_params
Prepare parameters for the completion call. Args: messages: Input messages for the LLM tools: Optional list of tool s
lib/crewai/src/crewai/llm.py:748
↓ 17 callers
Method
_validate_tool_input
(self, tool_input: str | None)
lib/crewai/src/crewai/tools/tool_usage.py:884
↓ 17 callers
Method
aexecute_sync
Execute the task asynchronously using native async/await.
lib/crewai/src/crewai/task.py:627
↓ 17 callers
Method
create_status_content
Create standardized status content with consistent formatting.
lib/crewai/src/crewai/events/utils/console_formatter.py:158
↓ 17 callers
Method
get_authorize_url
(self)
lib/crewai-core/src/crewai_core/auth/providers/okta.py:11
↓ 17 callers
Method
get_by_step_number
Get a todo by its step number.
lib/crewai/src/crewai/utilities/planning_types.py:83
↓ 17 callers
Method
get_issuer
(self)
lib/crewai-core/src/crewai_core/auth/providers/okta.py:20
↓ 17 callers
Method
get_jwks_url
(self)
lib/crewai-core/src/crewai_core/auth/providers/okta.py:17
↓ 17 callers
Method
get_token_url
(self)
lib/crewai-core/src/crewai_core/auth/providers/okta.py:14
↓ 17 callers
Function
in_temp_dir
()
lib/cli/tests/skills/test_main.py:20
↓ 17 callers
Method
publish
(self, is_public: bool, force: bool = False)
lib/cli/src/crewai_cli/tools/main.py:104
↓ 17 callers
Method
resume
Resume flow execution, optionally with human feedback. This method continues flow execution after a flow was paused for async human f
lib/crewai/src/crewai/flow/runtime/__init__.py:1254
↓ 17 callers
Method
to_pydantic
Convert text to pydantic. Args: current_attempt: The current attempt number for conversion retries. Returns:
lib/crewai/src/crewai/utilities/converter.py:84
↓ 16 callers
Function
_event
(type: str, **kwargs)
lib/crewai/tests/test_event_record.py:15
↓ 16 callers
Function
_make
Create a SkillFrontmatter with the given name.
lib/crewai/tests/skills/test_validation.py:14
↓ 16 callers
Function
_snowflake_env
(monkeypatch: pytest.MonkeyPatch)
lib/crewai/tests/llms/snowflake/test_snowflake.py:16
↓ 16 callers
Method
add
(self, event: BaseEvent)
lib/crewai/tests/events/test_event_ordering.py:41
↓ 16 callers
Method
call
Call OpenAI API (Chat Completions or Responses based on api setting). Args: messages: Input messages for the completion.
lib/crewai/src/crewai/llms/providers/openai/completion.py:428
↓ 16 callers
Method
close
Drain pending saves, flush storage, and shut down the background thread pool.
lib/crewai/src/crewai/memory/unified_memory.py:365
↓ 16 callers
Method
close
Flush local shard to central and clean up.
lib/crewai/src/crewai/memory/storage/qdrant_edge_storage.py:796
↓ 16 callers
Method
generate_doc_id
Generate a unique document id based on the source reference and content. If the source reference is not provided, the content is used as the s
lib/crewai-tools/src/crewai_tools/rag/base_loader.py:27
↓ 16 callers
Function
get_before_tool_call_hooks
Get all registered global before_tool_call hooks. Returns: List of registered before hooks
lib/crewai/src/crewai/hooks/tool_hooks.py:275
↓ 16 callers
Method
neighbors
Return neighbor IDs for a given edge type. Args: edge_type: The relationship type to query. Returns: List of
lib/crewai/src/crewai/state/event_record.py:87
↓ 16 callers
Method
read
(self)
lib/crewai-tools/tests/file_read_tool_test.py:29
↓ 16 callers
Method
save_pending_feedback
Save state with a pending feedback marker. This method stores both the flow state and the pending feedback context, allowing the flow
lib/crewai/src/crewai/flow/persistence/sqlite.py:205
↓ 16 callers
Method
stop
Stop the MCP server.
lib/crewai-tools/src/crewai_tools/adapters/mcp_adapter.py:196
↓ 15 callers
Method
__post_init__
(self)
lib/crewai/src/crewai/a2a/errors.py:141
↓ 15 callers
Function
_create_azure_responses
Create an AzureCompletion(api='responses'). Must be called inside a context where OpenAICompletion is already mocked (i.e. via the ``mock_ope
lib/crewai/tests/llms/azure/test_azure_responses.py:54
↓ 15 callers
Method
_emit_call_failed_event
Emit LLM call failed event.
lib/crewai/src/crewai/llms/base_llm.py:638
↓ 15 callers
Function
_find_latest_non_yanked_version
Return the latest non-prerelease, non-yanked version from PyPI releases.
lib/crewai-core/src/crewai_core/version.py:61
↓ 15 callers
Method
_format_messages_for_anthropic
Format messages for Anthropic API. Anthropic has specific requirements: - System messages are separate from conversation messages
lib/crewai/src/crewai/llms/providers/anthropic/completion.py:736
↓ 15 callers
Function
_rec
( content: str = "test", scope: str = "/", categories: list[str] | None = None, importance: fl
lib/crewai/tests/memory/test_qdrant_edge_storage.py:35
↓ 15 callers
Method
from_function
Create a tool from a function. Args: func: The function to create a tool from name: The name of the tool. Defaults to
lib/crewai/src/crewai/tools/structured_tool.py:228
↓ 15 callers
Method
get_audience
(self)
lib/crewai-core/src/crewai_core/auth/providers/okta.py:23
↓ 15 callers
Function
load_agent
Load an existing ``Agent`` from a ``.json`` / ``.jsonc`` definition file.
lib/crewai/src/crewai/project/json_loader.py:236
↓ 15 callers
Method
store
Unpack an archive into the cache and write metadata. Uses tarfile with filter='data' for path-traversal protection. Args:
lib/crewai/src/crewai/skills/cache.py:84
↓ 15 callers
Method
supports_function_calling
Check if the model supports function calling.
lib/crewai/src/crewai/llms/providers/azure/completion.py:1264
↓ 15 callers
Function
validate_jwt_token
Verify a JWT's signature and claims using PyJWT. Args: jwt_token: The JWT (JWS) string to validate. jwks_url: The URL of the JWKS
lib/crewai-core/src/crewai_core/auth/utils.py:13
↓ 14 callers
Method
_add
( self, severity: Severity, code: str, title: str, detail: str = "",
lib/cli/src/crewai_cli/deploy/validate.py:134
↓ 14 callers
Function
_make_list_flow
()
lib/crewai/tests/test_flow.py:2217
↓ 14 callers
Function
_scaffold_standard_crew
( root: Path, *, name: str = "my_crew", include_crew_py: bool = True, include_agents_yaml:
lib/cli/tests/deploy/test_validate.py:52
↓ 14 callers
Method
add_documents
Add documents with their embeddings to a collection. Keyword Args: collection_name: The name of the collection to add documents t
lib/crewai/src/crewai/rag/qdrant/client.py:234
↓ 14 callers
Method
discard
(self)
lib/crewai/tests/test_flow_from_definition.py:3662
↓ 14 callers
Method
drain_writes
Block until all pending background saves have completed. Called automatically by ``recall()`` and should be called by the crew at shu
lib/crewai/src/crewai/memory/unified_memory.py:350
↓ 14 callers
Function
format_message_for_llm
Format a message for the LLM. Args: prompt: The message content. role: The role of the message sender, either 'user' or 'assist
lib/crewai/src/crewai/utilities/agent_utils.py:428
↓ 14 callers
Function
get_conversion_instructions
Generate conversion instructions based on the model and LLM capabilities. Args: model: A Pydantic model class. llm: The language
lib/crewai/src/crewai/utilities/converter.py:530
↓ 14 callers
Method
load
Load all task output records from the database. Returns: List of dictionaries containing task output records, ordered by task_ind
lib/crewai/src/crewai/memory/storage/kickoff_task_outputs_storage.py:162
↓ 14 callers
Method
pause_live_updates
Pause Live session updates to allow for human input without interference. This stops any active streaming Live session to prevent console ref
lib/crewai/src/crewai/events/utils/console_formatter.py:191
↓ 14 callers
Function
platform_context
Context manager to temporarily set the platform integration token. Args: integration_token: The integration token to set within the context
lib/crewai/src/crewai/context.py:52
↓ 14 callers
Function
sanitize_scope_name
Sanitize a name for use in hierarchical scope paths. Converts to lowercase, replaces non-alphanumeric chars (except underscore and hyphen) wi
lib/crewai/src/crewai/memory/utils.py:8
↓ 14 callers
Method
set
Sync wrapper for aset.
lib/crewai-files/src/crewai_files/cache/upload_cache.py:429
↓ 14 callers
Method
to_structured_tool
(self)
lib/crewai/tests/utilities/test_planning_handler.py:125
↓ 14 callers
Function
wait_for_event_handlers
Wait for all pending event handlers to complete. This helper ensures all sync and async handlers finish processing before proceeding. Useful
lib/crewai/tests/utils.py:7
↓ 13 callers
Method
_initialize_backend_batch
Send batch initialization to backend
lib/crewai/src/crewai/events/listeners/tracing/trace_batch_manager.py:126
↓ 13 callers
Method
_invoke_after_llm_call_hooks
Invoke after_llm_call hooks for direct LLM calls (no agent context). This method should be called by native provider implementations after
lib/crewai/src/crewai/llms/base_llm.py:1042
↓ 13 callers
Function
_is_version_yanked
Return ``(yanked, reason)`` for ``version_str`` against PyPI releases.
lib/crewai-core/src/crewai_core/version.py:91
← previous
next →
101–200 of 13,282, ranked by callers