AWS Builder Center

What If Your AI Coding Agent Could Show You the App While Building It?

AI coding agents can generate components, modify files, and build entire websites. But reviewing their work often means waiting for another deployment. AWS recently demonstrated something interesting: previewing a running web application directly from an AI agent's runtime session while the agent is still editing the code. Here's how Amazon Bedrock AgentCore Session Endpoints make this possible.

Imagine asking an AI coding agent:
Build me a landing page for a productivity application.
The agent creates the React components.
It writes the CSS.
It adds the navigation.
It creates the layout.
Then it tells you:
Done.
But how do you know whether the actual website looks good?
You need to run the application.
Open the browser.
Check the layout.
Find the problems.
Ask the agent to make changes.
Wait for the next deployment or preview.
Then repeat the process.
This is where I started thinking about a different development experience.
What if I could watch the actual website update in my browser while the AI agent is still writing the code?
Not a generated screenshot.
Not an image of what the website might look like.
The real running application.
And recently, AWS demonstrated exactly this kind of workflow using Amazon Bedrock AgentCore Runtime.

1. The Problem With Traditional AI Coding Workflows

My understanding of an AI coding workflow was initially simple:
Developer
|
v
Give Prompt to AI
|
v
Agent Generates Code
|
v
Save Files
|
v
Build Application
|
v
Deploy Preview
|
v
Review Website
|
v
Request Changes
This works.
But there is an unnecessary delay between making a change and seeing its effect.
Imagine making ten small UI changes.
Changing a button color.
Adjusting the navbar.
Moving a section.
Fixing the spacing.
Changing the typography.
Adding an animation.
If every change requires another deployment before you can review it, the feedback loop becomes slower.
The problem is not necessarily how quickly the AI can write code.
It is how quickly you can see, test, and validate the result.

2. What If the Website Stayed Running Inside the Agent's Environment?

This is the idea that caught my attention.
Instead of generating code, stopping the environment, copying the project somewhere else, and deploying a preview, the coding agent can keep the development server running inside its own runtime session.
The browser connects to that running application.
Whenever the agent saves a file, the development server detects the change.
The browser receives the update through its hot-reload mechanism.
Conceptually:
Developer
|
v
AI Coding Agent
|
v
Edit Project Files
|
v
Running Dev Server
|
v
Live Preview
|
v
Browser
Now the feedback loop becomes:
Ask for a change
|
v
Agent edits code
|
v
File gets saved
|
v
Browser updates
|
v
Review the result
|
v
Ask for another change
That is a much more interesting development experience.

3. The AWS Feature Behind This: AgentCore Session Endpoints

While researching this, I came across an AWS article published on October 30, 2026:
Preview web apps live as your coding agent builds them with Amazon Bedrock AgentCore runtime.
The article introduces a practical use case for Amazon Bedrock AgentCore Session Endpoints.
The important idea is that an agent runtime session can run more than just the agent's request handler.
It can also run supporting applications, such as:
  • A Vite development server.
  • A web application.
  • A custom HTTP API.
  • A streaming service.
  • A WebSocket server.
AgentCore Session Endpoints allow authenticated requests to reach these applications on explicitly permitted ports inside that particular runtime session.
This means the developer can open a running application from the agent's environment without first deploying the application to a separate hosting platform.
Official AWS article:

4. Understanding the Architecture

The AWS demonstration uses four major pieces.
Amazon Bedrock AgentCore Runtime
Runs the coding agent inside an isolated session.
Coding Agent
Reads, writes, edits, and manages project files.
Vite Development Server
Runs the website and provides hot module replacement.
Session Endpoint
Provides authenticated access to the running website.
The architecture looks like this:
Developer
|
v
Preview Interface
|
+---------+---------+
| |
v v
Chat Panel Website Panel
| |
v v
InvokeAgentRuntime Local Endpoint
| |
v v
Coding Agent Session Endpoint
| |
v v
Claude Haiku 5.5 Vite Server
|
v
Edit Project Files
|
v
Save Changes
|
v
Vite Hot Reload
|
+------> Browser Updates
The important detail is that the coding agent and website run inside the same runtime session.
The browser doesn't need to wait for a separate production deployment after every CSS or component change.

5. What Actually Happens When You Request a UI Change?

Let's take the AWS demonstration.
The sample starts with a running website.
The preview interface has two sides:
+----------------------+----------------------+
| | |
| AI CHAT | LIVE WEBSITE |
| | |
| Make the button | Coffee Website |
| green. | |
| | [Order Ahead] |
| Agent working... | |
| | |
+----------------------+----------------------+
You send a request:
Switch this website to a dark coffee-house color theme.
The agent receives the request.
It examines the project files.
It identifies the relevant stylesheet.
It edits the CSS.
Then it saves the file.
Vite detects the change and sends an update to the browser through its WebSocket connection.
The website changes without requiring a full page refresh.
The process looks like:
User Request
|
v
Coding Agent
|
v
Read Existing Files
|
v
Edit CSS
|
v
Save stylesheet
|
v
Vite Detects Change
|
v
WebSocket Update
|
v
Browser Re-renders
This is the interesting part.
You aren't looking at a screenshot that the AI generated.
You're looking at the actual running application.

