diff --git a/docs/changelog.mdx b/docs/changelog.mdx new file mode 100644 index 000000000..3f17934bc --- /dev/null +++ b/docs/changelog.mdx @@ -0,0 +1,187 @@ +--- +title: Changelog +description: View the latest updates and changes to CrewAI +icon: timeline +--- + + + **Features** + - Converted tabs to spaces in `crew.py` template + - Enhanced LLM Streaming Response Handling and Event System + - Included `model_name` + - Enhanced Event Listener with rich visualization and improved logging + - Added fingerprints + + **Bug Fixes** + - Fixed Mistral issues + - Fixed a bug in documentation + - Fixed type check error in fingerprint property + + **Documentation Updates** + - Improved tool documentation + - Updated installation guide for the `uv` tool package + - Added instructions for upgrading crewAI with the `uv` tool + - Added documentation for `ApifyActorsTool` + + + + **Core Improvements & Fixes** + - Fixed issues with missing template variables and user memory configuration + - Improved async flow support and addressed agent response formatting + - Enhanced memory reset functionality and fixed CLI memory commands + - Fixed type issues, tool calling properties, and telemetry decoupling + + **New Features & Enhancements** + - Added Flow state export and improved state utilities + - Enhanced agent knowledge setup with optional crew embedder + - Introduced event emitter for better observability and LLM call tracking + - Added support for Python 3.10 and ChatOllama from langchain_ollama + - Integrated context window size support for the o3-mini model + - Added support for multiple router calls + + **Documentation & Guides** + - Improved documentation layout and hierarchical structure + - Added QdrantVectorSearchTool guide and clarified event listener usage + - Fixed typos in prompts and updated Amazon Bedrock model listings + + + + **Core Improvements & Fixes** + - Enhanced LLM Support: Improved structured LLM output, parameter handling, and formatting for Anthropic models + - Crew & Agent Stability: Fixed issues with cloning agents/crews using knowledge sources, multiple task outputs in conditional tasks, and ignored Crew task callbacks + - Memory & Storage Fixes: Fixed short-term memory handling with Bedrock, ensured correct embedder initialization, and added a reset memories function in the crew class + - Training & Execution Reliability: Fixed broken training and interpolation issues with dict and list input types + + **New Features & Enhancements** + - Advanced Knowledge Management: Improved naming conventions and enhanced embedding configuration with custom embedder support + - Expanded Logging & Observability: Added JSON format support for logging and integrated MLflow tracing documentation + - Data Handling Improvements: Updated excel_knowledge_source.py to process multi-tab files + - General Performance & Codebase Clean-Up: Streamlined enterprise code alignment and resolved linting issues + - Adding new tool: `QdrantVectorSearchTool` + + **Documentation & Guides** + - Updated AI & Memory Docs: Improved Bedrock, Google AI, and long-term memory documentation + - Task & Workflow Clarity: Added "Human Input" row to Task Attributes, Langfuse guide, and FileWriterTool documentation + - Fixed Various Typos & Formatting Issues + + + + **Features** + - Add Composio docs + - Add SageMaker as a LLM provider + + **Fixes** + - Overall LLM connection issues + - Using safe accessors on training + - Add version check to crew_chat.py + + **Documentation** + - New docs for crewai chat + - Improve formatting and clarity in CLI and Composio Tool docs + + + + **Features** + - Conversation crew v1 + - Add unique ID to flow states + - Add @persist decorator with FlowPersistence interface + + **Integrations** + - Add SambaNova integration + - Add NVIDIA NIM provider in cli + - Introducing VoyageAI + + **Fixes** + - Fix API Key Behavior and Entity Handling in Mem0 Integration + - Fixed core invoke loop logic and relevant tests + - Make tool inputs actual objects and not strings + - Add important missing parts to creating tools + - Drop litellm version to prevent windows issue + - Before kickoff if inputs are none + - Fixed typos, nested pydantic model issue, and docling issues + + + + **New Features** + - Adding Multimodal Abilities to Crew + - Programatic Guardrails + - HITL multiple rounds + - Gemini 2.0 Support + - CrewAI Flows Improvements + - Add Workflow Permissions + - Add support for langfuse with litellm + - Portkey Integration with CrewAI + - Add interpolate_only method and improve error handling + - Docling Support + - Weviate Support + + **Fixes** + - output_file not respecting system path + - disk I/O error when resetting short-term memory + - CrewJSONEncoder now accepts enums + - Python max version + - Interpolation for output_file in Task + - Handle coworker role name case/whitespace properly + - Add tiktoken as explicit dependency and document Rust requirement + - Include agent knowledge in planning process + - Change storage initialization to None for KnowledgeStorage + - Fix optional storage checks + - include event emitter in flows + - Docstring, Error Handling, and Type Hints Improvements + - Suppressed userWarnings from litellm pydantic issues + + + + **Changes** + - Remove all references to pipeline and pipeline router + - Add Nvidia NIM as provider in Custom LLM + - Add knowledge demo + improve knowledge docs + - Add HITL multiple rounds of followup + - New docs about yaml crew with decorators + - Simplify template crew + + + + **Features** + - Added knowledge to agent level + - Feat/remove langchain + - Improve typed task outputs + - Log in to Tool Repository on crewai login + + **Fixes** + - Fixes issues with result as answer not properly exiting LLM loop + - Fix missing key name when running with ollama provider + - Fix spelling issue found + + **Documentation** + - Update readme for running mypy + - Add knowledge to mint.json + - Update Github actions + - Update Agents docs to include two approaches for creating an agent + - Improvements to LLM Configuration and Usage + + + + **New Features** + - New before_kickoff and after_kickoff crew callbacks + - Support to pre-seed agents with Knowledge + - Add support for retrieving user preferences and memories using Mem0 + + **Fixes** + - Fix Async Execution + - Upgrade chroma and adjust embedder function generator + - Update CLI Watson supported models + docs + - Reduce level for Bandit + - Fixing all tests + + **Documentation** + - Update Docs + + + + **Fixes** + - Fixing Tokens callback replacement bug + - Fixing Step callback issue + - Add cached prompt tokens info on usage metrics + - Fix crew_train_success test + \ No newline at end of file diff --git a/docs/concepts/knowledge.mdx b/docs/concepts/knowledge.mdx index b5827551a..ae74ee50a 100644 --- a/docs/concepts/knowledge.mdx +++ b/docs/concepts/knowledge.mdx @@ -150,6 +150,8 @@ result = crew.kickoff( Here are examples of how to use different types of knowledge sources: +Note: Please ensure that you create the ./knowldge folder. All source files (e.g., .txt, .pdf, .xlsx, .json) should be placed in this folder for centralized management. + ### Text File Knowledge Source ```python from crewai.knowledge.source.text_file_knowledge_source import TextFileKnowledgeSource @@ -460,12 +462,12 @@ class SpaceNewsKnowledgeSource(BaseKnowledgeSource): data = response.json() articles = data.get('results', []) - formatted_data = self._format_articles(articles) + formatted_data = self.validate_content(articles) return {self.api_endpoint: formatted_data} except Exception as e: raise ValueError(f"Failed to fetch space news: {str(e)}") - def _format_articles(self, articles: list) -> str: + def validate_content(self, articles: list) -> str: """Format articles into readable text.""" formatted = "Space News Articles:\n\n" for article in articles: diff --git a/docs/concepts/llms.mdx b/docs/concepts/llms.mdx index f1d586bee..2712de77a 100644 --- a/docs/concepts/llms.mdx +++ b/docs/concepts/llms.mdx @@ -746,5 +746,5 @@ Learn how to get the most out of your LLM configuration: Use larger context models for extensive tasks - - ``` + + diff --git a/docs/concepts/memory.mdx b/docs/concepts/memory.mdx index 298e8814c..bb4e885cd 100644 --- a/docs/concepts/memory.mdx +++ b/docs/concepts/memory.mdx @@ -60,7 +60,8 @@ my_crew = Crew( ```python Code from crewai import Crew, Process from crewai.memory import LongTermMemory, ShortTermMemory, EntityMemory -from crewai.memory.storage import LTMSQLiteStorage, RAGStorage +from crewai.memory.storage.rag_storage import RAGStorage +from crewai.memory.storage.ltm_sqlite_storage import LTMSQLiteStorage from typing import List, Optional # Assemble your crew with memory capabilities @@ -119,7 +120,7 @@ Example using environment variables: import os from crewai import Crew from crewai.memory import LongTermMemory -from crewai.memory.storage import LTMSQLiteStorage +from crewai.memory.storage.ltm_sqlite_storage import LTMSQLiteStorage # Configure storage path using environment variable storage_path = os.getenv("CREWAI_STORAGE_DIR", "./storage") @@ -148,7 +149,7 @@ crew = Crew(memory=True) # Uses default storage locations ```python from crewai import Crew from crewai.memory import LongTermMemory -from crewai.memory.storage import LTMSQLiteStorage +from crewai.memory.storage.ltm_sqlite_storage import LTMSQLiteStorage # Configure custom storage paths crew = Crew( diff --git a/docs/docs.json b/docs/docs.json new file mode 100644 index 000000000..d2c7e55b0 --- /dev/null +++ b/docs/docs.json @@ -0,0 +1,223 @@ +{ + "$schema": "https://mintlify.com/docs.json", + "theme": "palm", + "name": "CrewAI", + "colors": { + "primary": "#EB6658", + "light": "#F3A78B", + "dark": "#C94C3C" + }, + "favicon": "favicon.svg", + "navigation": { + "tabs": [ + { + "tab": "Get Started", + "groups": [ + { + "group": "Get Started", + "pages": [ + "introduction", + "installation", + "quickstart", + "changelog" + ] + }, + { + "group": "Guides", + "pages": [ + { + "group": "Concepts", + "pages": [ + "guides/concepts/evaluating-use-cases" + ] + }, + { + "group": "Agents", + "pages": [ + "guides/agents/crafting-effective-agents" + ] + }, + { + "group": "Crews", + "pages": [ + "guides/crews/first-crew" + ] + }, + { + "group": "Flows", + "pages": [ + "guides/flows/first-flow", + "guides/flows/mastering-flow-state" + ] + }, + { + "group": "Advanced", + "pages": [ + "guides/advanced/customizing-prompts", + "guides/advanced/fingerprinting" + ] + } + ] + }, + { + "group": "Core Concepts", + "pages": [ + "concepts/agents", + "concepts/tasks", + "concepts/crews", + "concepts/flows", + "concepts/knowledge", + "concepts/llms", + "concepts/processes", + "concepts/collaboration", + "concepts/training", + "concepts/memory", + "concepts/planning", + "concepts/testing", + "concepts/cli", + "concepts/tools", + "concepts/event-listener", + "concepts/langchain-tools", + "concepts/llamaindex-tools" + ] + }, + { + "group": "How to Guides", + "pages": [ + "how-to/create-custom-tools", + "how-to/sequential-process", + "how-to/hierarchical-process", + "how-to/custom-manager-agent", + "how-to/llm-connections", + "how-to/customizing-agents", + "how-to/multimodal-agents", + "how-to/coding-agents", + "how-to/force-tool-output-as-result", + "how-to/human-input-on-execution", + "how-to/kickoff-async", + "how-to/kickoff-for-each", + "how-to/replay-tasks-from-latest-crew-kickoff", + "how-to/conditional-tasks", + "how-to/agentops-observability", + "how-to/langtrace-observability", + "how-to/mlflow-observability", + "how-to/openlit-observability", + "how-to/portkey-observability", + "how-to/langfuse-observability" + ] + }, + { + "group": "Tools", + "pages": [ + "tools/aimindtool", + "tools/apifyactorstool", + "tools/bravesearchtool", + "tools/browserbaseloadtool", + "tools/codedocssearchtool", + "tools/codeinterpretertool", + "tools/composiotool", + "tools/csvsearchtool", + "tools/dalletool", + "tools/directorysearchtool", + "tools/directoryreadtool", + "tools/docxsearchtool", + "tools/exasearchtool", + "tools/filereadtool", + "tools/filewritetool", + "tools/firecrawlcrawlwebsitetool", + "tools/firecrawlscrapewebsitetool", + "tools/firecrawlsearchtool", + "tools/githubsearchtool", + "tools/hyperbrowserloadtool", + "tools/linkupsearchtool", + "tools/llamaindextool", + "tools/serperdevtool", + "tools/s3readertool", + "tools/s3writertool", + "tools/scrapegraphscrapetool", + "tools/scrapeelementfromwebsitetool", + "tools/jsonsearchtool", + "tools/mdxsearchtool", + "tools/mysqltool", + "tools/multiontool", + "tools/nl2sqltool", + "tools/patronustools", + "tools/pdfsearchtool", + "tools/pgsearchtool", + "tools/qdrantvectorsearchtool", + "tools/ragtool", + "tools/scrapewebsitetool", + "tools/scrapflyscrapetool", + "tools/seleniumscrapingtool", + "tools/snowflakesearchtool", + "tools/spidertool", + "tools/txtsearchtool", + "tools/visiontool", + "tools/weaviatevectorsearchtool", + "tools/websitesearchtool", + "tools/xmlsearchtool", + "tools/youtubechannelsearchtool", + "tools/youtubevideosearchtool" + ] + }, + { + "group": "Telemetry", + "pages": [ + "telemetry" + ] + } + ] + }, + { + "tab": "Examples", + "groups": [ + { + "group": "Examples", + "pages": [ + "examples/example" + ] + } + ] + } + ], + "global": { + "anchors": [ + { + "anchor": "Community", + "href": "https://community.crewai.com", + "icon": "discourse" + } + ] + } + }, + "logo": { + "light": "crew_only_logo.png", + "dark": "crew_only_logo.png" + }, + "appearance": { + "default": "dark", + "strict": false + }, + "navbar": { + "primary": { + "type": "github", + "href": "https://github.com/crewAIInc/crewAI" + } + }, + "search": { + "prompt": "Search CrewAI docs" + }, + "seo": { + "indexing": "navigable" + }, + "footer": { + "socials": { + "website": "https://crewai.com", + "x": "https://x.com/crewAIInc", + "github": "https://github.com/crewAIInc/crewAI", + "linkedin": "https://www.linkedin.com/company/crewai-inc", + "youtube": "https://youtube.com/@crewAIInc", + "reddit": "https://www.reddit.com/r/crewAIInc/" + } + } +} \ No newline at end of file diff --git a/docs/guides/advanced/customizing-prompts.mdx b/docs/guides/advanced/customizing-prompts.mdx index 2622cdcca..4458184fc 100644 --- a/docs/guides/advanced/customizing-prompts.mdx +++ b/docs/guides/advanced/customizing-prompts.mdx @@ -1,4 +1,5 @@ ----title: Customizing Prompts +--- +title: Customizing Prompts description: Dive deeper into low-level prompt customization for CrewAI, enabling super custom and complex use cases for different models and languages. icon: message-pen --- diff --git a/docs/mint.json b/docs/mint.json deleted file mode 100644 index f39557110..000000000 --- a/docs/mint.json +++ /dev/null @@ -1,225 +0,0 @@ -{ - "name": "CrewAI", - "theme": "venus", - "logo": { - "dark": "crew_only_logo.png", - "light": "crew_only_logo.png" - }, - "favicon": "favicon.svg", - "colors": { - "primary": "#EB6658", - "light": "#F3A78B", - "dark": "#C94C3C", - "anchors": { - "from": "#737373", - "to": "#EB6658" - } - }, - "seo": { - "indexHiddenPages": false - }, - "modeToggle": { - "default": "dark", - "isHidden": false - }, - "feedback": { - "suggestEdit": true, - "raiseIssue": true, - "thumbsRating": true - }, - "topbarCtaButton": { - "type": "github", - "url": "https://github.com/crewAIInc/crewAI" - }, - "primaryTab": { - "name": "Get Started" - }, - "tabs": [ - { - "name": "Examples", - "url": "examples" - } - ], - "anchors": [ - { - "name": "Community", - "icon": "discourse", - "url": "https://community.crewai.com" - }, - { - "name": "Changelog", - "icon": "timeline", - "url": "https://github.com/crewAIInc/crewAI/releases" - } - ], - "navigation": [ - { - "group": "Get Started", - "pages": [ - "introduction", - "installation", - "quickstart" - ] - }, - { - "group": "Guides", - "pages": [ - { - "group": "Concepts", - "pages": [ - "guides/concepts/evaluating-use-cases" - ] - }, - { - "group": "Agents", - "pages": [ - "guides/agents/crafting-effective-agents" - ] - }, - { - "group": "Crews", - "pages": [ - "guides/crews/first-crew" - ] - }, - { - "group": "Flows", - "pages": [ - "guides/flows/first-flow", - "guides/flows/mastering-flow-state" - ] - }, - { - "group": "Advanced", - "pages": [ - "guides/advanced/customizing-prompts", - "guides/advanced/fingerprinting" - ] - } - ] - }, - { - "group": "Core Concepts", - "pages": [ - "concepts/agents", - "concepts/tasks", - "concepts/crews", - "concepts/flows", - "concepts/knowledge", - "concepts/llms", - "concepts/processes", - "concepts/collaboration", - "concepts/training", - "concepts/memory", - "concepts/planning", - "concepts/testing", - "concepts/cli", - "concepts/tools", - "concepts/event-listener", - "concepts/langchain-tools", - "concepts/llamaindex-tools" - ] - }, - { - "group": "How to Guides", - "pages": [ - "how-to/create-custom-tools", - "how-to/sequential-process", - "how-to/hierarchical-process", - "how-to/custom-manager-agent", - "how-to/llm-connections", - "how-to/customizing-agents", - "how-to/multimodal-agents", - "how-to/coding-agents", - "how-to/force-tool-output-as-result", - "how-to/human-input-on-execution", - "how-to/kickoff-async", - "how-to/kickoff-for-each", - "how-to/replay-tasks-from-latest-crew-kickoff", - "how-to/conditional-tasks", - "how-to/agentops-observability", - "how-to/langtrace-observability", - "how-to/mlflow-observability", - "how-to/openlit-observability", - "how-to/portkey-observability", - "how-to/langfuse-observability" - ] - }, - { - "group": "Examples", - "pages": [ - "examples/example" - ] - }, - { - "group": "Tools", - "pages": [ - "tools/aimindtool", - "tools/apifyactorstool", - "tools/bravesearchtool", - "tools/browserbaseloadtool", - "tools/codedocssearchtool", - "tools/codeinterpretertool", - "tools/composiotool", - "tools/csvsearchtool", - "tools/dalletool", - "tools/directorysearchtool", - "tools/directoryreadtool", - "tools/docxsearchtool", - "tools/exasearchtool", - "tools/filereadtool", - "tools/filewritetool", - "tools/firecrawlcrawlwebsitetool", - "tools/firecrawlscrapewebsitetool", - "tools/firecrawlsearchtool", - "tools/githubsearchtool", - "tools/hyperbrowserloadtool", - "tools/linkupsearchtool", - "tools/llamaindextool", - "tools/serperdevtool", - "tools/s3readertool", - "tools/s3writertool", - "tools/scrapegraphscrapetool", - "tools/scrapeelementfromwebsitetool", - "tools/jsonsearchtool", - "tools/mdxsearchtool", - "tools/mysqltool", - "tools/multiontool", - "tools/nl2sqltool", - "tools/patronustools", - "tools/pdfsearchtool", - "tools/pgsearchtool", - "tools/qdrantvectorsearchtool", - "tools/ragtool", - "tools/scrapewebsitetool", - "tools/scrapflyscrapetool", - "tools/seleniumscrapingtool", - "tools/snowflakesearchtool", - "tools/spidertool", - "tools/txtsearchtool", - "tools/visiontool", - "tools/weaviatevectorsearchtool", - "tools/websitesearchtool", - "tools/xmlsearchtool", - "tools/youtubechannelsearchtool", - "tools/youtubevideosearchtool" - ] - }, - { - "group": "Telemetry", - "pages": [ - "telemetry" - ] - } - ], - "search": { - "prompt": "Search CrewAI docs" - }, - "footerSocials": { - "website": "https://crewai.com", - "x": "https://x.com/crewAIInc", - "github": "https://github.com/crewAIInc/crewAI", - "linkedin": "https://www.linkedin.com/company/crewai-inc", - "youtube": "https://youtube.com/@crewAIInc" - } -} diff --git a/docs/tools/jsonsearchtool.mdx b/docs/tools/jsonsearchtool.mdx index 38267ff73..d7f8b853e 100644 --- a/docs/tools/jsonsearchtool.mdx +++ b/docs/tools/jsonsearchtool.mdx @@ -7,8 +7,10 @@ icon: file-code # `JSONSearchTool` - The JSONSearchTool is currently in an experimental phase. This means the tool is under active development, and users might encounter unexpected behavior or changes. - We highly encourage feedback on any issues or suggestions for improvements. + The JSONSearchTool is currently in an experimental phase. This means the tool + is under active development, and users might encounter unexpected behavior or + changes. We highly encourage feedback on any issues or suggestions for + improvements. ## Description @@ -60,7 +62,7 @@ tool = JSONSearchTool( # stream=true, }, }, - "embedder": { + "embedding_model": { "provider": "google", # or openai, ollama, ... "config": { "model": "models/embedding-001", @@ -70,4 +72,4 @@ tool = JSONSearchTool( }, } ) -``` \ No newline at end of file +``` diff --git a/docs/tools/ragtool.mdx b/docs/tools/ragtool.mdx index 841a2a278..b03059152 100644 --- a/docs/tools/ragtool.mdx +++ b/docs/tools/ragtool.mdx @@ -8,8 +8,8 @@ icon: vector-square ## Description -The `RagTool` is designed to answer questions by leveraging the power of Retrieval-Augmented Generation (RAG) through EmbedChain. -It provides a dynamic knowledge base that can be queried to retrieve relevant information from various data sources. +The `RagTool` is designed to answer questions by leveraging the power of Retrieval-Augmented Generation (RAG) through EmbedChain. +It provides a dynamic knowledge base that can be queried to retrieve relevant information from various data sources. This tool is particularly useful for applications that require access to a vast array of information and need to provide contextually relevant answers. ## Example @@ -138,7 +138,7 @@ config = { "model": "gpt-4", } }, - "embedder": { + "embedding_model": { "provider": "openai", "config": { "model": "text-embedding-ada-002" @@ -151,4 +151,4 @@ rag_tool = RagTool(config=config, summarize=True) ## Conclusion -The `RagTool` provides a powerful way to create and query knowledge bases from various data sources. By leveraging Retrieval-Augmented Generation, it enables agents to access and retrieve relevant information efficiently, enhancing their ability to provide accurate and contextually appropriate responses. \ No newline at end of file +The `RagTool` provides a powerful way to create and query knowledge bases from various data sources. By leveraging Retrieval-Augmented Generation, it enables agents to access and retrieve relevant information efficiently, enhancing their ability to provide accurate and contextually appropriate responses. diff --git a/src/crewai/cli/templates/flow/pyproject.toml b/src/crewai/cli/templates/flow/pyproject.toml index 0a3d0de03..93e7c1de7 100644 --- a/src/crewai/cli/templates/flow/pyproject.toml +++ b/src/crewai/cli/templates/flow/pyproject.toml @@ -10,6 +10,7 @@ dependencies = [ [project.scripts] kickoff = "{{folder_name}}.main:kickoff" +run_crew = "{{folder_name}}.main:kickoff" plot = "{{folder_name}}.main:plot" [build-system]