AIP Agent with document context returns non python code in python code

I have a chat bot which has some context for some txt files.

When I ask it to write python it does in the streaming output. However, when it renders it gives some non-python syntax of grid:extract{documentName="x" pages="[y]" index=1}.

I can’t prompt it not to do that it’s happening on the front-end.

Hi Ray, this is a bug on AIP Agents. This will be fixed ASAP and back-ported to the current release.

Thank you for raising this issue.