Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go/basic-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Minimal Go example showing how to initialize the Agent Assembly Go SDK and execu
| Requirement | Version |
|---|---|
| Go | >= 1.26 |
| Agent Assembly Go SDK | v0.0.1-rc.3 |
| Agent Assembly Go SDK | v0.0.1-rc.5 |

A live Agent Assembly gateway is **not required** to run this example. It uses an
offline mock `GovernanceClient` by default. To use a real gateway, replace `mockClient`
Expand Down
2 changes: 1 addition & 1 deletion go/cli-runtime-integration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Go example showing how to integrate the `aasm` CLI runtime sidecar into a Go age
| Requirement | Version |
|---|---|
| Go | >= 1.26 |
| Agent Assembly Go SDK | v0.0.1-rc.3 |
| Agent Assembly Go SDK | v0.0.1-rc.5 |
| `aasm` binary | Optional — example runs in fallback mode without it |

### Install `aasm` (optional)
Expand Down
2 changes: 1 addition & 1 deletion go/langchaingo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ agent's tool calls with Agent Assembly.
| Requirement | Version |
|---|---|
| Go | >= 1.26 |
| Agent Assembly Go SDK | v0.0.1-rc.3 |
| Agent Assembly Go SDK | v0.0.1-rc.5 |
| LangChainGo | v0.1.14 |

No live gateway and no LLM API key are required. Policy rules are applied by an
Expand Down
2 changes: 1 addition & 1 deletion go/tool-policy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Go example showing explicit allow and deny behavior using Agent Assembly policy
| Requirement | Version |
|---|---|
| Go | >= 1.26 |
| Agent Assembly Go SDK | v0.0.1-rc.3 |
| Agent Assembly Go SDK | v0.0.1-rc.5 |

No live gateway is required. Policy rules are applied by an in-process mock client.

