Building AI agents, atomically
Linting, fix tests, formatting, add code quality automation
KennyVaneetvelde3bb2bac96bd7
diff --git a/.flake8 b/.flake8index 4399ec4..8f36406 100644--- a/.flake8+++ b/.flake8@@ -1,5 +1,6 @@[flake8]-max-line-length = 127+max-line-length = 150max-complexity = 10count = truestatistics = true+ignore = E203diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.ymlnew file mode 100644index 0000000..0cebd45--- /dev/null+++ b/.github/workflows/code-quality.yml@@ -0,0 +1,49 @@+name: Code Quality & Tests++on:+ push:+ branches: [ main ]+ pull_request:+ branches: [ main ]+ workflow_dispatch:++jobs:+ quality:+ runs-on: ubuntu-latest+ steps:+ - uses: actions/checkout@v4++ - name: Set up Python+ uses: actions/setup-python@v5+ with:+ python-version: '3.11'++ - name: Install Poetry+ run: |+ python -m pip install --upgrade pip+ pip install poetry++ - name: Configure Poetry+ run: |+ poetry config virtualenvs.create true+ poetry config virtualenvs.in-project true++ - name: Cache Poetry virtualenv+ uses: actions/cache@v4+ id: cache+ with:+ path: ./.venv+ key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}++ - name: Install Dependencies+ if: steps.cache.outputs.cache-hit != 'true'+ run: poetry install++ - name: Run Black Check+ run: poetry run black --check atomic-agents atomic-assembler atomic-examples atomic-forge++ - name: Run Flake8+ run: poetry run flake8 --extend-exclude=.venv atomic-agents atomic-assembler atomic-examples atomic-forge++ - name: Run Tests+ run: poetry run pytest --cov=atomic_agents atomic-agentsdiff --git a/README.md b/README.mdindex 87257ac..d7c74ed 100644--- a/README.md+++ b/README.md@@ -18,6 +18,7 @@ If you want to learn more about the motivation and philosophy behind Atomic Agen</a>---+If you just want to dive into the code straight away, I suggest checking out the quickstart video below:### [Watch the Quickstart Video](https://www.youtube.com/watch?v=CyZxRU0ax3Q)@@ -320,9 +321,9 @@ We welcome contributions! Please see the [Developer Guide](/guides/DEV_GUIDE.md)1. Fork the repository2. Create a new branch (`git checkout -b feature-branch`)3. Make your changes-4. Run tests (`pytest --cov atomic_agents`)-5. Format your code (`black atomic_agents atomic_assembler`)-6. Lint your code (`flake8 atomic_agents atomic_assembler`)+4. Run tests (`poetry run pytest --cov=atomic_agents atomic-agents`)+5. Format your code (`poetry run black atomic-agents atomic-assembler atomic-examples atomic-forge`)+6. Lint your code (`poetry run flake8 --extend-exclude=.venv atomic-agents atomic-assembler atomic-examples atomic-forge`)7. Commit your changes (`git commit -m 'Add some feature'`)8. Push to the branch (`git push origin feature-branch`)9. Open a pull requestdiff --git a/atomic-agents/.coveragerc b/atomic-agents/.coveragercdeleted file mode 100644index 6fa6eb9..0000000--- a/atomic-agents/.coveragerc+++ /dev/null@@ -1,12 +0,0 @@-[report]-show_missing=true-exclude_lines =- @abstractmethod- @abc.abstractmethod-exclude_also =- if __name__ == .__main__.:--[run]-omit =- */__init__.py- */tests/*diff --git a/atomic-agents/atomic_agents/agents/base_agent.py b/atomic-agents/atomic_agents/agents/base_agent.pyindex db0c4f4..50c25d6 100644--- a/atomic-agents/atomic_agents/agents/base_agent.py+++ b/atomic-agents/atomic_agents/agents/base_agent.py@@ -240,6 +240,6 @@ if __name__ == "__main__":console.print("\n[bold]Agent initialized and ready to use![/bold]")# Run the agent with a sample input- sample_input = agent.input_schema(chat_message="Hello, how are you?")+ sample_input = agent.input_schema(chat_message="Please give me 3 cute squirrel facts")response = agent.run(sample_input)console.print(f"[bold]Response:[/bold] {response.chat_message}")diff --git a/atomic-agents/tests/agents/test_base_agent.py b/atomic-agents/tests/agents/test_base_agent.pyindex a0952a6..3b32d31 100644--- a/atomic-agents/tests/agents/test_base_agent.py+++ b/atomic-agents/tests/agents/test_base_agent.py@@ -2,7 +2,6 @@ import pytestfrom unittest.mock import Mock, call, patchfrom pydantic import BaseModelimport instructor-import inspectfrom atomic_agents.agents.base_agent import (BaseIOSchema,BaseAgent,@@ -60,6 +59,7 @@ def test_initialization(agent, mock_instructor, mock_memory, mock_system_prompt_assert agent.output_schema == BaseAgentOutputSchemaassert agent.temperature == 0+def test_reset_memory(agent, mock_memory):initial_memory = agent.initial_memoryagent.reset_memory()@@ -82,23 +82,10 @@ def test_get_response(agent, mock_instructor, mock_memory, mock_system_prompt_gemodel="gpt-4o-mini",messages=[{"role": "system", "content": "System prompt"}, {"role": "user", "content": "Hello"}],response_model=BaseAgentOutputSchema,+ temperature=0,)-def test_run(agent, mock_memory):- mock_input = BaseAgentInputSchema(chat_message="Test input")- mock_output = BaseAgentOutputSchema(chat_message="Test output")-- agent.get_response = Mock(return_value=mock_output)-- result = agent.run(mock_input)-- assert result == mock_output- assert agent.current_user_input == mock_input-- mock_memory.add_message.assert_has_calls([call("user", mock_input), call("assistant", mock_output)])--def test_get_context_provider(agent, mock_system_prompt_generator):mock_provider = Mock(spec=SystemPromptContextProviderBase)mock_system_prompt_generator.context_providers = {"test_provider": mock_provider}@@ -157,7 +144,6 @@ def test_base_agent_io_str_and_rich():assert test_io.__rich__() is not None # Just check if it returns something, as we can't easily compare Rich objects-# Update the existing test_run function to use the actual methods instead of mocksdef test_run(agent, mock_memory):mock_input = BaseAgentInputSchema(chat_message="Test input")mock_output = BaseAgentOutputSchema(chat_message="Test output")diff --git a/atomic-agents/tests/lib/components/test_agent_memory.py b/atomic-agents/tests/lib/components/test_agent_memory.pyindex 11c37ba..2d1ee2a 100644--- a/atomic-agents/tests/lib/components/test_agent_memory.py+++ b/atomic-agents/tests/lib/components/test_agent_memory.py@@ -1,7 +1,7 @@import pytestimport jsonfrom typing import List, Dict-from pydantic import BaseModel, Field+from pydantic import Fieldfrom atomic_agents.lib.components.agent_memory import AgentMemory, Messagefrom atomic_agents.lib.base.base_io_schema import BaseIOSchema@@ -73,13 +73,6 @@ def test_manage_overflow(memory):assert memory.history[0].content.test_field == "Message 2"-def test_serialize_content(memory):- content = TestInputSchema(test_field="Test")- serialized = memory._serialize_content(content)- assert isinstance(serialized, str)- assert json.loads(serialized) == {"test_field": "Test"}--def test_get_history(memory):memory.add_message("user", TestInputSchema(test_field="Hello"))memory.add_message("assistant", TestOutputSchema(test_field="Hi there"))@@ -243,12 +236,6 @@ def test_memory_turn_consistency():assert memory.history[2].turn_id == new_turn_id-def test_serialize_non_baseioschema():- memory = AgentMemory()- result = memory._serialize_content("Not a BaseIOSchema")- assert result == "Not a BaseIOSchema"--def test_agent_memory_delete_turn_id(memory):mock_input = TestInputSchema(test_field="Test input")mock_output = TestInputSchema(test_field="Test output")diff --git a/atomic-agents/tests/lib/components/test_system_prompt_generator.py b/atomic-agents/tests/lib/components/test_system_prompt_generator.pyindex cc07233..3d6bd40 100644--- a/atomic-agents/tests/lib/components/test_system_prompt_generator.py+++ b/atomic-agents/tests/lib/components/test_system_prompt_generator.py@@ -1,4 +1,3 @@-import pytestfrom atomic_agents.lib.components.system_prompt_generator import SystemPromptGenerator, SystemPromptContextProviderBasediff --git a/atomic-assembler/atomic_assembler/app.py b/atomic-assembler/atomic_assembler/app.pyindex 8890773..2af92fc 100644--- a/atomic-assembler/atomic_assembler/app.py+++ b/atomic-assembler/atomic_assembler/app.py@@ -1,14 +1,13 @@import loggingfrom textual import onfrom textual.app import App-from textual.screen import Screenfrom pathlib import Pathimport webbrowserfrom atomic_assembler.screens.main_menu import MainMenuScreenfrom atomic_assembler.screens.file_explorer import FileExplorerScreenfrom atomic_assembler.screens.atomic_tool_explorer import AtomicToolExplorerScreen-from atomic_assembler.constants import GITHUB_BRANCH, Mode+from atomic_assembler.constants import Modeclass AtomicAssembler(App):diff --git a/atomic-assembler/atomic_assembler/main.py b/atomic-assembler/atomic_assembler/main.pyindex 61ebe02..cda921f 100644--- a/atomic-assembler/atomic_assembler/main.py+++ b/atomic-assembler/atomic_assembler/main.py@@ -1,7 +1,5 @@import logging-import sysimport argparse-from atomic_assembler.constants import GITHUB_BASE_URLfrom atomic_assembler.app import AtomicAssemblerdiff --git a/atomic-assembler/atomic_assembler/screens/atomic_tool_explorer.py b/atomic-assembler/atomic_assembler/screens/atomic_tool_explorer.pyindex 6724492..6fc96a1 100644--- a/atomic-assembler/atomic_assembler/screens/atomic_tool_explorer.py+++ b/atomic-assembler/atomic_assembler/screens/atomic_tool_explorer.py@@ -1,5 +1,5 @@from textual.app import ComposeResult-from textual.widgets import Static, Footer, Header+from textual.widgets import Static, Footerfrom textual.binding import Bindingfrom textual.screen import Screenfrom textual.message import Messagediff --git a/atomic-assembler/atomic_assembler/screens/file_explorer.py b/atomic-assembler/atomic_assembler/screens/file_explorer.pyindex cdaa932..c329628 100644--- a/atomic-assembler/atomic_assembler/screens/file_explorer.py+++ b/atomic-assembler/atomic_assembler/screens/file_explorer.py@@ -1,10 +1,9 @@import loggingfrom textual.app import ComposeResult-from textual.widgets import Static, Footer, Header+from textual.widgets import Static, Footerfrom textual.binding import Binding-from textual import events, on+from textual import onfrom textual.reactive import reactive-from textual.containers import Containerfrom textual.screen import Screenfrom pathlib import Pathfrom typing import List, Optional, Dict, Callablediff --git a/atomic-assembler/atomic_assembler/screens/tool_info_screen.py b/atomic-assembler/atomic_assembler/screens/tool_info_screen.pyindex e94e299..ad610fe 100644--- a/atomic-assembler/atomic_assembler/screens/tool_info_screen.py+++ b/atomic-assembler/atomic_assembler/screens/tool_info_screen.py@@ -1,6 +1,6 @@from textual.app import ComposeResultfrom textual.containers import VerticalScroll-from textual.widgets import Header, Footer, Markdown+from textual.widgets import Footer, Markdownfrom textual.binding import Bindingfrom textual.screen import Screendiff --git a/atomic-assembler/atomic_assembler/utils.py b/atomic-assembler/atomic_assembler/utils.pyindex 5f44294..6a804b2 100644--- a/atomic-assembler/atomic_assembler/utils.py+++ b/atomic-assembler/atomic_assembler/utils.py@@ -6,7 +6,7 @@ import tempfileimport gitimport yamlfrom pathlib import Path-from atomic_assembler.constants import GITHUB_BASE_URL, GITHUB_BRANCH, TOOLS_SUBFOLDER+from atomic_assembler.constants import GITHUB_BRANCH, TOOLS_SUBFOLDERclass GithubRepoCloner:@@ -18,7 +18,7 @@ class GithubRepoCloner:def clone(self):try:- repo = git.Repo.clone_from(self.repo_url, self.repo_path, branch=GITHUB_BRANCH)+ _ = git.Repo.clone_from(self.repo_url, self.repo_path, branch=GITHUB_BRANCH)logging.info(f"Repository cloned to {self.repo_path} on branch {GITHUB_BRANCH}")except git.GitCommandError as e:logging.error(f"Failed to clone repository: {e}")diff --git a/atomic-assembler/atomic_assembler/widgets/confirmation_modal.py b/atomic-assembler/atomic_assembler/widgets/confirmation_modal.pyindex 68a65e0..fc8ff91 100644--- a/atomic-assembler/atomic_assembler/widgets/confirmation_modal.py+++ b/atomic-assembler/atomic_assembler/widgets/confirmation_modal.py@@ -3,7 +3,7 @@ from textual.screen import ModalScreenfrom textual.widgets import Staticfrom textual.containers import Verticalfrom textual.app import ComposeResult-from atomic_assembler.constants import PRIMARY_COLOR, SECONDARY_COLOR+from atomic_assembler.constants import PRIMARY_COLORfrom typing import Callablediff --git a/atomic-assembler/atomic_assembler/widgets/gradient_title.py b/atomic-assembler/atomic_assembler/widgets/gradient_title.pyindex 1210e25..0046cb6 100644--- a/atomic-assembler/atomic_assembler/widgets/gradient_title.py+++ b/atomic-assembler/atomic_assembler/widgets/gradient_title.py@@ -1,6 +1,5 @@import mathfrom typing import List-from logging import Loggerfrom pyfiglet import Figletfrom rich.align import Aligndiff --git a/atomic-assembler/atomic_assembler/widgets/new_item_input.py b/atomic-assembler/atomic_assembler/widgets/new_item_input.pyindex 2014203..78ef29e 100644--- a/atomic-assembler/atomic_assembler/widgets/new_item_input.py+++ b/atomic-assembler/atomic_assembler/widgets/new_item_input.py@@ -1,7 +1,6 @@from textual.widgets import Inputfrom textual.binding import Bindingfrom textual.message import Message-from pathlib import Pathclass NewItemInput(Input):diff --git a/atomic-assembler/atomic_assembler/widgets/tool_info_display.py b/atomic-assembler/atomic_assembler/widgets/tool_info_display.pyindex 9fa70ff..8dbe703 100644--- a/atomic-assembler/atomic_assembler/widgets/tool_info_display.py+++ b/atomic-assembler/atomic_assembler/widgets/tool_info_display.py@@ -4,9 +4,7 @@ from textual.containers import ScrollableContainerfrom textual.widgets import Staticfrom textual.app import ComposeResultfrom atomic_assembler.constants import (- BORDER_STYLE,PRIMARY_COLOR,- SECONDARY_COLOR,)diff --git a/atomic-examples/deep-research/deep_research/agents/choice_agent.py b/atomic-examples/deep-research/deep_research/agents/choice_agent.pyindex 3697f21..9f3ea13 100644--- a/atomic-examples/deep-research/deep_research/agents/choice_agent.py+++ b/atomic-examples/deep-research/deep_research/agents/choice_agent.py@@ -1,7 +1,6 @@import instructorimport openaifrom pydantic import Field-from typing import Dict, Optionalfrom atomic_agents.agents.base_agent import BaseIOSchema, BaseAgent, BaseAgentConfigfrom atomic_agents.lib.components.system_prompt_generator import SystemPromptGeneratordiff --git a/atomic-examples/deep-research/deep_research/agents/qa_agent.py b/atomic-examples/deep-research/deep_research/agents/qa_agent.pyindex a099e43..c12b549 100644--- a/atomic-examples/deep-research/deep_research/agents/qa_agent.py+++ b/atomic-examples/deep-research/deep_research/agents/qa_agent.py@@ -19,7 +19,11 @@ class QuestionAnsweringAgentOutputSchema(BaseIOSchema):answer: str = Field(..., description="The answer to the question.")follow_up_questions: list[str] = Field(...,- description="Specific questions about the topic that would help the user learn more details about the subject matter. For example, if discussing a Nobel Prize winner, suggest questions about their research, impact, or related scientific concepts.",+ description=(+ "Specific questions about the topic that would help the user learn more details about the subject matter. "+ "For example, if discussing a Nobel Prize winner, suggest questions about their research, impact, or "+ "related scientific concepts."+ ),)diff --git a/atomic-examples/deep-research/deep_research/agents/query_agent.py b/atomic-examples/deep-research/deep_research/agents/query_agent.pyindex 54091e8..3032fe9 100644--- a/atomic-examples/deep-research/deep_research/agents/query_agent.py+++ b/atomic-examples/deep-research/deep_research/agents/query_agent.py@@ -21,7 +21,10 @@ query_agent = BaseAgent(model=ChatConfig.model,system_prompt_generator=SystemPromptGenerator(background=[- "You are an expert search engine query generator with a deep understanding of which queries will maximize the number of relevant results.",+ (+ "You are an expert search engine query generator with a deep understanding of which"+ "queries will maximize the number of relevant results."+ )],steps=["Analyze the given instruction to identify key concepts and aspects that need to be researched",diff --git a/atomic-examples/deep-research/deep_research/main.py b/atomic-examples/deep-research/deep_research/main.pyindex fd0d09f..264b0b9 100644--- a/atomic-examples/deep-research/deep_research/main.py+++ b/atomic-examples/deep-research/deep_research/main.py@@ -5,15 +5,10 @@ from deep_research.agents.qa_agent import (QuestionAnsweringAgentOutputSchema,)from deep_research.agents.choice_agent import choice_agent, ChoiceAgentInputSchema-from deep_research.config import ChatConfigfrom deep_research.tools.searxng_search import SearxNGSearchTool, SearxNGSearchToolConfig, SearxNGSearchToolInputSchemafrom deep_research.tools.webpage_scraper import WebpageScraperTool, WebpageScraperToolInputSchemafrom deep_research.context_providers import ContentItem, CurrentDateContextProvider, ScrapedContentContextProvider-from atomic_agents.lib.components.agent_memory import AgentMemory-from atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig-from deep_research.agents.choice_agent import ChoiceAgentInputSchema, choice_agent-from rich import print@@ -54,7 +49,11 @@ def initialize_conversation_memory() -> None:# Create the initial response using the output schemainitial_answer = QuestionAnsweringAgentOutputSchema(- answer="""Quantum computing is a revolutionary technology that uses quantum mechanics to perform computations. Unlike classical computers that use bits (0 or 1), quantum computers use quantum bits or 'qubits' that can exist in multiple states simultaneously due to superposition.""",+ answer=(+ "Quantum computing is a revolutionary technology that uses quantum mechanics to perform computations."+ "Unlike classical computers that use bits (0 or 1), quantum computers use quantum bits or 'qubits' "+ "that can exist in multiple states simultaneously due to superposition."+ ),follow_up_questions=["What are the main challenges in building a practical quantum computer?","How does quantum entanglement contribute to quantum computing power?",@@ -114,18 +113,22 @@ def chat_loop() -> None:choice_agent_output = choice_agent.run(ChoiceAgentInputSchema(user_message=user_message,- decision_type="Should we perform a new web search? TRUE if we need new or updated information, FALSE if existing context is sufficient. Consider: 1) Is the context empty? 2) Is the existing information relevant? 3) Is the information recent enough?",+ decision_type=(+ "Should we perform a new web search? TRUE if we need new or updated information, FALSE if existing "+ "context is sufficient. Consider: 1) Is the context empty? 2) Is the existing information relevant? "+ "3) Is the information recent enough?"+ ),))if choice_agent_output.decision:- print(f"\n[bold yellow]Performing new search[/bold yellow]")+ print("\n[bold yellow]Performing new search[/bold yellow]")print(f"Reason: {choice_agent_output.reasoning}")# Perform search and update contextperform_search_and_update_context(user_message, scraped_content_context_provider)else:- print(f"\n[bold green]Using existing context[/bold green]")+ print("\n[bold green]Using existing context[/bold green]")print(f"Reason: {choice_agent_output.reasoning}")# Get and display the answerdiff --git a/atomic-examples/deep-research/deep_research/tools/searxng_search.py b/atomic-examples/deep-research/deep_research/tools/searxng_search.pyindex f6f271e..4d1582e 100644--- a/atomic-examples/deep-research/deep_research/tools/searxng_search.py+++ b/atomic-examples/deep-research/deep_research/tools/searxng_search.py@@ -1,4 +1,3 @@-import osfrom typing import List, Literal, Optionalimport asynciofrom concurrent.futures import ThreadPoolExecutor@@ -205,9 +204,7 @@ if __name__ == "__main__":load_dotenv()rich_console = Console()- search_tool_instance = SearxNGSearchTool(- config=SearxNGSearchToolConfig(base_url="http://localhost:8080", max_results=5)- )+ search_tool_instance = SearxNGSearchTool(config=SearxNGSearchToolConfig(base_url="http://localhost:8080", max_results=5))search_input = SearxNGSearchTool.input_schema(queries=["Python programming", "Machine learning", "Artificial intelligence"],diff --git a/atomic-examples/deep-research/deep_research/tools/webpage_scraper.py b/atomic-examples/deep-research/deep_research/tools/webpage_scraper.pyindex 60721e2..32d0fdd 100644--- a/atomic-examples/deep-research/deep_research/tools/webpage_scraper.py+++ b/atomic-examples/deep-research/deep_research/tools/webpage_scraper.py@@ -1,4 +1,4 @@-from typing import List, Optional+from typing import Optionalfrom urllib.parse import urlparseimport rediff --git a/atomic-examples/orchestration-agent/orchestration_agent/orchestrator.py b/atomic-examples/orchestration-agent/orchestration_agent/orchestrator.pyindex 3a5688d..7c59551 100644--- a/atomic-examples/orchestration-agent/orchestration_agent/orchestrator.py+++ b/atomic-examples/orchestration-agent/orchestration_agent/orchestrator.py@@ -1,4 +1,4 @@-from typing import Union, List+from typing import Unionimport openaifrom pydantic import Fieldfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig@@ -181,4 +181,3 @@ if __name__ == "__main__":# Reset the memory after each responseorchestrator_agent.memory = AgentMemory()-diff --git a/atomic-examples/orchestration-agent/orchestration_agent/tools/searxng_search.py b/atomic-examples/orchestration-agent/orchestration_agent/tools/searxng_search.pyindex f6f271e..4d1582e 100644--- a/atomic-examples/orchestration-agent/orchestration_agent/tools/searxng_search.py+++ b/atomic-examples/orchestration-agent/orchestration_agent/tools/searxng_search.py@@ -1,4 +1,3 @@-import osfrom typing import List, Literal, Optionalimport asynciofrom concurrent.futures import ThreadPoolExecutor@@ -205,9 +204,7 @@ if __name__ == "__main__":load_dotenv()rich_console = Console()- search_tool_instance = SearxNGSearchTool(- config=SearxNGSearchToolConfig(base_url="http://localhost:8080", max_results=5)- )+ search_tool_instance = SearxNGSearchTool(config=SearxNGSearchToolConfig(base_url="http://localhost:8080", max_results=5))search_input = SearxNGSearchTool.input_schema(queries=["Python programming", "Machine learning", "Artificial intelligence"],diff --git a/atomic-examples/web-search-agent/web_search_agent/agents/question_answering_agent.py b/atomic-examples/web-search-agent/web_search_agent/agents/question_answering_agent.pyindex 5066f87..5859613 100644--- a/atomic-examples/web-search-agent/web_search_agent/agents/question_answering_agent.py+++ b/atomic-examples/web-search-agent/web_search_agent/agents/question_answering_agent.py@@ -16,8 +16,12 @@ class QuestionAnsweringAgentOutputSchema(BaseIOSchema):"""This schema defines the output schema for the QuestionAnsweringAgent."""markdown_output: str = Field(..., description="The answer to the question in markdown format.")- references: List[HttpUrl] = Field(..., max_items=3, description="A list of up to 3 HTTP URLs used as references for the answer.")- followup_questions: List[str] = Field(..., max_items=3, description="A list of up to 3 follow-up questions related to the answer.")+ references: List[HttpUrl] = Field(+ ..., max_items=3, description="A list of up to 3 HTTP URLs used as references for the answer."+ )+ followup_questions: List[str] = Field(+ ..., max_items=3, description="A list of up to 3 follow-up questions related to the answer."+ )# Create the question answering agentdiff --git a/atomic-examples/web-search-agent/web_search_agent/main.py b/atomic-examples/web-search-agent/web_search_agent/main.pyindex 063e952..fcb9a6d 100644--- a/atomic-examples/web-search-agent/web_search_agent/main.py+++ b/atomic-examples/web-search-agent/web_search_agent/main.py@@ -28,12 +28,7 @@ console = Console()memory = AgentMemory()# Initialize the SearxNGSearchTool-search_tool = SearxNGSearchTool(- config=SearxNGSearchToolConfig(- base_url=os.getenv("SEARXNG_BASE_URL"),- max_results=5- )-)+search_tool = SearxNGSearchTool(config=SearxNGSearchToolConfig(base_url=os.getenv("SEARXNG_BASE_URL"), max_results=5))# Initialize the BaseAgentagent = BaseAgent(@@ -57,10 +52,8 @@ for query in generated_queries.queries:console.print(f"- {query}")# Perform searches using the generated queries-search_input = SearxNGSearchToolInputSchema(- queries=generated_queries.queries,- category="general"-)+search_input = SearxNGSearchToolInputSchema(queries=generated_queries.queries, category="general")+class SearchResultsProvider(SystemPromptContextProviderBase):def __init__(self, title: str):diff --git a/atomic-examples/youtube-summarizer/youtube_summarizer/agent.py b/atomic-examples/youtube-summarizer/youtube_summarizer/agent.pyindex 1570734..ccde8ed 100644--- a/atomic-examples/youtube-summarizer/youtube_summarizer/agent.py+++ b/atomic-examples/youtube-summarizer/youtube_summarizer/agent.py@@ -1,6 +1,6 @@import instructorimport openai-from pydantic import BaseModel, Field+from pydantic import Fieldfrom typing import List, Optionalfrom atomic_agents.agents.base_agent import BaseAgent, BaseAgentConfig, BaseIOSchemadiff --git a/atomic-examples/youtube-summarizer/youtube_summarizer/main.py b/atomic-examples/youtube-summarizer/youtube_summarizer/main.pyindex 3809ced..e87016a 100644--- a/atomic-examples/youtube-summarizer/youtube_summarizer/main.py+++ b/atomic-examples/youtube-summarizer/youtube_summarizer/main.py@@ -2,8 +2,6 @@ import osfrom dotenv import load_dotenvfrom rich.console import Console-from atomic_agents.lib.components.agent_memory import AgentMemory-from youtube_summarizer.tools.youtube_transcript_scraper import (YouTubeTranscriptTool,YouTubeTranscriptToolConfig,diff --git a/atomic-examples/youtube-to-recipe/youtube_to_recipe/main.py b/atomic-examples/youtube-to-recipe/youtube_to_recipe/main.pyindex 141940f..1d9a171 100644--- a/atomic-examples/youtube-to-recipe/youtube_to_recipe/main.py+++ b/atomic-examples/youtube-to-recipe/youtube_to_recipe/main.py@@ -2,8 +2,6 @@ import osfrom dotenv import load_dotenvfrom rich.console import Console-from atomic_agents.lib.components.agent_memory import AgentMemory-from youtube_to_recipe.tools.youtube_transcript_scraper import (YouTubeTranscriptTool,YouTubeTranscriptToolConfig,diff --git a/atomic-forge/tools/calculator/tests/test_calculator.py b/atomic-forge/tools/calculator/tests/test_calculator.pyindex f30662d..07ff082 100644--- a/atomic-forge/tools/calculator/tests/test_calculator.py+++ b/atomic-forge/tools/calculator/tests/test_calculator.py@@ -1,11 +1,9 @@import osimport sys-import io-from unittest.mock import patchsys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))-from tool.calculator import (+from tool.calculator import ( # noqa: E402CalculatorTool,CalculatorToolInputSchema,CalculatorToolOutputSchema,diff --git a/atomic-forge/tools/searxng_search/tests/test_searxng_search.py b/atomic-forge/tools/searxng_search/tests/test_searxng_search.pyindex be19f2e..adf643d 100644--- a/atomic-forge/tools/searxng_search/tests/test_searxng_search.py+++ b/atomic-forge/tools/searxng_search/tests/test_searxng_search.py@@ -2,14 +2,12 @@ import osimport sysimport pytestfrom unittest.mock import patch, AsyncMock, MagicMock-import aiohttpfrom aiohttp import ClientSessionsys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))-from tool.searxng_search import (+from tool.searxng_search import ( # noqa: E402SearxNGSearchTool,- SearxNGSearchResultItemSchema,SearxNGSearchToolInputSchema,SearxNGSearchToolOutputSchema,SearxNGSearchToolConfig,diff --git a/atomic-forge/tools/webpage_scraper/tool/webpage_scraper.py b/atomic-forge/tools/webpage_scraper/tool/webpage_scraper.pyindex 70154bc..5513c7b 100644--- a/atomic-forge/tools/webpage_scraper/tool/webpage_scraper.py+++ b/atomic-forge/tools/webpage_scraper/tool/webpage_scraper.py@@ -1,4 +1,4 @@-from typing import List, Optional+from typing import Optionalfrom urllib.parse import urlparseimport rediff --git a/atomic-forge/tools/youtube_transcript_scraper/tests/test_youtube_transcript_scraper.py b/atomic-forge/tools/youtube_transcript_scraper/tests/test_youtube_transcript_scraper.pyindex 860518a..f9a9422 100644--- a/atomic-forge/tools/youtube_transcript_scraper/tests/test_youtube_transcript_scraper.py+++ b/atomic-forge/tools/youtube_transcript_scraper/tests/test_youtube_transcript_scraper.py@@ -8,7 +8,7 @@ from youtube_transcript_api import NoTranscriptFound, TranscriptsDisabled# Add the parent directory of 'tests' to the Python pathsys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))-from tool.youtube_transcript_scraper import (+from tool.youtube_transcript_scraper import ( # noqa: E402YouTubeTranscriptTool,YouTubeTranscriptToolInputSchema,YouTubeTranscriptToolOutputSchema,@@ -123,7 +123,6 @@ def test_youtube_transcript_tool_transcripts_disabled():def test_fetch_video_metadata_no_items():mock_api_key = "mock_api_key"- mock_video_url = "https://www.youtube.com/watch?v=dQw4w9WgXcQ"with patch("tool.youtube_transcript_scraper.build") as mock_build:mock_youtube = MagicMock()