A real-time agent workflow that authors content from context — a design system and a knowledge base — and streams its progress back to the UI as it runs.
Tech stack
- React + Vite with React Flow for the node graph
- a Deno API
- a bespoke event-sourcing framework that contains the workflow engine and keeps everything connected over sockets
Core process
When the user triggers a flow, a command is sent to the backend to start it. As the flow moves between nodes (steps), events are fired that the client listens to. The agent publishes task updates to support the streaming response, giving the real-time experience. Once the flow ends, a final event is published and the flow resets.
Example flow
Inputs
- A design system stores documents on business goals, drivers, language, voice, and tone.
- A knowledge base stores articles and notes used as the source of truth for all site content.
- An article title is set by the user for the flow (in practice this might come from a URL slug).
Flow
Relevant documents are transformed and combined with the article title to create a prompt. The prompt is passed to a copywriting agent.
Output
The agent publishes an article in markdown format.