├── .env ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── images ├── Blog-CrewAI.png └── compliance-assistant-output.gif ├── knowledge └── user_preference.txt ├── pyproject.toml └── src └── compliance_assistant ├── __init__.py ├── config ├── agents.yaml └── tasks.yaml ├── crew.py └── main.py /.env: -------------------------------------------------------------------------------- 1 | MODEL=bedrock/us.amazon.nova-pro-v1:0 2 | AWS_REGION_NAME=replace-with-your-aws-region 3 | MAX_TOKENS=4000 4 | TEMPERATURE=0.0 5 | AGENT_ID='replace-with-your-amazon-bedrock-Agent-id' 6 | AGENT_ALIAS_ID='replace-with-your-amazon-bedrock-Agent-alias' 7 | TOPIC='Latest PCI DSS requirements for Banking Organizations' 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .venv 2 | .venv/ 3 | __pycache__/ 4 | .DS_Store 5 | uv.lock 6 | report.md -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | ## Code of Conduct 2 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). 3 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact 4 | opensource-codeofconduct@amazon.com with any additional questions or comments. 5 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing Guidelines 2 | 3 | Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional 4 | documentation, we greatly value feedback and contributions from our community. 5 | 6 | Please read through this document before submitting any issues or pull requests to ensure we have all the necessary 7 | information to effectively respond to your bug report or contribution. 8 | 9 | 10 | ## Reporting Bugs/Feature Requests 11 | 12 | We welcome you to use the GitHub issue tracker to report bugs or suggest features. 13 | 14 | When filing an issue, please check existing open, or recently closed, issues to make sure somebody else hasn't already 15 | reported the issue. Please try to include as much information as you can. Details like these are incredibly useful: 16 | 17 | * A reproducible test case or series of steps 18 | * The version of our code being used 19 | * Any modifications you've made relevant to the bug 20 | * Anything unusual about your environment or deployment 21 | 22 | 23 | ## Contributing via Pull Requests 24 | Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that: 25 | 26 | 1. You are working against the latest source on the *main* branch. 27 | 2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already. 28 | 3. You open an issue to discuss any significant work - we would hate for your time to be wasted. 29 | 30 | To send us a pull request, please: 31 | 32 | 1. Fork the repository. 33 | 2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change. 34 | 3. Ensure local tests pass. 35 | 4. Commit to your fork using clear commit messages. 36 | 5. Send us a pull request, answering any default questions in the pull request interface. 37 | 6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation. 38 | 39 | GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and 40 | [creating a pull request](https://help.github.com/articles/creating-a-pull-request/). 41 | 42 | 43 | ## Finding contributions to work on 44 | Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any 'help wanted' issues is a great place to start. 45 | 46 | 47 | ## Code of Conduct 48 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). 49 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact 50 | opensource-codeofconduct@amazon.com with any additional questions or comments. 51 | 52 | 53 | ## Security issue notifications 54 | If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue. 55 | 56 | 57 | ## Licensing 58 | 59 | See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution. 60 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT No Attribution 2 | 3 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 12 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 13 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 14 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 15 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 16 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # sample-compliance-assistant-with-agents 2 | 3 | ### Automate Compliance With Bedrock and CrewAI 4 | 5 | Welcome to the **sample-compliance-assistant-with-agents** project, powered by [Amazon Bedrock](https://aws.amazon.com/bedrock/) and [crewAI](https://crewai.com). This is a solution for automating some of the most tedious regulatory compliance processes using multi-agent AI systems. This solution serves as a practical starting point for organizations looking to enhance their compliance processes with AI capabilities, demonstrating how intelligent systems could complement and streamline existing compliance workflows. This solution’s architecture can be adapted to help healthcare systems, enable manufacturers to maintain ISO safety documentation, and assist retailers in monitoring FTC advertising regulations or in other segments such as legal, finance, or human resources, offering wide- ranging potential for process automation and efficiency gains across various industries. 6 | 7 | 8 | ## 📌 Table of Contents 9 | 10 | - [sample-compliance-assistant-with-agents](#sample-compliance-assistant-with-agents) 11 | - [Automate Compliance With Bedrock and CrewAI](#automate-compliance-with-bedrock-and-crewai) 12 | - [📌 Table of Contents](#-table-of-contents) 13 | - [📚 Background Information](#-background-information) 14 | - [💻 Demo](#-demo) 15 | - [🎯 What This Solution Does](#-what-this-solution-does) 16 | - [Key Technologies Used](#key-technologies-used) 17 | - [📋 Prerequisites](#-prerequisites) 18 | - [AWS Account Requirements](#aws-account-requirements) 19 | - [Technical Requirements](#technical-requirements) 20 | - [🚀 Installation](#-installation) 21 | - [Step 1: Install CrewAI](#step-1-install-crewai) 22 | - [Step 2: Install Dependencies](#step-2-install-dependencies) 23 | - [⚙️ Customization](#️-customization) 24 | - [Define Your LLM.](#define-your-llm) 25 | - [Define your compliance challenge or Topic](#define-your-compliance-challenge-or-topic) 26 | - [Define your Bedrock Agent Details](#define-your-bedrock-agent-details) 27 | - [Configure Agents and Tasks](#configure-agents-and-tasks) 28 | - [🏃 Running the Project](#-running-the-project) 29 | - [🤖 Understanding Your Crew](#-understanding-your-crew) 30 | - [📋 Additional Documentation](#-additional-documentation) 31 | - [🤝 Contributing](#-contributing) 32 | - [📄 License](#-license) 33 | 34 | 35 | ## 📚 Background Information 36 | 37 | Financial institutions operate in an environment where regulatory compliance is both critical and increasingly complex. Traditional approaches to managing compliance requirements—such as manual review of regulations, policy creation, and implementation of controls—are time-consuming, prone to human error, and struggle to keep pace with rapidly evolving regulatory landscapes. The solution sample-compliance-assistant-with-agents helps compliance teams to automate some of the most tedious activities such as Updating Policies and Standards based on changes in regulatory frameworks, implementing technical controls etc. This solution leverages generative AI and multi-agent systems to transform compliance management, offering: 38 | - Automated regulatory monitoring 39 | - Intelligent policy creation 40 | - Streamlined control implementation 41 | - Real-time compliance guidance 42 | 43 | ## 💻 Demo 44 | 45 | ![demo](images/compliance-assistant-output.gif) 46 | 47 | 48 | ## 🎯 What This Solution Does 49 | 50 | This solution demonstrates how to build an intelligent, automated compliance management system that leverages multiple AI agents working in symphony to achieve defined outcomes. This patten can be leveraged to: 51 | 52 | - ✅ Continuously monitor and analyze regulatory changes 53 | 54 | - ✅ Transform regulatory requirements into organizational policies 55 | 56 | - ✅ Design and implement technical controls 57 | 58 | - ✅ Maintain compliance documentation 59 | 60 | - ✅ Provide real-time guidance on compliance matters 61 | 62 | 🏗️ Architecture 63 | 64 | ![architecture](images/Blog-CrewAI.png) 65 | 66 | ### Key Technologies Used 67 | 68 | 69 | - **Amazon Bedrock**: Foundation models and RAG capabilities 70 | 71 | - **CrewAI**: Multi-agent orchestration framework 72 | 73 | - **Amazon Bedrock Knowledge Bases**: Current, authoritative compliance information 74 | 75 | - **Amazon Bedrock Guardrails**: Safety controls for responsible AI use 76 | 77 | - **Amazon Bedrock Agents**: Memory retention across interactions and integrates Knowledge Bases and Guardrails 78 | 79 | ## 📋 Prerequisites 80 | 81 | 82 | ### AWS Account Requirements 83 | 84 | - Active AWS account with appropriate permissions 85 | 86 | - Access to Amazon Bedrock models in your desired region 87 | 88 | 89 | ### Technical Requirements 90 | 91 | - You will be executing the application form your local/shared Linux environment. 92 | 93 | - Python 3.10 or later 94 | 95 | - Access to Amazon Bedrock models enabled 96 | 97 | 98 | Ensure you have **Python >=3.10 installed on your system. This project uses [UV](https://docs.astral.sh/uv/) for dependency management and package handling, offering a seamless setup and execution experience. 99 | 100 | 101 | ## 🚀 Installation 102 | 103 | ### Step 1: Install CrewAI 104 | 105 | 106 | If you haven't already, install CrewAI and uv: 107 | 108 | ```bash 109 | 110 | pip install uv crewai 111 | 112 | ``` 113 | 114 | 115 | ### Step 2: Install Dependencies 116 | 117 | Navigate to your project directory and install the dependencies: 118 | 119 | 120 | ```bash 121 | 122 | crewai install 123 | 124 | ``` 125 | 126 | 127 | ## ⚙️ Customization 128 | 129 | 130 | ### Define Your LLM. 131 | 132 | 133 | Add your Preferred LLM Model into the `.env` file to enable API access. 134 | 135 | We will be using Amazon Nova models via Amazon Bedrock 136 | 137 | ```bash 138 | MODEL=bedrock/us.amazon.nova-pro-v1:0 139 | 140 | ``` 141 | 142 | ### Define your compliance challenge or Topic 143 | 144 | Define your Topic as a parameter into the `.env` file 145 | 146 | ```bash 147 | TOPIC='Latest PCI DSS requirements for Trading Platforms' 148 | 149 | ``` 150 | 151 | ### Define your Bedrock Agent Details 152 | 153 | Define identifier for your Bedrock agent in the `.env` file 154 | 155 | ```bash 156 | AGENT_ID='replace-with-your-amazon-bedrock-Agent-id' 157 | AGENT_ALIAS_ID='replace-with-your-amazon-bedrock-Agent-alias' 158 | 159 | ``` 160 | 161 | ### Configure Agents and Tasks 162 | 163 | 164 | - `config/agents.yaml` defines your agents. 165 | 166 | - `config/tasks.yaml` defines your tasks. 167 | 168 | - `crew.py` Executes the Crew 169 | 170 | - `main.py` starting point 171 | 172 | Feel free to modify the agents and tasks based on your specific requirements 173 | 174 | 175 | ## 🏃 Running the Project 176 | 177 | To kickstart your AI agents and begin task execution, run the following command from the root folder of your project: 178 | 179 | ```bash 180 | 181 | crewai run 182 | 183 | ``` 184 | 185 | This initializes the Crew, assembling the agents and assigning them tasks as defined in your configuration. The default setup will generate a `report.md` file in the root folder with a research summary on LLMs. 186 | 187 | 188 | 189 | ## 🤖 Understanding Your Crew 190 | 191 | 192 | The **Automate Regulatory Compliance With Multi-Agents Crew** consists of multiple AI agents, each with unique roles, goals, and tools. These agents collaborate on tasks defined in `config/tasks.yaml`, leveraging their collective skills to achieve complex objectives. The `config/agents.yaml` file outlines the capabilities and configurations of each agent in your crew. 193 | 194 | 195 | ## 📋 Additional Documentation 196 | 197 | 198 | - 📖 Check our [documentation on Amazon Bedrock](https://aws.amazon.com/bedrock/) 199 | 200 | - 🤖 [Amazon bedrock Agents](https://aws.amazon.com/bedrock/agents/) 201 | 202 | 203 | ## 🤝 Contributing 204 | 205 | Contributions are welcome! Please read our [Contributing Guidelines](https://console.harmony.a2z.com/CONTRIBUTING.md) for details on how to submit pull requests, report issues, and contribute to the project. 206 | 207 | ## 📄 License 208 | 209 | This library is licensed under the MIT-0 License. See the LICENSE file. -------------------------------------------------------------------------------- /images/Blog-CrewAI.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/sample-compliance-assistant-with-agents/48cb79f986d4d454d9ec0986f8891d9d9d9c1285/images/Blog-CrewAI.png -------------------------------------------------------------------------------- /images/compliance-assistant-output.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/sample-compliance-assistant-with-agents/48cb79f986d4d454d9ec0986f8891d9d9d9c1285/images/compliance-assistant-output.gif -------------------------------------------------------------------------------- /knowledge/user_preference.txt: -------------------------------------------------------------------------------- 1 | User name is John Doe. 2 | User is Leading Security and Compliance efforts for a Large Financial Services Company . 3 | User is based in San Francisco, California. 4 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [project] 2 | name = "compliance_assistant" 3 | version = "0.1.0" 4 | description = "compliance-assistant using crewAI" 5 | authors = [{ name = "Your Name", email = "you@example.com" }] 6 | requires-python = ">=3.10,<3.13" 7 | dependencies = [ 8 | "bandit>=1.8.3", 9 | "boto3>=1.37.6", 10 | "crewai[tools]>=0.105.0,<1.0.0" 11 | ] 12 | 13 | [project.scripts] 14 | compliance_assistant = "compliance_assistant.main:run" 15 | run_crew = "compliance_assistant.main:run" 16 | train = "compliance_assistant.main:train" 17 | replay = "compliance_assistant.main:replay" 18 | test = "compliance_assistant.main:test" 19 | 20 | [build-system] 21 | requires = ["hatchling"] 22 | build-backend = "hatchling.build" 23 | 24 | [tool.crewai] 25 | type = "crew" 26 | -------------------------------------------------------------------------------- /src/compliance_assistant/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/sample-compliance-assistant-with-agents/48cb79f986d4d454d9ec0986f8891d9d9d9c1285/src/compliance_assistant/__init__.py -------------------------------------------------------------------------------- /src/compliance_assistant/config/agents.yaml: -------------------------------------------------------------------------------- 1 | compliance_analyst: 2 | role: > 3 | {topic} Senior Compliance Analyst 4 | goal: > 5 | Review and understand regulatory and compliance requirements around {topic} 6 | backstory: > 7 | You're a seasoned Compliance analyst with deep expertise in areas such as PCI DSS, HIPAA, NIST, ISO and knack for uncovering the latest regulations and requirements in {topic}. Known for your ability to find the most relevant information and present it in a clear and concise manner. You work for a large financial services organization as a Compliance analyst and you identify the relevant information about {topic} from your knowledge base and create a detailed report. 8 | 9 | compliance_specialist: 10 | role: > 11 | {topic} Compliance Specialist 12 | goal: > 13 | Create detailed reports based on {topic} compliance analysis and research findings 14 | backstory: > 15 | You're a meticulous compliance specialist with deep understanding of compliance and regulatory landscape for Financial services and Technology Industry. You create standards and policies for the organization to meet regulations and compliance needs. You're known for your ability to turn complex data into clear and concise reports, making it easy for others to understand and act on the information you provide. 16 | 17 | solutions_architect: 18 | role: > 19 | {topic} Solutions Architect 20 | goal: > 21 | Create detailed technology solution based on {topic} compliance specialist reports and research findings 22 | backstory: > 23 | You're a seasoned Solutions Architect with deep understanding of AWS Cloud, CyberSecurity, Compliance needs for organizations and latest trends and developments in Technologies for Financial Services Industry. You are really good in recommending and communicating solutions and You're known for your ability to turn complex information into technology solutions. You will be working with the Compliance Specialist to craft a detailed and prescriptive solution to meet organization's regulatory and compliance needs. Organization runs their workloads mostly in AWS Cloud. 24 | -------------------------------------------------------------------------------- /src/compliance_assistant/config/tasks.yaml: -------------------------------------------------------------------------------- 1 | compliance_analysis_task: 2 | description: > 3 | Conduct a thorough analysis about {topic} 4 | Make sure you find relevant information given the current year is {current_year}. 5 | expected_output: > 6 | A list with 10 bullet points and details of the most relevant information about {topic} 7 | agent: compliance_analyst 8 | 9 | compliance_reporting_task: 10 | description: > 11 | Review the context you got and expand each topic into a full section for a report. 12 | Make sure the report is detailed and contains any and all relevant information for Financial Services Organization 13 | expected_output: > 14 | A fully fledged report with the main topics, each with a full section of information. 15 | Formatted as markdown without '```' 16 | agent: compliance_specialist 17 | 18 | compliance_solution_task: 19 | description: > 20 | Based on the report, recommend a detailed technology solution to address {topic}. 21 | expected_output: > 22 | A prescriptive solution to address the organizational requirements. Formatted as markdown without '```' 23 | agent: solutions_architect -------------------------------------------------------------------------------- /src/compliance_assistant/crew.py: -------------------------------------------------------------------------------- 1 | import os 2 | from crewai import Agent, Crew, Process, Task 3 | from crewai.project import CrewBase, agent, crew, task 4 | from crewai_tools.aws.bedrock.agents.invoke_agent_tool import BedrockInvokeAgentTool 5 | 6 | # If you want to run a snippet of code before or after the crew starts, 7 | # you can use the @before_kickoff and @after_kickoff decorators 8 | # https://docs.crewai.com/concepts/crews#example-crew-class-with-decorators 9 | 10 | @CrewBase 11 | class ComplianceAssistant(): 12 | """ComplianceAssistant crew""" 13 | 14 | # Learn more about YAML configuration files here: 15 | # Agents: https://docs.crewai.com/concepts/agents#yaml-configuration-recommended 16 | # Tasks: https://docs.crewai.com/concepts/tasks#yaml-configuration-recommended 17 | agents_config = 'config/agents.yaml' 18 | tasks_config = 'config/tasks.yaml' 19 | 20 | # Initialize the Bedrock Agent Tool 21 | agent_tool = BedrockInvokeAgentTool( 22 | agent_id=os.environ.get('AGENT_ID'), 23 | agent_alias_id=os.environ.get('AGENT_ALIAS_ID') 24 | ) 25 | 26 | # If you would like to add tools to your agents, you can learn more about it here: 27 | # https://docs.crewai.com/concepts/agents#agent-tools 28 | @agent 29 | def compliance_analyst(self) -> Agent: 30 | return Agent( 31 | config=self.agents_config['compliance_analyst'], 32 | tools=[self.agent_tool], 33 | allow_delegation=True, 34 | verbose=True 35 | ) 36 | 37 | @agent 38 | def compliance_specialist(self) -> Agent: 39 | return Agent( 40 | config=self.agents_config['compliance_specialist'], 41 | verbose=True, 42 | #allow_delegation=True 43 | ) 44 | 45 | @agent 46 | def solutions_architect(self) -> Agent: 47 | return Agent( 48 | config=self.agents_config['solutions_architect'], 49 | verbose=True 50 | ) 51 | 52 | @task 53 | def compliance_analysis_task(self) -> Task: 54 | return Task( 55 | config=self.tasks_config['compliance_analysis_task'], 56 | ) 57 | 58 | @task 59 | def compliance_reporting_task(self) -> Task: 60 | return Task( 61 | config=self.tasks_config['compliance_reporting_task'] 62 | ) 63 | 64 | @task 65 | def compliance_solution_task(self) -> Task: 66 | return Task( 67 | config=self.tasks_config['compliance_solution_task'], 68 | output_file='report.md' 69 | ) 70 | 71 | @crew 72 | def crew(self) -> Crew: 73 | """Creates the Compliance Automation crew""" 74 | 75 | return Crew( 76 | agents=self.agents, 77 | tasks=self.tasks, 78 | #process=Process.sequential, 79 | verbose=True, 80 | max_rpm=10, 81 | # process=Process.hierarchical, # In case you wanna use that instead https://docs.crewai.com/how-to/Hierarchical/ 82 | ) 83 | -------------------------------------------------------------------------------- /src/compliance_assistant/main.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | import warnings 5 | from datetime import datetime 6 | from compliance_assistant.crew import ComplianceAssistant 7 | 8 | warnings.filterwarnings("ignore", category=SyntaxWarning, module="pysbd") 9 | 10 | # This main file is intended to be a way for you to run your 11 | # crew locally, so refrain from adding unnecessary logic into this file. 12 | # Replace with inputs you want to test with, it will automatically 13 | # interpolate any tasks and agents information 14 | 15 | # This crew is intended to to run locally 16 | 17 | # Fetch the topic defined in .env file 18 | topic = os.environ.get('TOPIC') 19 | if topic is None: 20 | raise Exception("TOPIC is not defined. Please add the topic as an argument") 21 | 22 | def run(): 23 | """ 24 | Run the crew. 25 | """ 26 | inputs = { 27 | 'topic': topic, 28 | 'current_year': str(datetime.now().year) 29 | } 30 | 31 | try: 32 | ComplianceAssistant().crew().kickoff(inputs=inputs) 33 | except Exception as e: 34 | raise Exception(f"An error occurred while running the crew: {e}") 35 | 36 | 37 | def train(): 38 | """ 39 | Train the crew for a given number of iterations. 40 | """ 41 | inputs = { 42 | "topic": topic 43 | } 44 | try: 45 | ComplianceAssistant().crew().train(n_iterations=int(sys.argv[1]), filename=sys.argv[2], inputs=inputs) 46 | 47 | except Exception as e: 48 | raise Exception(f"An error occurred while training the crew: {e}") 49 | 50 | def replay(): 51 | """ 52 | Replay the crew execution from a specific task. 53 | """ 54 | try: 55 | ComplianceAssistant().crew().replay(task_id=sys.argv[1]) 56 | 57 | except Exception as e: 58 | raise Exception(f"An error occurred while replaying the crew: {e}") 59 | 60 | def test(): 61 | """ 62 | Test the crew execution and returns the results. 63 | """ 64 | inputs = { 65 | "topic": topic, 66 | "current_year": str(datetime.now().year) 67 | } 68 | try: 69 | ComplianceAssistant().crew().test(n_iterations=int(sys.argv[1]), openai_model_name=sys.argv[2], inputs=inputs) 70 | 71 | except Exception as e: 72 | raise Exception(f"An error occurred while testing the crew: {e}") 73 | --------------------------------------------------------------------------------