Skip to content

Building AI agents, atomically

Add build scripts and GitHub Actions workflow for docs generation and deployment

KennyVaneetvelded54a0a1ec324
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index 2c8e9a7..c9c3633 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -41,6 +41,10 @@ jobs:
cd docs
poetry run make html
+ - name: Generate llms.txt
+ run: |
+ poetry run python scripts/generate_llms_txt.py
+
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
diff --git a/README.md b/README.md
index efdc909..51a93fb 100644
--- a/README.md
+++ b/README.md
@@ -19,6 +19,8 @@
- [Table of Contents](#table-of-contents)
- [Overview](#overview)
- [📚 Documentation](#-documentation)
+ - [Watch the Overview Video](#watch-the-overview-video)
+ - [Watch the Quickstart Video](#watch-the-quickstart-video)
- [Why Atomic Agents?](#why-atomic-agents)
- [Anatomy of an Agent](#anatomy-of-an-agent)
- [Installation](#installation)
@@ -75,6 +77,8 @@ If you just want to dive into the code straight away, I suggest checking out the
<img src="./.assets/video-thumbnail-2.png" alt="Watch the video" width="350"/>
</a>
+---
+
## Why Atomic Agents?
While existing frameworks for agentic AI focus on building autonomous multi-agent systems, they often lack the control and predictability required for real-world applications. Businesses need AI systems that produce consistent, reliable outputs aligned with their brand and objectives.
diff --git a/poetry.lock b/poetry.lock
index 28fbb44..1535da8 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -226,6 +226,29 @@ files = [
[package.extras]
dev = ["backports.zoneinfo", "freezegun (>=1.0,<2.0)", "jinja2 (>=3.0)", "pytest (>=6.0)", "pytest-cov", "pytz", "setuptools", "tzdata"]
+[[package]]
+name = "beautifulsoup4"
+version = "4.13.4"
+description = "Screen-scraping library"
+optional = false
+python-versions = ">=3.7.0"
+groups = ["dev"]
+files = [
+ {file = "beautifulsoup4-4.13.4-py3-none-any.whl", hash = "sha256:9bbbb14bfde9d79f38b8cd5f8c7c85f4b8f2523190ebed90e950a8dea4cb1c4b"},
+ {file = "beautifulsoup4-4.13.4.tar.gz", hash = "sha256:dbb3c4e1ceae6aefebdaf2423247260cd062430a410e38c66f2baa50a8437195"},
+]
+
+[package.dependencies]
+soupsieve = ">1.2"
+typing-extensions = ">=4.0.0"
+
+[package.extras]
+cchardet = ["cchardet"]
+chardet = ["chardet"]
+charset-normalizer = ["charset-normalizer"]
+html5lib = ["html5lib"]
+lxml = ["lxml"]
+
[[package]]
name = "black"
version = "24.10.0"
@@ -1049,6 +1072,22 @@ profiling = ["gprof2dot"]
rtd = ["jupyter_sphinx", "mdit-py-plugins", "myst-parser", "pyyaml", "sphinx", "sphinx-copybutton", "sphinx-design", "sphinx_book_theme"]
testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"]
+[[package]]
+name = "markdownify"
+version = "0.14.1"
+description = "Convert HTML to markdown."
+optional = false
+python-versions = "*"
+groups = ["dev"]
+files = [
+ {file = "markdownify-0.14.1-py3-none-any.whl", hash = "sha256:4c46a6c0c12c6005ddcd49b45a5a890398b002ef51380cd319db62df5e09bc2a"},
+ {file = "markdownify-0.14.1.tar.gz", hash = "sha256:a62a7a216947ed0b8dafb95b99b2ef4a0edd1e18d5653c656f68f03db2bfb2f1"},
+]
+
+[package.dependencies]
+beautifulsoup4 = ">=4.9,<5"
+six = ">=1.15,<2"
+
[[package]]
name = "markupsafe"
version = "3.0.2"
@@ -1959,6 +1998,18 @@ files = [
{file = "shellingham-1.5.4.tar.gz", hash = "sha256:8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de"},
]
+[[package]]
+name = "six"
+version = "1.17.0"
+description = "Python 2 and 3 compatibility utilities"
+optional = false
+python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7"
+groups = ["dev"]
+files = [
+ {file = "six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274"},
+ {file = "six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81"},
+]
+
[[package]]
name = "smmap"
version = "5.0.2"
@@ -1995,6 +2046,18 @@ files = [
{file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"},
]
+[[package]]
+name = "soupsieve"
+version = "2.7"
+description = "A modern CSS selector implementation for Beautiful Soup."
+optional = false
+python-versions = ">=3.8"
+groups = ["dev"]
+files = [
+ {file = "soupsieve-2.7-py3-none-any.whl", hash = "sha256:6e60cc5c1ffaf1cebcc12e8188320b72071e922c2e897f737cadce79ad5d30c4"},
+ {file = "soupsieve-2.7.tar.gz", hash = "sha256:ad282f9b6926286d2ead4750552c8a6142bc4c783fd66b0293547c8fe6ae126a"},
+]
+
[[package]]
name = "sphinx"
version = "7.4.7"
@@ -2757,4 +2820,4 @@ propcache = ">=0.2.1"
[metadata]
lock-version = "2.1"
python-versions = ">=3.10,<4.0"
-content-hash = "2b260321fe56f702733ba3a8ad0cdcac0dd672169c5c9f28fef1be2dbb11580d"
+content-hash = "dbae39466e9de82d47f6c1e50fe4756dcaedd47fa6851738c30d39cf216a082d"
diff --git a/pyproject.toml b/pyproject.toml
index 8513dd3..b6ac5b9 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -40,6 +40,8 @@ myst-parser = ">=2.0.0,<3.0.0"
sphinx-copybutton = ">=0.5.2,<1.0.0"
sphinx-design = ">=0.5.0,<1.0.0"
sphinx-autobuild = ">=2024.2.4,<2025.0.0"
+beautifulsoup4 = ">=4.12.3,<5.0.0"
+markdownify = ">=0.9.0,<1.0.0"
[tool.poetry.scripts]
atomic = "atomic_assembler.main:main"
diff --git a/scripts/generate_llms_txt.py b/scripts/generate_llms_txt.py
new file mode 100644
index 0000000..1551921
--- /dev/null
+++ b/scripts/generate_llms_txt.py
@@ -0,0 +1,33 @@
+import os
+from bs4 import BeautifulSoup
+from markdownify import markdownify as md
+
+# Paths
+docs_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'docs'))
+single_dir = os.path.join(docs_dir, '_build', 'singlehtml')
+build_html_dir = os.path.join(docs_dir, '_build', 'html')
+llms_txt_path = os.path.join(build_html_dir, 'llms.txt')
+
+# Read single HTML index
+html_file = os.path.join(single_dir, 'index.html')
+if not os.path.exists(html_file):
+ print("Error: singlehtml output not found. Build with sphinx-build -b singlehtml.")
+ exit(1)
+
+with open(html_file, encoding='utf-8') as f:
+ html = f.read()
+
+soup = BeautifulSoup(html, 'html.parser')
+# Extract main documentation content
+doc_main = soup.find('div', {'role': 'main'}) or soup.find('div', class_='document')
+content_html = str(doc_main) if doc_main else html
+
+# Convert to Markdown
+md_text = md(content_html)
+
+# Write full documentation to llms.txt
+os.makedirs(build_html_dir, exist_ok=True)
+with open(llms_txt_path, 'w', encoding='utf-8') as out_f:
+ out_f.write(md_text)
+
+print(f"Generated full llms.txt at {llms_txt_path}")