{
 "format": "hinow.agent",
 "version": 1,
 "exported_at": "2026-09-01T00:00:00Z",
 "credentials_included": false,
 "agent": {
  "name": "Refinamento em laço",
  "description": "O texto passa três vezes pelo mesmo agente, melhorando a cada rodada, e só depois é apresentado.",
  "avatar": null,
  "model": "hinow/hicode",
  "system_prompt": null,
  "config": {},
  "tools": null,
  "workflow": {
   "nodes": [
    {
     "id": "start",
     "type": "start",
     "position": {
      "x": 300,
      "y": 0
     },
     "data": {
      "label": "Início",
      "variables": []
     }
    },
    {
     "id": "loop-1",
     "type": "while",
     "position": {
      "x": 285,
      "y": 150
     },
     "data": {
      "name": "3 rodadas",
      "loop_condition": "{{round}} <= 3",
      "max_iterations": 4
     }
    },
    {
     "id": "agent-melhora",
     "type": "agent",
     "position": {
      "x": 560,
      "y": 150
     },
     "data": {
      "name": "lapidador",
      "model": "hinow/hicode",
      "system_prompt": "Melhore o texto mais recente da conversa (o do usuário na 1ª vez; depois, a sua última versão): mais claro, mais forte, mais conciso. Responda SÓ com a nova versão, prefixada por 'v{{round}}: '.",
      "config": {}
     }
    },
    {
     "id": "agent-final",
     "type": "agent",
     "position": {
      "x": 275,
      "y": 340
     },
     "data": {
      "name": "apresentador",
      "model": "hinow/hicode",
      "system_prompt": "Apresente a versão final do texto lapidado e, em 1 frase, o que evoluiu desde o original.",
      "config": {}
     }
    },
    {
     "id": "end-1",
     "type": "end",
     "position": {
      "x": 305,
      "y": 500
     },
     "data": {
      "label": "Fim"
     }
    }
   ],
   "edges": [
    {
     "id": "e-start-loop-1-d",
     "source": "start",
     "target": "loop-1"
    },
    {
     "id": "e-loop-1-agent-melhora-loop",
     "source": "loop-1",
     "target": "agent-melhora",
     "sourceHandle": "loop"
    },
    {
     "id": "e-agent-melhora-loop-1-d",
     "source": "agent-melhora",
     "target": "loop-1"
    },
    {
     "id": "e-loop-1-agent-final-exit",
     "source": "loop-1",
     "target": "agent-final",
     "sourceHandle": "exit"
    },
    {
     "id": "e-agent-final-end-1-d",
     "source": "agent-final",
     "target": "end-1"
    }
   ]
  }
 }
}
