PyMC Graph accepting gradients?

That line is doing unpacking from a list with a single element.

For a single element you need to distinguish between the two cases

x = [1]  # x is [1]
[x] = [1]  # x is 1
# same as (x,) = [1]
assert x == 1

You can also unpack multiple elements, which is commonly seen in loops, function calls

[x, y] = [1, 2]
# same as x, y = [1, 2]
assert x + y == 3

Anyway, Python syntax aside, PyMC requests your gradient expressions when you (or PyMC) asks for the gradient of the logp. You can trigger this manually with model.dlogp(). Note that if you are using an external JAX sampler like numpyro or blackjax the gradient won’t be provided by PyTensor but instead by JAX, and it doesn’t matter whether you implemented it or not in PyTensor.

For a more intro picture of how PyMC gets to probabilites (and then its gradients): PyMC and PyTensor — PyMC 5.16.2 documentation