6. What Is Hot Module Replacement?

This was one of the web development concepts I wanted to understand before looking at the AWS implementation.
Vite supports a development feature called Hot Module Replacement, or HMR.
The idea is that when a source file changes, the development server can send the necessary update to the browser without requiring a complete page reload in many cases.
For example:
src/
|
+-- App.jsx
|
+-- components/
| |
| +-- Navbar.jsx
| |
| +-- Hero.jsx
|
+-- style.css
Suppose the coding agent edits:
style.css
Vite watches the file.
When it changes, the browser receives the update.
This makes the development feedback loop much faster.
A simplified architecture is:
Agent Writes File
|
v
File System Changes
|
v
Vite Watches Files
|
v
HMR WebSocket
|
v
Browser Updates
The browser is connected to the same running development server.
That is why the change can appear almost immediately.
Documentation:

7. How Do Session Endpoints Actually Work?

This is probably the most important technical part.
AgentCore Runtime already provides a way to invoke an agent.
But the runtime invocation endpoint and a session endpoint are not the same thing.
A runtime endpoint lets the application invoke the agent.
A session endpoint lets an authenticated client reach an additional application running inside that particular session.
For example:
AgentCore Runtime
|
+----> Agent Invocation
|
+----> Session Endpoint
|
+----> Vite Server
|
+----> Status API
The runtime returns the session endpoint URL in a response header:
X-Amzn-Bedrock-AgentCore-Runtime-Session-Endpoint-Url
The application can then use that URL to reach an allowed port inside the session.
This is how the preview interface can access the running website.
AWS documentation:

8. Why Are There Different Ports?

In AWS's sample implementation, three ports have different responsibilities.
Port 8080
|
v
Agent Invocation Server

Port 8090
|
v
Vite Development Server

Port 8081
|
v
Agent Status Endpoint
The agent itself receives requests through the normal runtime invocation mechanism on port 8080.
The Vite development server runs on port 8090.
The status endpoint runs on port 8081.
The runtime configuration explicitly allows the additional ports needed by the session endpoint.
For example, conceptually:
allowedPorts=[
{"port": 8090},
{"port": 8081}
]
The agent invocation server does not need to be exposed through the session endpoint because normal runtime invocation already reaches it.
This separation is useful.
The application doesn't need to expose every internal service simply because the agent is running.
Only the necessary ports should be allowed.
One more important detail: the servers must actually listen on  0.0.0.0  at the configured ports. Adding a port to  allowedPorts  doesn't start a server automatically.

9. How Does Authentication Work?

This is where the implementation becomes more interesting from a security perspective.
The session endpoint isn't an unrestricted public URL.
Each request must be authenticated.
For IAM-authenticated runtimes, requests use AWS Signature Version 4.
For runtimes configured with an inbound JWT authorizer, requests use an authorized bearer token.
The caller also needs the appropriate  bedrock-agentcore:InvokeAgentRuntimeProxy  permission for the runtime.
Conceptually:
Browser Request
|
v
Session Endpoint
|
v
Authentication Check
|
v
Allowed Port Check
|
+----------+
| |
v v
Denied Authorized
|
v
Vite Server
Knowing the session URL isn't enough to access the application.
There is another practical complication.
A browser cannot independently attach an AWS SigV4 signature to every normal page, asset, and WebSocket request.
That's why the AWS sample uses a local endpoint client from the AgentCore SDK.
The local endpoint handles the required signing or token forwarding before sending traffic to the session endpoint.
The browser can then interact with the local preview interface.
That is an important part of understanding how the demonstration works.

10. Why WebSockets Matter

Without the WebSocket connection, the browser wouldn't receive Vite's live update messages through the demonstrated hot-reload workflow.
The initial page request loads the website.
But once the page is running, the browser maintains a WebSocket connection to the Vite development server.
When a file changes:
Coding Agent
|
v
Save File
|
v
Vite Server
|
v
WebSocket Message
|
v
Browser
|
v
Update Website
AgentCore Session Endpoints support WebSocket connections in addition to HTTP requests.
This makes them useful for more than simply serving static pages.
They can provide a path for live development servers and other interactive applications running inside an agent session.

11. Is This the Same as Deploying a Website?

No.
This is an important distinction.
The session endpoint is designed to access an application running inside a particular runtime session.
Its lifetime is tied to that session.
It is useful for development, review, testing, and interactive previews.
It is not the same as deploying a public production website.
For example:
Development

Coding Agent
|
v
AgentCore Session
|
v
Live Preview
|
v
Developer Review
After the application is ready:
Approved Application
|
v
Production Deployment
|
v
AWS Amplify / Other Hosting
|
v
Public Website
The development preview and production hosting have different responsibilities.
The session endpoint also requires authentication, and its URL stops working when its session ends.
AWS recommends deploying the finished application to a hosting service when you want to serve it to end users.
That distinction prevents a common misunderstanding.

12. What Happens If the Agent Makes a Bad Change?

