diff --git a/devin.py b/devin.py index 45fcf848..6aabc89b 100644 --- a/devin.py +++ b/devin.py @@ -6,6 +6,7 @@ llm = Anthropic( temperature=0.1, ) + # Tools @tool def terminal( @@ -43,6 +44,7 @@ def browser(query: str): webbrowser.open(url) return f"Searching for {query} in the browser." + @tool def create_file(file_path: str, content: str): """ @@ -59,6 +61,7 @@ def create_file(file_path: str, content: str): file.write(content) return f"File {file_path} created successfully." + @tool def file_editor(file_path: str, mode: str, content: str): """ diff --git a/docs/corporate/front_end_contributors.md b/docs/corporate/front_end_contributors.md new file mode 100644 index 00000000..b37197da --- /dev/null +++ b/docs/corporate/front_end_contributors.md @@ -0,0 +1,40 @@ +# Frontend Contributor Guide + +## Mission +At the heart of Swarms is the mission to democratize multi-agent technology, making it accessible to businesses of all sizes around the globe. This technology, which allows for the orchestration of multiple autonomous agents to achieve complex goals, has the potential to revolutionize industries by enhancing efficiency, scalability, and innovation. Swarms is committed to leading this charge by developing a platform that empowers businesses and individuals to harness the power of multi-agent systems without the need for specialized knowledge or resources. + + +## Understanding Your Impact as a Frontend Engineer +Crafting User Experiences: As a frontend engineer at Swarms, you play a crucial role in making multi-agent technology understandable and usable for businesses worldwide. Your work involves translating complex systems into intuitive interfaces, ensuring users can easily navigate, manage, and benefit from multi-agent solutions. By focusing on user-centric design and seamless integration, you help bridge the gap between advanced technology and practical business applications. + +Skills and Attributes for Success: Successful frontend engineers at Swarms combine technical expertise with a passion for innovation and a deep understanding of user needs. Proficiency in modern frontend technologies, such as React, NextJS, and Tailwind, is just the beginning. You also need a strong grasp of usability principles, accessibility standards, and the ability to work collaboratively with cross-functional teams. Creativity, problem-solving skills, and a commitment to continuous learning are essential for developing solutions that meet diverse business needs. + + +## Joining the Team +As you contribute to Swarms, you become part of a collaborative effort to change the world. We value each contribution and provide constructive feedback to help you grow. Outstanding contributors who share our vision and demonstrate exceptional skill and dedication are invited to join our team, where they can have an even greater impact on our mission. + + +### Becoming a Full-Time Swarms Engineer: +Swarms is radically devoted to open source and transparency. To join the full time team, you must first contribute to the open source repository so we can assess your technical capability and general way of working. After a series of quality contributions, we'll offer you a full time position! + +Joining Swarms full-time means more than just a job. It's an opportunity to be at the forefront of technological innovation, working alongside passionate professionals dedicated to making a difference. We look for individuals who are not only skilled but also driven by the desire to make multi-agent technology accessible and beneficial to businesses worldwide. + + +## Resources +- **Project Management Details** + - **Linear**: Our projects and tasks at a glance. Get a sense of our workflow and priorities. + - [View on Linear](https://linear.app/swarms/join/e7f4c6c560ffa0e1395820682f4e110a?s=1) + +- **Design System and UI/UX Guidelines** + - **Figma**: Dive into our design system to grasp the aesthetics and user experience objectives of Swarms. + - [View on Figma](https://www.figma.com/file/KL4VIXfZKwwLgAes2WbGNa/Swarms-Cloud-Platform?type=design&node-id=0%3A1&mode=design&t=MkrM0mBQa6qsTDtJ-1) + +- **Swarms Platform Repository** + - **GitHub**: The hub of our development activities. Familiarize yourself with our codebase and current projects. + - [Visit GitHub Repository](https://github.com/kyegomez/swarms-platform) + +- **[Swarms Community](https://discord.gg/pSTSxqDk)** + + +### Design Style & User Experience +- [How to build great products with game design, not gamification](https://blog.superhuman.com/game-design-not-gamification/) \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 9b157e12..d9d0ebb8 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -177,5 +177,8 @@ nav: - Demos: "corporate/demos.md" - Checklist: "corporate/checklist.md" + - Organization: + - FrontEnd Member Onboarding: "corporate/front_end_contributors.md" + \ No newline at end of file diff --git a/swarms/structs/agent.py b/swarms/structs/agent.py index 5544c654..de6e9e12 100644 --- a/swarms/structs/agent.py +++ b/swarms/structs/agent.py @@ -26,9 +26,9 @@ from swarms.utils.parse_code import extract_code_from_markdown from swarms.utils.pdf_to_text import pdf_to_text from swarms.tools.exec_tool import execute_tool_by_name from swarms.tools.function_util import process_tool_docs -from swarms.tools.interpreter import execute_command from swarms.tools.code_executor import CodeExecutor + # Utils # Custom stopping condition def stop_when_repeats(response: str) -> bool: @@ -327,7 +327,7 @@ class Agent: self.short_memory.add( role=self.agent_name, content=tools_prompt ) - + # And, add the tool documentation to the memory for tool in self.tools: tool_docs = process_tool_docs(tool) @@ -637,21 +637,26 @@ class Agent: extracted_code = ( extract_code_from_markdown(response) ) - + # Execute the code # execution = execute_command(extracted_code) - execution = CodeExecutor().run(extracted_code) - + execution = CodeExecutor().run( + extracted_code + ) + # Add the execution to the memory self.short_memory.add( - role=self.agent_name, content=execution + role=self.agent_name, + content=execution, ) - + # Run the llm again response = self.llm( - self.short_memory.return_history_as_string(), *args, **kwargs + self.short_memory.return_history_as_string(), + *args, + **kwargs, ) - + if self.evaluator: evaluated_response = self.evaluator( response @@ -708,17 +713,16 @@ class Agent: break # Exit the loop if all retry attempts fail # Check stopping conditions - if ( - self.stopping_token in response - ): + if self.stopping_token in response: break elif ( self.stopping_condition and self._check_stopping_condition(response) ): break - elif self.stopping_func is not None and self.stopping_func( - response + elif ( + self.stopping_func is not None + and self.stopping_func(response) ): break diff --git a/swarms/tools/function_util.py b/swarms/tools/function_util.py index ef98f80d..de0ec97a 100644 --- a/swarms/tools/function_util.py +++ b/swarms/tools/function_util.py @@ -1,5 +1,6 @@ import inspect + def process_tool_docs(item): """ Process the documentation for a given item. @@ -11,7 +12,7 @@ def process_tool_docs(item): metadata: The processed metadata containing the item's name, documentation, and source code. """ # If item is an instance of a class, get its class - if not inspect.isclass(item) and hasattr(item, '__class__'): + if not inspect.isclass(item) and hasattr(item, "__class__"): item = item.__class__ doc = inspect.getdoc(item) @@ -22,4 +23,4 @@ def process_tool_docs(item): if doc: metadata += f"Documentation:\n{doc}\n\n" metadata += f"\n{source}" - return metadata \ No newline at end of file + return metadata diff --git a/swarms/tools/interpreter.py b/swarms/tools/interpreter.py index 44029a97..b0661be2 100644 --- a/swarms/tools/interpreter.py +++ b/swarms/tools/interpreter.py @@ -1,4 +1,3 @@ - import io import sys @@ -38,4 +37,4 @@ def execute_command(code): output = buffer.getvalue() # Return the output - return output \ No newline at end of file + return output