•   about 1 month ago

Can data inside Prompt Opinion be retrived externally in async mode?

Hi! I have a clarification about data access patterns.

Is there any way for an external agent (A2A or MCP) to programmatically access or retrieve updated user/session data from Prompt Opinion without being invoked from within the platform?

For example: The user chats with my external agent and setup a few options tru chat. It provides the patients context and close the session. After that my infrastructure will run cron jobs on regular basis that will require updated patients data. Can that be done tru:

polling an API for updates?
subscribing to webhooks/events?
or accessing persistent agent memory externally?

Or is all data access strictly limited to invocation-time interactions initiated from Prompt Opinion?

Thanks!

  • 11 comments

  • Manager   •   about 1 month ago

    Hi Domingo,

    Unfortunately, data access is strictly limited to invocation-time. The access token we pass you is valid for one hour, you can check the expiration time via the `exp` claim in the token to find the precise time it expires.

    We are considering a future feature where we provide a refresh token as well that will allow users to refresh the access token allowing the scenarios you have mentioned, this is still under consideration.

    You can also join our discord channel where other discussions/feature requests are going on: https://discord.com/channels/1412802933346799687/1476264773829005488

  •   •   about 1 month ago

    oh thats too bad, IMHO what makes a great assistant (human or machine) is proactivity instead of just reactivity. My idea was around this concept, but without async access to data it can't be done. Would you consider to open this feature as experimental for us contestants? Its a great opportunity for you guys to get free beta testers ;)

  • Manager   •   about 1 month ago

    This is definitely a feature that's more a matter of "when" rather than "if". We have some other priority items we need to take care of, but this is certainly on our plate.

    We will create a ticket on our repo once we have outlined the technical details with the team here: https://github.com/prompt-opinion/po-overview/issues. Then you can track it to know when it'll be released.

    You can also join the discord channel to get updates sooner, we usually post there.

  •   •   about 1 month ago

    Thanks for the clarification, that helps.

    Given the hackathon timeline, do you think this feature (or anything similar, like refresh tokens) might realistically be available before it ends? Or would you recommend we move forward assuming it won’t be available in time?

  • Manager   •   about 1 month ago

    Had a discussion with the team and we are thinking this feature will be released at the latest by 4/15.

  •   •   about 1 month ago

    mmm, as I programmer myself and CTO for the past 15 years, I know you can't trust developer's deadlines :)
    hope you release it on time tho, I have an idea that I think will be super useful for doctors but as mentioned, it requires async communication with Prompt Opinion

  • Manager   •   about 1 month ago

    We love the healthy skepticism :). Feedback from the community is exactly what is helping us prioritize our roadmap. This feature will require us to enable certain other core identity features that we had planned for later. We are reviewing them internally and will do our best to get them out by 4/15. cheers.

  •   •   about 1 month ago

    Thanks @pawan, If I may, my suggestion is to create an API token for each agent the user creates, that token will be scoped to access only the information that the agent can access, then, open a new endpoint to the public that gets authorized by such token and gives back the context, like the most recent patients data

  • Manager   •   27 days ago

    hi Domingo - I wanted to give a quick update. We have implemented most of what you asked for. It took a little longer because we wanted to ensure we aligned it with FHIR standards. We are doing some internal testing now and expect to get this released by the end of this week. Thanks for your patience.

  •   •   26 days ago

    Fantastic thank you, waiting for the release

  • Manager   •   21 days ago

    Hello Domingo,

    We have released the offline access (refresh token capability) feature and should be available. You can review the following documentation:

    - For mcp servers: https://docs.promptopinion.ai/fhir-context/mcp-fhir-context#refresh-token-capability
    - For a2a connections: https://docs.promptopinion.ai/fhir-context/a2a-fhir-context#refresh-token-capability

    Let us know if you have any further questions.

Log in or sign up for Devpost to join the conversation.