This is the part I would not ignore.
Watching an application update live is useful.
But a live preview doesn't mean every change is correct.
Imagine the agent changes:
  • The navigation layout.
  • The color system.
  • The authentication page.
  • The responsive breakpoints.
A change can break another component.
A website can look good on desktop and fail on mobile.
A button can look correct but stop working.
A form can render correctly but fail during submission.
So I would use the live preview as one part of a larger validation process.
Agent Edits Code
|
v
Live Preview
|
v
Developer Reviews
|
v
Run Functional Tests
|
v
Check Responsive Layout
|
v
Approve Changes
|
v
Production Deployment
The human review remains important.
The goal isn't to remove the developer from the process.
It is to reduce the time between requesting a change and understanding its actual result.

13. What If the Agent Session Ends?

Another interesting detail is session lifecycle.
A session endpoint belongs to an individual runtime session.
When the session ends, the endpoint stops being available.
Compute replacement can also interrupt active connections.
If the agent edits files in a temporary session filesystem, I shouldn't assume those changes will survive indefinitely.
For a more reliable implementation, the application needs an explicit persistence strategy.
For example:
Agent Session
|
v
Working Files
|
v
Approved Changes
|
v
Git Commit / Persistent Storage
|
v
Future Deployment
This is especially important when building a coding assistant.
A live preview is useful only if the work can be preserved and reviewed.
The application should not treat the runtime session as the only copy of the project.

14. What I Would Build With This

This is where I would turn the idea into a personal developer tool.
Imagine a project called:
LiveBuild — AI Coding Agent with Instant Preview
The interface could look like:
+------------------------------------------------------+
| LiveBuild |
+--------------------------+---------------------------+
| | |
| AI CHAT | LIVE PREVIEW |
| | |
| Build a landing page | |
| for my developer tool. | [Website] |
| | |
| Agent: Reading files | |
| Agent: Editing Navbar | |
| Agent: Updating CSS | |
| | |
| Change the hero section | |
| and use a dark theme. | |
| | |
+--------------------------+---------------------------+
| Project Status: Running | Preview: Connected |
+------------------------------------------------------+
The application would support:
  • Creating project files.
  • Reading existing source code.
  • Editing components.
  • Starting the development server.
  • Viewing the website while the agent works.
  • Sending additional instructions.
  • Inspecting generated changes.
  • Saving approved work.
The architecture could look like:
Developer
|
v
LiveBuild UI
|
v
Amazon Bedrock AgentCore
|
+-----------+-----------+
| |
v v
AI Agent Session Endpoint
| |
v v
File Tools Vite Server
| |
v v
Project Files Live Preview
| |
+-----------+-----------+
|
v
Git / Storage
|
v
Deployment
This is a project I would genuinely enjoy building because it combines AI development with actual developer experience.

15. The Security Considerations

A coding agent needs access to project files, and potentially the ability to run commands.
That creates a security boundary.
I would make sure:
  1. Each user gets an isolated execution session.
  1. The agent can only modify files within its assigned project directory.
  1. Only necessary ports are exposed through session endpoints.
  1. The runtime receives only the IAM permissions it needs.
  1. Credentials and secrets are never included in model prompts.
  1. Generated code executes within a restricted environment.
  1. Changes are reviewed before production deployment.
AWS AgentCore Runtime uses isolated microVMs for individual sessions.
However, application-level isolation is still important.
The developer must also carefully configure network access, storage, IAM permissions, session lifecycle, and tool permissions.
A live development environment should never become unrestricted access to the host infrastructure.

My Current Mental Model

I now think about AI coding systems as three different components.
AI Coding Agent
|
v
Understands the requested change
Reads and edits source files
|
v
Development Environment
|
v
Runs the actual application
|
v
Live Preview
|
v
Developer Reviews the Result
And AWS AgentCore makes an interesting connection possible:
Amazon Bedrock
→ Provides model inference.

AgentCore Runtime
→ Runs the coding agent in isolated sessions.

AgentCore Session Endpoints
→ Provide authenticated access to applications running in those sessions.

Vite
→ Serves the development application and supports hot reload.

WebSockets
→ Carry live update messages to the browser.

Git / Persistent Storage
→ Preserve the approved project changes.
Each component has a separate responsibility.
The model doesn't need to render the website itself.
The agent edits the actual code.
The development server runs the website.
The browser displays the result.
That separation makes the entire architecture easier to understand.

What I Understand Now

I used to think an AI coding agent was mainly about generating code faster.
But the actual development experience involves much more than code generation.
I need to review the implementation.
Run the application.
Find UI problems.
Test interactions.
Request corrections.
Check whether the new changes broke something else.
And repeat the process.
AWS's latest AgentCore Session Endpoints demonstration makes this feedback loop more interesting by allowing developers to access a running web application directly from the agent's runtime session.
The website can update as the agent saves changes.
This doesn't replace testing or production deployment.
It makes the development and review process more immediate.
And that is what I find most interesting.
The next generation of AI coding tools shouldn't just tell developers that the code is finished. They should make it easier to see, test, and understand what they actually built.
That's the kind of developer experience I want to explore.
Not just AI that writes code.
AI that builds something real and lets me see the result while it works.



Further Reading

Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article