HybridAgent
Open-source LLM agent framework that alternates between latent-space reasoning and text-based tool use, with SFT and RL training code.
At a Glance
About HybridAgent
HybridAgent is a research codebase from Together AI and collaborators at Stanford, UIUC and Meta that implements Hybrid Reasoning Agents. It provides a generation engine in which an LLM agent moves between latent reasoning and text interaction within a single generation, along with training stages, batch inference and an inspector for latent thoughts. Released checkpoints and datasets are hosted on Hugging Face.
What It Is
HybridAgent is an agent method and toolkit rather than a hosted application. A lightweight HybridLink maps last-layer hidden states back into the input-embedding space, so the agent can enter latent mode for inner thinking and return to text mode for tool calls, final answers and external monitoring. The hybrid context of text, latent thoughts and tool observations is carried across turns through the agent's working memory, and every latent thought can be rendered as readable pseudo-text.
Workflow and Outputs
The repository includes the hybrid generation engine with Python and search tools (concurrent tool calls are supported), HybridSFT and HybridRL post-training stages, and batch inference over a JSONL file of questions. Each batch record contains the hybrid trajectory, the extracted answer, the pseudo-text readout of every latent span and tool-call statistics. The Interpretable Latent Mode inspector renders latent thoughts inline with text reasoning, tool calls and observations as an HTML report or terminal view.
Models and Training Setup
The README lists HybridAgent-8B-Agentic and HybridAgent-14B-Agentic, built from Qwen3 base models through HybridSFT and HybridRL, plus HybridSFT and HybridRL datasets. Setup uses a conda environment with Python 3.11, PyTorch and a Tavily API key for the search tool. The README recommends 8 or 16 GPUs for HybridSFT and 32 GPUs (4 nodes of 8) for HybridRL.
Community Discussions
Be the first to start a conversation about HybridAgent
Share your experience with HybridAgent, ask questions, or help others learn from your insights.
Pricing
Open Source (MIT)
HybridAgent code released under the MIT License, free to use, modify and distribute. Model weights and datasets are hosted separately on Hugging Face; their licenses were not evaluated here.
- MIT-licensed hybrid generation engine with Python and search tools
- HybridSFT and HybridRL post-training stages
- Batch hybrid inference
- Interpretable Latent Mode inspector
- Search tool requires a user-supplied TAVILY_API_KEY (external cost)
Capabilities
Key Features
- Latent and text mode switching within a single generation
- HybridLink mapping hidden states to input embeddings
- Working memory across turns
- Python and search tool calls with concurrency
- HybridSFT post-training
- HybridRL post-training
- Batch inference over JSONL questions
- Interpretable Latent Mode with HTML and terminal reports
- Released 8B and 14B checkpoints and training datasets
