Flue is an innovative agent framework designed for creating robust AI agents utilizing a customizable TypeScript environment. Developed by the creators of Astro, it incorporates a React-like hooks API for constructing agent functionalities, including persistent state, lifecycle events, various models, tools, sandboxes, subagents, skills, and MCP servers within the codebase. These agents maintain state and can be addressed via HTTP, preserving context throughout interactions and adapting their abilities as tasks evolve. Flue ensures that every session is logged in a reliable stream, allowing for the recovery of accepted tasks even after crashes, restarts, or deployments; this means that interrupted sessions can seamlessly resume, and clients can reconnect without needing to start anew. Developers have the flexibility to operate agents locally, through continuous integration, from their own backend systems, or coordinate them using platforms like Cloudflare Workflows and Inngest. The secure sandboxes allow agents to execute commands, modify files, and perform meaningful tasks, while integrated tools facilitate connections to various APIs and data sources. Flue is powered by Pi and offers compatibility with multiple LLM providers, enabling teams to select the models that best suit their needs. Ultimately, this framework empowers developers to create versatile AI agents that can adapt to changing requirements and environments.