New agent forest - create personal route

Hello :wave:

I’d like to know if it’s possible to create a custom route to the forest so that our server can use it.
For example, create a forest/healthcheck route to let our docker know the state of the forest.

Context

  • Project name: Nostrum Care v3
  • Team name: Op
  • Environment name: Local
  • Agent (forest package) name & version:
    @forestadmin/agent”: “^1.0.0”,
    @forestadmin/datasource-sequelize”: “^1.5.21”,
    @forestadmin/datasource-sql”: “^1.0.0”,
    “dotenv”: “^16.0.1”,
    “pg”: “^8.8.0”,
    “sequelize”: “^6.33.0”,
    “stripe”: “^14.17.0”
  • Database type: Postgresql

Thanks in advance for your feedback!

Hello @jacques_liao ,

No, it’s not possible to add a fully custom route as your understand it.
You can always add a route to the http server that is hosting the agent.
If you need some context from forest, the only workaround I see is adding an action to your agent that you hide in the layout and call remotely. If you need to customise the response, you’ll have to send the result data inside the “html” option of the resultBuilder:

return resultBuilder.success("success", {
  html: JSON.stringify({anything: "value"})
});

Kind regards

1 Like

Hello @Enki

thank you for your feedback, I’ll take note :pray: