Skip to content

Building AI agents, atomically

2.12.1: cap mcp below 2.0 and add a fresh-install import check (#308)

Kenny Vaneetveldeb93ef4f84161
diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml
index 3145f17..752ce19 100644
--- a/.github/workflows/code-quality.yml
+++ b/.github/workflows/code-quality.yml
@@ -57,3 +57,49 @@ jobs:
- name: Run Tests
run: uv run pytest --cov=atomic_agents atomic-agents
if: success()
+
+ fresh-install:
+ name: Fresh install imports every subpackage
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Set up Python
+ uses: actions/setup-python@v5
+ with:
+ python-version: '3.12'
+
+ - name: Install uv
+ uses: astral-sh/setup-uv@v4
+ with:
+ version: "latest"
+
+ - name: Build wheel
+ run: uv build --wheel --out-dir dist
+
+ - name: Install the wheel into a clean environment without the lockfile
+ run: |
+ uv venv fresh-install-venv
+ uv pip install --python fresh-install-venv "atomic-agents[observability] @ $(ls dist/*.whl)"
+
+ - name: Import every subpackage the way a new user would
+ run: |
+ fresh-install-venv/bin/python - <<'PY'
+ import importlib
+ import pkgutil
+
+ import atomic_agents
+
+ module_names = [module.name for module in pkgutil.walk_packages(atomic_agents.__path__, prefix="atomic_agents.")]
+ failures = []
+ for module_name in module_names:
+ try:
+ importlib.import_module(module_name)
+ except Exception as error:
+ failures.append(f"{module_name}: {type(error).__name__}: {error}")
+ print(f"imported {len(module_names)} modules from {atomic_agents.__file__}")
+ for failure in failures:
+ print(failure)
+ if failures:
+ raise SystemExit(1)
+ PY
diff --git a/.release/2.12.1.md b/.release/2.12.1.md
new file mode 100644
index 0000000..99754f0
--- /dev/null
+++ b/.release/2.12.1.md
@@ -0,0 +1,15 @@
+# Atomic Agents 2.12.1
+
+Patch release. No framework behavior changes.
+
+## Fix
+
+- Pin `mcp` below 2.0. A fresh `pip install atomic-agents` since late July resolved mcp 2.x, and `import atomic_agents.connectors.mcp` then failed with `ImportError: cannot import name 'streamablehttp_client'`. The repo lockfile kept resolving mcp 1.22, which is why the test suite never saw it. The mcp 2.x migration is scheduled for 2.13.0.
+
+## CI
+
+- New job builds the wheel, installs it into a clean environment without the lockfile, and imports every module under `atomic_agents`. This is the check that would have caught the break before release.
+
+## Compatibility
+
+Python 3.12 or newer. Projects already pinning `mcp<2` or resolving 1.x see no change. Projects that need mcp 2.x should wait for 2.13.0.
diff --git a/pyproject.toml b/pyproject.toml
index dbc9960..d5f1666 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -32,7 +32,7 @@ dependencies = [
"textual>=5.3.0,<6.0.0",
"pyyaml>=6.0.2,<7.0.0",
"requests>=2.32.3,<3.0.0",
- "mcp[cli]>=1.6.0",
+ "mcp[cli]>=1.6.0,<2",
"litellm>=1.50.0,<2.0.0",
]
diff --git a/uv.lock b/uv.lock
index 6df3f80..3aa0da6 100644
--- a/uv.lock
+++ b/uv.lock
@@ -309,7 +309,7 @@ requires-dist = [
{ name = "gitpython", specifier = ">=3.1.43,<4.0.0" },
{ name = "instructor", specifier = "==1.14.5" },
{ name = "litellm", specifier = ">=1.50.0,<2.0.0" },
- { name = "mcp", extras = ["cli"], specifier = ">=1.6.0" },
+ { name = "mcp", extras = ["cli"], specifier = ">=1.6.0,<2" },
{ name = "openinference-instrumentation", marker = "extra == 'observability'", specifier = ">=0.1.38,<0.2.0" },
{ name = "openinference-semantic-conventions", marker = "extra == 'observability'", specifier = ">=0.1.20,<0.2.0" },
{ name = "opentelemetry-api", marker = "extra == 'observability'", specifier = ">=1.30.0,<2.0.0" },