Hi all,
I am new to Palantir Tools and I am trying to have an agent call a function I created in a Palantir Code Repository (where you get to build single functions).
The function is connected to a Data Source which is essentially a client to connect to my API (running outside of Palantir).
The flow is simple:
User —sends prompt to–> AIP Agent –calls function with user input–> My API
The thing is that there is one input parameter (within all of the input parameters) that won’t be given by the user but by my server calling the agent API: the user id.
I would rather hard map the user id in the function than just put it in the prompt and trust that the agent will get it right, because if it gives the wrong ID that would be problematic.
In the documentation, I have not found a way to use the application variable as input to my function, and I don’t get how I could have the function itself fetch info about the agent’s session_rid to send it to my backend in have the mapping user_id to agent session_id.
I saw in this post db1234 mention something about the dev team working on having app vars being able to prefill functions here, if you have any updates on that that would be great https://community.palantir.com/t/can-an-agent-prefill-an-action-in-workshop-for-a-user/4211
Otherwise, if you know anything about doing what I am trying to do the right way, I am all hear.
Thank you in advance.