Expand Down
2 changes: 1 addition & 1 deletion python/agno-tool-policy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Agno runs every function-tool call through a single chokepoint — `agno.tools.f
|---|---|
| Python | >= 3.12 |
| [uv](https://github.com/astral-sh/uv) | latest |
| Agent Assembly Python SDK | >= 0.0.1b4 |
| Agent Assembly Python SDK | >= 0.0.1rc5 |
| Agno | >= 2.0.0 |

No API key or running gateway is required for the offline demo.
Expand Down
2 changes: 1 addition & 1 deletion python/autogen-tool-policy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ AutoGen (the `autogen-core` runtime shared by AutoGen and the ag2 fork) has **no
|---|---|
| Python | >= 3.12 |
| [uv](https://github.com/astral-sh/uv) | latest |
| Agent Assembly Python SDK | >= 0.0.1rc3 |
| Agent Assembly Python SDK | >= 0.0.1rc5 |
| autogen-core | >= 0.7.5 |

No API key or running gateway is required for the offline demo.
Expand Down
2 changes: 1 addition & 1 deletion python/crewai-research-crew/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ audit event.
|---|---|
| Python | >= 3.12 |
| [uv](https://github.com/astral-sh/uv) | latest |
| Agent Assembly Python SDK | >= 0.0.1rc3 |
| Agent Assembly Python SDK | >= 0.0.1rc5 |

The mock demo needs no gateway, no `crewai`, and no API keys. The optional
`live` extra (`crewai`) is only required for the real-crew integration.
Expand Down
2 changes: 1 addition & 1 deletion python/custom-tool-policy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Demonstrates how to add [Agent Assembly](https://github.com/ai-agent-assembly/ex
|---|---|
| Python | >= 3.12 |
| [uv](https://github.com/astral-sh/uv) | latest |
| Agent Assembly Python SDK | >= 0.0.1rc3 |
| Agent Assembly Python SDK | >= 0.0.1rc5 |

No API key, no gateway, and no AI framework are required.

Expand Down
2 changes: 1 addition & 1 deletion python/google-adk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ In ADK 1.x, concrete tools (`FunctionTool` and custom `BaseTool` subclasses) ove
|---|---|
| Python | >= 3.12 |
| [uv](https://github.com/astral-sh/uv) | latest |
| Agent Assembly Python SDK | >= 0.0.1rc3 |
| Agent Assembly Python SDK | >= 0.0.1rc5 |

No running Agent Assembly gateway and no Google Cloud credentials are required for the offline demo.

Expand Down
2 changes: 1 addition & 1 deletion python/haystack-tool-policy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Haystack has a native adapter: `HaystackPatch` hooks `haystack.tools.Tool.invoke
|---|---|
| Python | >= 3.12 |
| [uv](https://github.com/astral-sh/uv) | latest |
| Agent Assembly Python SDK | >= 0.0.1rc3 |
| Agent Assembly Python SDK | >= 0.0.1rc5 |
| Haystack | >= 2.0.0, < 3.0 |

No API key or running gateway is required for the offline demo — the tools are driven through a `ToolInvoker` with a hand-built `ToolCall`, so no LLM is involved.
Expand Down
2 changes: 1 addition & 1 deletion python/langchain-basic-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Demonstrates how to integrate [Agent Assembly](https://github.com/ai-agent-assem
|---|---|
| Python | >= 3.12 |
| [uv](https://github.com/astral-sh/uv) | latest |
| Agent Assembly Python SDK | >= 0.0.1rc3 |
| Agent Assembly Python SDK | >= 0.0.1rc5 |

No running Agent Assembly gateway is required for the offline demo.

Expand Down
2 changes: 1 addition & 1 deletion python/langchain-research-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ a single *balanced* governance policy.
|---|---|
| Python | >= 3.12 |
| [uv](https://github.com/astral-sh/uv) | latest |
| Agent Assembly Python SDK | >= 0.0.1b2 |
| Agent Assembly Python SDK | >= 0.0.1rc5 |

No running Agent Assembly gateway and no API keys are required for the mock demo.

Expand Down
2 changes: 1 addition & 1 deletion python/langgraph/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The example runs **fully offline**: the graph is driven with deterministic nodes
|---|---|
| Python | >= 3.12 |
| [uv](https://github.com/astral-sh/uv) | latest |
| Agent Assembly Python SDK | >= 0.0.1rc3 |
| Agent Assembly Python SDK | >= 0.0.1rc5 |

No running Agent Assembly gateway is required for the offline demo.

Expand Down
2 changes: 1 addition & 1 deletion python/llamaindex-tool-policy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ LlamaIndex has a native Agent Assembly adapter (`agent_assembly.adapters.llamain
|---|---|
| Python | >= 3.12 |
| [uv](https://github.com/astral-sh/uv) | latest |
| Agent Assembly Python SDK | >= 0.0.1rc3 (with the LlamaIndex adapter) |
| Agent Assembly Python SDK | >= 0.0.1rc5 (with the LlamaIndex adapter) |

No API key or running gateway is required for the offline demo.

Expand Down
2 changes: 1 addition & 1 deletion python/microsoft-agent-framework-tool-policy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Like the rest of this gallery, the example runs two ways:
|---|---|
| Python | >= 3.12 |
| [uv](https://github.com/astral-sh/uv) | latest |
| Agent Assembly Python SDK | >= 0.0.1rc3 |
| Agent Assembly Python SDK | >= 0.0.1rc5 |

No running Agent Assembly gateway is required for the offline demo.

Expand Down
2 changes: 1 addition & 1 deletion python/openai-agents-sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Demonstrates how to integrate [Agent Assembly](https://github.com/ai-agent-assem
|---|---|
| Python | >= 3.12 |
| [uv](https://github.com/astral-sh/uv) | latest |
| Agent Assembly Python SDK | >= 0.0.1rc3 |
| Agent Assembly Python SDK | >= 0.0.1rc5 |

No `OPENAI_API_KEY` is required for the offline demo.

Expand Down
2 changes: 1 addition & 1 deletion python/pydantic-ai/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Demonstrates how to integrate [Agent Assembly](https://github.com/ai-agent-assem
|---|---|
| Python | >= 3.12 |
| [uv](https://github.com/astral-sh/uv) | latest |
| Agent Assembly Python SDK | >= 0.0.1rc3 |
| Agent Assembly Python SDK | >= 0.0.1rc5 |

No running Agent Assembly gateway is required for the offline demo.

Expand Down
2 changes: 1 addition & 1 deletion python/semantic-kernel-tool-policy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Because Semantic Kernel has no native adapter, this example governs it the frame
|---|---|
| Python | >= 3.12 |
| [uv](https://github.com/astral-sh/uv) | latest |
| Agent Assembly Python SDK | >= 0.0.1rc3 |
| Agent Assembly Python SDK | >= 0.0.1rc5 |
| semantic-kernel | >= 1.36.0 |

No API key or running gateway is required for the offline demo — the tools are native (code) `KernelFunction`s, so no LLM connector is configured.
Expand Down
2 changes: 1 addition & 1 deletion python/smolagents-tool-policy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ This is not a mock: the tools are real `smolagents.Tool` subclasses and the gove
|---|---|
| Python | >= 3.12 |
| [uv](https://github.com/astral-sh/uv) | latest |
| Agent Assembly Python SDK | >= 0.0.1rc3 |
| Agent Assembly Python SDK | >= 0.0.1rc5 |
| smolagents | >= 1.0, < 2.0 |

No running Agent Assembly gateway and no model/API credentials are required for the offline demo.
Expand Down
2 changes: 1 addition & 1 deletion python/strands-agents-tool-policy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Strands Agents has **no native Agent Assembly adapter**, so this example governs
|---|---|
| Python | >= 3.12 |
| [uv](https://github.com/astral-sh/uv) | latest |
| Agent Assembly Python SDK | >= 0.0.1rc3 |
| Agent Assembly Python SDK | >= 0.0.1rc5 |
| strands-agents | >= 1.47.0 |

No API key or running gateway is required for the offline demo.
Expand Down
2 changes: 1 addition & 1 deletion scenarios/policy-enforcement/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Rules are evaluated top-to-bottom. Any tool not listed falls through to the
| Node.js | >= 20 |
| [pnpm](https://pnpm.io) | latest |
| Go | >= 1.22 |
| Agent Assembly Python SDK | >= 0.0.1rc3 |
| Agent Assembly Python SDK | >= 0.0.1rc5 |

No API key or gateway is required — this scenario runs fully offline.

Expand Down
109 changes: 109 additions & 0 deletions scripts/generate_example_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,61 @@
return _write_if_changed(path, new_text)


# ---------------------------------------------------------------------------
# Hand-written "Prerequisites" table row
# ---------------------------------------------------------------------------
#
# Many READMEs carry, in their prose ``## Prerequisites`` table, a row of the
# form ``| Agent Assembly <Lang> SDK | <version> |`` that sits *outside* the
# generated sdk-install block. Left to hand-maintenance it drifts from the SoT
# (AAASM-4703): the generated block advertised rc.5 while these rows still said
# rc.3 / an old beta. The generator now owns the version literal in that row too
# so the two can never disagree again.
#
# The label cell is matched *exactly* (``Agent Assembly <Lang> SDK`` with no
# trailing parenthetical), which is precisely what distinguishes this prose row
# from the generated block's row (``... SDK (<package>) | ...``) — so this pass
# never touches the generated block.


# A PEP 440 / SemVer-ish pre-release version literal, covering the shapes used
# across these examples: ``0.0.1rc5`` (python), ``v0.0.1-rc.5`` (go), and any
# alpha/beta/rc pre-release suffix. Only the version token is rewritten, so an
# operator prefix (``>= ``) and any trailing note (``(with the LlamaIndex
# adapter)``) are preserved verbatim.
_VERSION_TOKEN_RE = re.compile(
r"v?\d+\.\d+\.\d+(?:[-.]?(?:rc|beta|alpha|b|a)\.?\d+)?"

Check warning on line 391 in scripts/generate_example_metadata.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Simplify this regular expression to reduce its runtime, as it has super-linear performance due to backtracking.

See more on https://sonarcloud.io/project/issues?id=ai-agent-assembly_examples&issues=AZ9onpT57aqYlvt7GqKJ&open=AZ9onpT57aqYlvt7GqKJ&pullRequest=309
)


def _prereq_row_re(label: str) -> re.Pattern[str]:
return re.compile(
r"^(?P<pre>\|[ \t]*Agent Assembly "
+ re.escape(label)
+ r" SDK[ \t]*\|[ \t]*)(?P<val>[^|]*?)(?P<post>[ \t]*\|[ \t]*)$",
re.MULTILINE,
)


def rewrite_prereq_row(path: Path, label: str, version: str) -> bool:
"""Align the ``Agent Assembly <label> SDK`` Prerequisites row with the SoT.

Rewrites only the version token inside the row's value cell; the comparison
operator and any trailing note are left untouched. A no-op for READMEs that
do not carry the row.
"""

text = path.read_text(encoding="utf-8")
row_re = _prereq_row_re(label)

def _sub(match: re.Match[str]) -> str:
new_val = _VERSION_TOKEN_RE.sub(version, match.group("val"), count=1)
return f"{match.group('pre')}{new_val}{match.group('post')}"

new_text = row_re.sub(_sub, text)
return _write_if_changed(path, new_text)


# ---------------------------------------------------------------------------
# Directory walkers
# ---------------------------------------------------------------------------
Expand Down Expand Up @@ -502,6 +557,59 @@
return changed


# Bounded set of README locations that may carry a prose ``## Prerequisites``
# table: the per-example READMEs, the language landing pages, and the scenario
# READMEs (both scenario-level and per-agent). Kept as explicit globs rather
# than a recursive ``**/README.md`` walk so a local ``node_modules`` / build
# tree can never leak into the generator's scope.
_README_GLOBS = (
"README.md",
"python/README.md",
"node/README.md",
"go/README.md",
"python/*/README.md",
"node/*/README.md",
"go/*/README.md",
"scenarios/*/README.md",
"scenarios/*/*/README.md",
)


def _prereq_readmes(repo_root: Path) -> list[Path]:
seen: set[Path] = set()
out: list[Path] = []
for pattern in _README_GLOBS:
for path in sorted(repo_root.glob(pattern)):
if path.is_file() and path not in seen:
seen.add(path)
out.append(path)
return out


def process_prereq_rows(repo_root: Path, versions: SdkVersions) -> list[Path]:
"""Align every hand-written ``Agent Assembly <Lang> SDK`` prereq row.

Label-driven (not directory-driven): a README's row is rewritten for
whichever language label it carries, so the version can never disagree with
the generated sdk-install block. Returns the list of files rewritten.
"""

labels = (
("Python", versions.python.version),
("Node.js", versions.node.version),
("Go", versions.go.version),
)
changed: list[Path] = []
for readme in _prereq_readmes(repo_root):
touched = False
for label, version in labels:
if rewrite_prereq_row(readme, label, version):
touched = True
if touched:
changed.append(readme)
return changed


# ---------------------------------------------------------------------------
# CLI
# ---------------------------------------------------------------------------
Expand All @@ -527,6 +635,7 @@
changed.extend(process_python(args.repo_root, versions))
changed.extend(process_node(args.repo_root, versions))
changed.extend(process_go(args.repo_root, versions))
changed.extend(process_prereq_rows(args.repo_root, versions))

if changed:
print(f"Rewrote {len(changed)} file(s):")
Expand Down
Loading