From 5f1be9e1dbbca816ea4bf59bb4538d8554088a13 Mon Sep 17 00:00:00 2001 From: Tony Kipkemboi Date: Wed, 28 May 2025 10:53:55 -0400 Subject: [PATCH] docs: docs restructuring and community analytics implementation (#2913) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: Fix major memory system documentation issues - Remove misleading deprecation warnings, fix confusing comments, clearly separate three memory approaches, provide accurate examples that match implementation * fix: Correct broken image paths in README - Update crewai_logo.png and asset.png paths to point to docs/images/ directory instead of docs/ directly * docs: Add system prompt transparency and customization guide - Add 'Understanding Default System Instructions' section to address black-box concerns - Document what CrewAI automatically injects into prompts - Provide code examples to inspect complete system prompts - Show 3 methods to override default instructions - Include observability integration examples with Langfuse - Add best practices for production prompt management * docs: Fix implementation accuracy issues in memory documentation - Fix Ollama embedding URL parameter and remove unsupported Cohere input_type parameter * docs: Reference observability docs instead of showing specific tool examples * docs: Reorganize knowledge documentation for better developer experience - Move quickstart examples right after overview for immediate hands-on experience - Create logical learning progression: basics → configuration → advanced → troubleshooting - Add comprehensive agent vs crew knowledge guide with working examples - Consolidate debugging and troubleshooting in dedicated section - Organize best practices by topic in accordion format - Improve content flow from simple concepts to advanced features - Ensure all examples are grounded in actual codebase implementation * docs: enhance custom LLM documentation with comprehensive examples and accurate imports * docs: reorganize observability tools into dedicated section with comprehensive overview and improved navigation * docs: rename how-to section to learn and add comprehensive overview page * docs: finalize documentation reorganization and update navigation labels * docs: enhance README with comprehensive badges, navigation links, and getting started video * Add Common Room tracking to documentation - Script will track all documentation page views - Follows Mintlify custom JS implementation pattern - Enables comprehensive docs usage insights * docs: move human-in-the-loop guide to enterprise section and update navigation - Move human-in-the-loop.mdx from learn to enterprise/guides - Update docs.json navigation to reflect new organization --- docs/common-room-tracking.js | 18 +++++ docs/docs.json | 2 +- docs/enterprise/guides/human-in-the-loop.mdx | 78 ++++++++++++++++++++ 3 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 docs/common-room-tracking.js create mode 100644 docs/enterprise/guides/human-in-the-loop.mdx diff --git a/docs/common-room-tracking.js b/docs/common-room-tracking.js new file mode 100644 index 000000000..bf35ff375 --- /dev/null +++ b/docs/common-room-tracking.js @@ -0,0 +1,18 @@ +(function() { + if (typeof window === 'undefined') return; + if (typeof window.signals !== 'undefined') return; + var script = document.createElement('script'); + script.src = 'https://cdn.cr-relay.com/v1/site/883520f4-c431-44be-80e7-e123a1ee7a2b/signals.js'; + script.async = true; + window.signals = Object.assign( + [], + ['page', 'identify', 'form'].reduce(function (acc, method){ + acc[method] = function () { + signals.push([method, arguments]); + return signals; + }; + return acc; + }, {}) + ); + document.head.appendChild(script); +})(); \ No newline at end of file diff --git a/docs/docs.json b/docs/docs.json index 0d29bc7bb..2cd098506 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -217,7 +217,6 @@ "learn/dalle-image-generation", "learn/force-tool-output-as-result", "learn/hierarchical-process", - "learn/human-in-the-loop", "learn/human-input-on-execution", "learn/kickoff-async", "learn/kickoff-for-each", @@ -269,6 +268,7 @@ "enterprise/guides/slack-trigger", "enterprise/guides/team-management", "enterprise/guides/webhook-automation", + "enterprise/guides/human-in-the-loop", "enterprise/guides/zapier-trigger" ] }, diff --git a/docs/enterprise/guides/human-in-the-loop.mdx b/docs/enterprise/guides/human-in-the-loop.mdx new file mode 100644 index 000000000..c3499298b --- /dev/null +++ b/docs/enterprise/guides/human-in-the-loop.mdx @@ -0,0 +1,78 @@ +--- +title: "HITL Workflows" +description: "Learn how to implement Human-In-The-Loop workflows in CrewAI for enhanced decision-making" +icon: "user-check" +--- + +Human-In-The-Loop (HITL) is a powerful approach that combines artificial intelligence with human expertise to enhance decision-making and improve task outcomes. This guide shows you how to implement HITL within CrewAI. + +## Setting Up HITL Workflows + + + + Set up your task with human input enabled: + + Crew Human Input + + + + + When kicking off your crew, include a webhook URL for human input: + + Crew Webhook URL + + + + + Once the crew completes the task requiring human input, you'll receive a webhook notification containing: + - **Execution ID** + - **Task ID** + - **Task output** + + + + The system will pause in the `Pending Human Input` state. Review the task output carefully. + + + + Call the resume endpoint of your crew with the following information: + + Crew Resume Endpoint + + + **Feedback Impact on Task Execution**: + It's crucial to exercise care when providing feedback, as the entire feedback content will be incorporated as additional context for further task executions. + + This means: + - All information in your feedback becomes part of the task's context. + - Irrelevant details may negatively influence it. + - Concise, relevant feedback helps maintain task focus and efficiency. + - Always review your feedback carefully before submission to ensure it contains only pertinent information that will positively guide the task's execution. + + + If you provide negative feedback: + - The crew will retry the task with added context from your feedback. + - You'll receive another webhook notification for further review. + - Repeat steps 4-6 until satisfied. + + + + When you submit positive feedback, the execution will proceed to the next steps. + + + +## Best Practices + +- **Be Specific**: Provide clear, actionable feedback that directly addresses the task at hand +- **Stay Relevant**: Only include information that will help improve the task execution +- **Be Timely**: Respond to HITL prompts promptly to avoid workflow delays +- **Review Carefully**: Double-check your feedback before submitting to ensure accuracy + +## Common Use Cases + +HITL workflows are particularly valuable for: +- Quality assurance and validation +- Complex decision-making scenarios +- Sensitive or high-stakes operations +- Creative tasks requiring human judgment +- Compliance and regulatory reviews \ No newline at end of file