Ai agents returning JSON

Hi

I am try to run a flow that go in a Custom AI Agents (Gemini) and ask specific instruction to return a valid JSON without any other text. I even try to remove the characters that my module output are returning me.

I try everything that i could, but can’t find a solution. I also have try to add instruction everywhere in my Agent and the formula to manually remove it but nothing work.

Any help would be appreciated.

thanks

Basic Flow :

Make AI Agent output :
Always returning me the characters : ```json at the beginning and ``` and the end.
which make my Parse JSON invalid

```json
[
..........
]
```

Formula : it’s not fixing my issue

These are markdown wrappers that agent is adding, you can specifically ask it not to do this in message/thread, something like: “your entire response/output is going to consist of a single JSON object {}, DO NOT wrap it in JSON markdown markers”

You could also consider calling Gemini agent through API, it will not have the convenience of Make.com agents but might give you additional tool options to force output format (I know openAI assistants have this, I’m not sure for Gemini)

You can also remove markdown wrappers manually, also see previous post:

1 Like

Thanks you @duativ , it’s seems to have solve my issue for now to remove the wrappers manually.
Have a great day

1 Like