Building AI agents, atomically
fix(docs): correct broken links and automate version sync
KennyVaneetveldebf2d5e6be81f
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.ymlindex 453a023..454e651 100644--- a/.github/workflows/docs.yml+++ b/.github/workflows/docs.yml@@ -36,6 +36,10 @@ jobs:pip install poetrypoetry install+ - name: Sync version from pyproject.toml+ run: |+ poetry run python scripts/sync_version.py+- name: Build documentationrun: |cd docs@@ -48,9 +52,10 @@ jobs:- name: Copy llms files to build directoryrun: |- cp docs/llms-*.txt docs/_build/html/+ mkdir -p docs/_build/html/_static+ cp docs/llms-*.txt docs/_build/html/_static/echo "Generated llms files:"- ls -lh docs/_build/html/llms-*.txt+ ls -lh docs/_build/html/_static/llms-*.txt- name: Upload artifactuses: actions/upload-pages-artifact@v3diff --git a/docs/conf.py b/docs/conf.pyindex ec50f13..55c4374 100644--- a/docs/conf.py+++ b/docs/conf.py@@ -6,8 +6,8 @@ sys.path.insert(0, os.path.abspath(".."))project = "Atomic Agents"copyright = "2024, Kenny Vaneetvelde"author = "Kenny Vaneetvelde"-version = "1.1.0"-release = "1.1.0"+version = "2.0.4"+release = "2.0.4"extensions = ["sphinx.ext.autodoc",diff --git a/docs/examples/index.md b/docs/examples/index.mdindex 70c9448..6260c44 100644--- a/docs/examples/index.md+++ b/docs/examples/index.md@@ -4,8 +4,8 @@ This section contains detailed examples of using Atomic Agents in various scenar```{note}All examples are available in optimized formats for AI assistants:-- **[Examples with documentation](../llms-examples.txt)** - All examples with source code and READMEs-- **[Full framework package](../llms-full.txt)** - Complete documentation, source, and examples+- **[Examples with documentation](../_static/llms-examples.txt)** - All examples with source code and READMEs+- **[Full framework package](../_static/llms-full.txt)** - Complete documentation, source, and examples```## Quickstart Examples@@ -18,7 +18,7 @@ Simple examples to get started with the framework:- Custom input/output schemas- Multiple provider support-π **[View on GitHub](https://github.com/BrainBlend-AI/atomic-monorepo/tree/main/atomic-examples/quickstart)** - Browse the complete source code and run the examples+π **[View on GitHub](https://github.com/BrainBlend-AI/atomic-agents/tree/main/atomic-examples/quickstart)** - Browse the complete source code and run the examples## Basic Multimodal@@ -29,7 +29,7 @@ Examples of working with images and text:- Visual content generation- Multi-image comparisons-π **[View on GitHub](https://github.com/BrainBlend-AI/atomic-monorepo/tree/main/atomic-examples/basic-multimodal)** - Browse the complete source code and run the examples+π **[View on GitHub](https://github.com/BrainBlend-AI/atomic-agents/tree/main/atomic-examples/basic-multimodal)** - Browse the complete source code and run the examples## RAG Chatbot@@ -41,7 +41,7 @@ Build context-aware chatbots with retrieval-augmented generation:- Source attribution- Follow-up suggestions-π **[View on GitHub](https://github.com/BrainBlend-AI/atomic-monorepo/tree/main/atomic-examples/rag-chatbot)** - Browse the complete source code and run the examples+π **[View on GitHub](https://github.com/BrainBlend-AI/atomic-agents/tree/main/atomic-examples/rag-chatbot)** - Browse the complete source code and run the examples## Web Search Agent@@ -53,7 +53,7 @@ Create agents that can search and analyze web content:- Multi-source research- Citation tracking-π **[View on GitHub](https://github.com/BrainBlend-AI/atomic-monorepo/tree/main/atomic-examples/web-search-agent)** - Browse the complete source code and run the examples+π **[View on GitHub](https://github.com/BrainBlend-AI/atomic-agents/tree/main/atomic-examples/web-search-agent)** - Browse the complete source code and run the examples## Deep Research@@ -65,7 +65,7 @@ Perform comprehensive research tasks:- Structured output generation- Citation management-π **[View on GitHub](https://github.com/BrainBlend-AI/atomic-monorepo/tree/main/atomic-examples/deep-research)** - Browse the complete source code and run the examples+π **[View on GitHub](https://github.com/BrainBlend-AI/atomic-agents/tree/main/atomic-examples/deep-research)** - Browse the complete source code and run the examples## YouTube Summarizer@@ -77,7 +77,7 @@ Extract and analyze information from videos:- Timestamp linking- Chapter generation-π **[View on GitHub](https://github.com/BrainBlend-AI/atomic-monorepo/tree/main/atomic-examples/youtube-summarizer)** - Browse the complete source code and run the examples+π **[View on GitHub](https://github.com/BrainBlend-AI/atomic-agents/tree/main/atomic-examples/youtube-summarizer)** - Browse the complete source code and run the examples## YouTube to Recipe@@ -89,7 +89,7 @@ Convert cooking videos into structured recipes:- Step-by-step instructions- Time and temperature conversion-π **[View on GitHub](https://github.com/BrainBlend-AI/atomic-monorepo/tree/main/atomic-examples/youtube-to-recipe)** - Browse the complete source code and run the examples+π **[View on GitHub](https://github.com/BrainBlend-AI/atomic-agents/tree/main/atomic-examples/youtube-to-recipe)** - Browse the complete source code and run the examples## Orchestration Agent@@ -101,7 +101,7 @@ Coordinate multiple agents for complex tasks:- Error handling- Result aggregation-π **[View on GitHub](https://github.com/BrainBlend-AI/atomic-monorepo/tree/main/atomic-examples/orchestration-agent)** - Browse the complete source code and run the examples+π **[View on GitHub](https://github.com/BrainBlend-AI/atomic-agents/tree/main/atomic-examples/orchestration-agent)** - Browse the complete source code and run the examples## MCP Agent@@ -114,4 +114,4 @@ Build intelligent agents using the Model Context Protocol:- Extensible tool architecture[View MCP Agent Documentation](mcp_agent.md)-π **[View on GitHub](https://github.com/BrainBlend-AI/atomic-monorepo/tree/main/atomic-examples/mcp-agent)** - Browse the complete source code and run the examples+π **[View on GitHub](https://github.com/BrainBlend-AI/atomic-agents/tree/main/atomic-examples/mcp-agent)** - Browse the complete source code and run the examplesdiff --git a/docs/index.md b/docs/index.mdindex 05151f6..e1f1419 100644--- a/docs/index.md+++ b/docs/index.md@@ -21,10 +21,10 @@ contributingChoose the resource that best fits your needs:-- **[π Full Package](llms-full.txt)** - Complete documentation, source code, and examples in one file-- **[π Documentation Only](llms-docs.txt)** - API documentation, guides, and references-- **[π» Source Code Only](llms-source.txt)** - Complete atomic-agents framework source code-- **[π― Examples Only](llms-examples.txt)** - All example implementations with READMEs+- **[π Full Package](_static/llms-full.txt)** - Complete documentation, source code, and examples in one file+- **[π Documentation Only](_static/llms-docs.txt)** - API documentation, guides, and references+- **[π» Source Code Only](_static/llms-source.txt)** - Complete atomic-agents framework source code+- **[π― Examples Only](_static/llms-examples.txt)** - All example implementations with READMEsAll files are optimized for AI assistants and Large Language Models, with clear structure and formatting for easy parsing.```diff --git a/scripts/generate_llms_files.py b/scripts/generate_llms_files.pyindex 09509be..251b3de 100644--- a/scripts/generate_llms_files.py+++ b/scripts/generate_llms_files.py@@ -115,7 +115,7 @@ def generate_documentation_only() -> str:content = create_section_divider("ATOMIC AGENTS DOCUMENTATION", 1)content += "This file contains the complete documentation for the Atomic Agents framework.\n"content += "Generated for use with Large Language Models and AI assistants.\n"- content += f"Project Repository: https://github.com/BrainBlend-AI/atomic-monorepo\n"+ content += f"Project Repository: https://github.com/BrainBlend-AI/atomic-agents\n"content += create_section_divider("DOCUMENTATION", 1)content += extract_documentation_from_html()@@ -128,7 +128,7 @@ def generate_source_code_only() -> str:content = create_section_divider("ATOMIC AGENTS SOURCE CODE", 1)content += "This file contains the complete source code for the Atomic Agents framework.\n"content += "Generated for use with Large Language Models and AI assistants.\n"- content += f"Project Repository: https://github.com/BrainBlend-AI/atomic-monorepo\n"+ content += f"Project Repository: https://github.com/BrainBlend-AI/atomic-agents\n"files = get_files_to_include(ATOMIC_AGENTS_DIR, SOURCE_CODE_EXTENSIONS)@@ -143,7 +143,7 @@ def generate_examples_only() -> str:content = create_section_divider("ATOMIC AGENTS EXAMPLES", 1)content += "This file contains all example implementations using the Atomic Agents framework.\n"content += "Each example includes its README documentation and complete source code.\n"- content += f"Project Repository: https://github.com/BrainBlend-AI/atomic-monorepo\n"+ content += f"Project Repository: https://github.com/BrainBlend-AI/atomic-agents\n"# Get all example directoriesexample_dirs = [d for d in ATOMIC_EXAMPLES_DIR.iterdir() if d.is_dir() and d.name not in EXCLUDE_DIRS]@@ -153,7 +153,7 @@ def generate_examples_only() -> str:content += create_section_divider(f"Example: {example_dir.name}", 2)# Add GitHub link- github_url = f"https://github.com/BrainBlend-AI/atomic-monorepo/tree/main/atomic-examples/{example_dir.name}"+ github_url = f"https://github.com/BrainBlend-AI/atomic-agents/tree/main/atomic-examples/{example_dir.name}"content += f"**View on GitHub:** {github_url}\n\n"# Process README first if it exists@@ -184,7 +184,7 @@ def generate_full_content() -> str:content = create_section_divider("ATOMIC AGENTS - COMPREHENSIVE DOCUMENTATION, SOURCE CODE, AND EXAMPLES", 1)content += "This file contains the complete documentation, source code, and examples for the Atomic Agents framework.\n"content += "Generated for use with Large Language Models and AI assistants.\n"- content += f"Project Repository: https://github.com/BrainBlend-AI/atomic-monorepo\n"+ content += f"Project Repository: https://github.com/BrainBlend-AI/atomic-agents\n"content += f"\nTable of Contents:\n"content += "1. Documentation\n"content += "2. Atomic Agents Source Code\n"@@ -214,7 +214,7 @@ def generate_full_content() -> str:for example_dir in example_dirs:content += create_section_divider(f"Example: {example_dir.name}", 2)- github_url = f"https://github.com/BrainBlend-AI/atomic-monorepo/tree/main/atomic-examples/{example_dir.name}"+ github_url = f"https://github.com/BrainBlend-AI/atomic-agents/tree/main/atomic-examples/{example_dir.name}"content += f"**View on GitHub:** {github_url}\n\n"readme_files = list(example_dir.glob("README.*"))@@ -236,7 +236,7 @@ def generate_full_content() -> str:content += create_section_divider("END OF DOCUMENT", 1)content += "This comprehensive documentation was generated for use with AI assistants and LLMs.\n"- content += "For the latest version, please visit: https://github.com/BrainBlend-AI/atomic-monorepo\n"+ content += "For the latest version, please visit: https://github.com/BrainBlend-AI/atomic-agents\n"return contentdiff --git a/scripts/sync_version.py b/scripts/sync_version.pynew file mode 100644index 0000000..e83b23d--- /dev/null+++ b/scripts/sync_version.py@@ -0,0 +1,63 @@+#!/usr/bin/env python3+"""+Sync version from pyproject.toml to docs/conf.py+"""++import re+from pathlib import Path++# Define paths+PROJECT_ROOT = Path(__file__).parent.parent+PYPROJECT_FILE = PROJECT_ROOT / "pyproject.toml"+DOCS_CONF_FILE = PROJECT_ROOT / "docs" / "conf.py"++def get_version_from_pyproject():+ """Extract version from pyproject.toml using regex"""+ with open(PYPROJECT_FILE, 'r') as f:+ content = f.read()++ # Look for version line in [tool.poetry] section+ match = re.search(r'^version = ["\'](.*?)["\']', content, re.MULTILINE)+ if match:+ return match.group(1)+ else:+ raise ValueError("Could not find version in pyproject.toml")++def update_docs_conf(version):+ """Update version in docs/conf.py"""+ with open(DOCS_CONF_FILE, 'r') as f:+ content = f.read()++ # Replace version line+ content = re.sub(+ r'^version = "[^"]*"$',+ f'version = "{version}"',+ content,+ flags=re.MULTILINE+ )++ # Replace release line+ content = re.sub(+ r'^release = "[^"]*"$',+ f'release = "{version}"',+ content,+ flags=re.MULTILINE+ )++ with open(DOCS_CONF_FILE, 'w') as f:+ f.write(content)++ print(f"Updated docs/conf.py to version {version}")++def main():+ """Main function"""+ try:+ version = get_version_from_pyproject()+ print(f"Found version {version} in pyproject.toml")+ update_docs_conf(version)+ except Exception as e:+ print(f"Error: {e}")+ exit(1)++if __name__ == "__main__":+ main()\ No newline at end of file