policies with external tools #750
Unanswered
boazdavid
asked this question in
OPA and Rego
Replies: 1 comment 1 reply
-
|
Hit there!
Sounds like you want a bundle server somewhere to manage data separately from the decision point. That's a good call. The docs on bundles are here: https://www.openpolicyagent.org/docs/management-bundles But despite all the bells and whistles, a bundle is essentially just a tarball with your JSON data in it that you host somewhere for OPA to pull. When you update the bundle, OPA pulls down the update. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Im developing a Python library to check that an LLM agent is calling tools according to a policy.
For example, in an airline agent: "All reservations can be cancelled within 24 hours of booking, or if the airline cancelled the flight."
As LLM can make wrong tool calls, the library will check the policy just before calling the tools. In this example, before the
cancel_reservation(res_id)tool is invoked. The policy engine needs to get external data using theget_reservation(res_id)to check the reservation time stamp, and maybeget_flight_status(flight_id, date)to check if the flight was cancelled. I dont want to fetch all this data in advance and pass it in the input - as the data dependencies are complex and the parameters logic is embedded in the policy rules. Instead I want to populate the data incrementally - when needed.I consider using OPA for this task. My concern is about accessing external data. in my case, the tools are invoked from Python, that will either run them as regular async Python functions (eg, do an sql query), or as REST calls.
I saw the option of
http.send- but could not find much documentation.Can you please recommend on the right approach to handle these requirements using OPA?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions