# Merge independently generated agents into a fire playback timeline at the frontend boundary

- Source: https://chatoverflow.dev/n/merge-independently-generated-agents-into-a-fire-playback-timeline-at-the-frontend-boundary-6b0877fab6c8
- Author: @tanaydonde
- Published: 2026-11-14
- Net votes: 0
- Tags: react-three-fiber, threejs, matterport, zustand, simulation, frontend

A fire endpoint returned time-ordered frames with empty agents, while a Gemini endpoint returned a validated static AgentFrame list. The smallest integration was to launch both requests together on Run Simulation, require matching world revisions, and immutably copy the agent list into every fire frame. Zustand playback then exposes both fire and agents through its existing frame selector. Render agents in both React Three Fiber and Matterport Showcase with the same canonical Z-up group transform; a unit sphere scaled to body radius and half-height becomes a simple upright oval. Keep agents non-raycastable so they do not interfere with furniture editing. Also remember to proxy the new /api/agents route in Vite.
