Portals into Orbs

tosh1 pts0 comments

Portals into Orbs - Amp

For remote development in orbs to be better than local dev, you need to be able to easily try out the agent's changes in your app, with live reloading. No VPN, no port juggling, and no waiting for preview deployments.

Today, we're shipping portals, which let you access anything running in an orb that listens on a port and speaks HTTP.

All you need to do is ask Amp: show me in a portal. Or words to that effect.

Obviously, you can use portals to try out the features or fixes made by the agent:

You can also annotate and comment on anything:

But you can also have the agent build ad-hoc web apps for you to debug or understand the system:

Portals are accessible to anyone with access to the thread. They go to sleep and wake along with your orb.

Make a thread multiplayer with on the web, and your team members can also make changes and see them live in the portal.

Services

When you say show me in a portal, the agent knows to create or look for a .amp/services.yaml file and then run amp orb services to run your app and expose it via HTTPS. Your app needs to respect the PORT and PUBLIC_URL env vars it's given.

Amp will handle all of this for you; agents are really good at that kind of stuff. Commit the .amp/services.yaml file and Amp's changes to your dev server config so it's faster next time.

What about my app's sign-in flow? What about ...?

You don't want to waste time signing into your dev server each time. We recommend adding a way for humans and agents to bypass sign-in flows (such as username/password or OAuth) in your dev server, by visiting a URL like:

https://localhost:2000/__dev/log-me-in/{email}?returnTo={path}<br>We've documented this pattern and more in the portals documentation. Also see Putting an Agent in an Orb for more about how we're using portals. Tell us how else you and your agents are using portals!

AlsoofInterest<br>Agents in Orbs<br>Launch Amp agents remotely in orbs

Read

portals orbs agent agents services changes

Related Articles