Latest in AI
Glean Headless Agent Builder: How It Works in Claude Code, Cursor and Codex
Glean now lets developers author agents in their coding tools, with a useful separation between the files they review and the runtime that executes them.
Glean announced general availability of headless agent building on October 21, 2026. Developers can create, test and publish Glean agents from Claude Code, Cursor or Codex, then run them on Glean's managed infrastructure. The practical change is that agent configuration can become something a team reviews in Git.
According to Glean's announcement, code-authored agents retain the enterprise context, permissions and audit trail used by its visual builder. The feature currently supports Auto mode agents. Workflow mode still requires Glean's agent builder.
What headless agent building changes
Headless means the developer can work outside Glean's visual authoring interface. It does not mean the resulting agent is self-hosted. Publication still sends the agent to Glean, where administrators and builders can manage, share or disable it.
That distinction matters when comparing this with an agent framework. If your team wants to own its execution infrastructure, a code-first authoring interface alone does not provide that. If your team already uses Glean, the attraction is getting a reviewable development workflow without building another deployment system.
A pull request also makes a useful conversation possible. A reviewer can ask why a new instruction is needed, which test demonstrates the improvement and whether the agent has been given more access than its task requires.
How to use the Glean plugin
The setup guide starts with installing Glean's plugin for the chosen coding environment and authenticating to the company's Glean instance. Company policy may require an administrator to enable the plugin.
The builder uses /glean_run in Claude Code and Cursor, and $glean_run in Codex. Glean explicitly distinguishes this flow from its MCP tools. An existing MCP connection should not be treated as a substitute for the headless-builder command.
By default, each agent lives in a folder under .glean/agents/. Test it with representative inputs before publishing, rather than treating successful file generation as a successful agent.
For example, a support-summary agent should be checked against a quiet week, a burst of duplicate tickets and an escalation with incomplete information. Those cases reveal different problems than a single polished demonstration. They are suggested evaluation cases, not results from testing this release.
What goes in the agent files
Glean's agent specification separates configuration in spec.yaml from instructions in instructions.md. Skills and subagents can have their own directories. The agent's stable id connects its local definition to the live agent and should not be changed casually.
The specification also exposes a detail worth reviewing carefully: company-knowledge configuration. Omitting gleanSearchConfig gives the agent no company-knowledge access. An empty object allows unrestricted company-knowledge access within the invoking user's permissions. A populated configuration narrows access to listed sources or URLs.
Those are very different configurations even when their file diffs look small. Reviewing an agent means reviewing its access as well as its prose. A better-written prompt cannot compensate for an unnecessarily broad data boundary.
Availability, pricing and limits
Glean calls headless building generally available, but the announcement does not provide a separate price for the feature. Teams should verify their own entitlement and usage terms rather than infer that the plugin makes execution free.
Auto mode remains an important boundary. Putting an agent in files does not make every execution deterministic, or bring Workflow mode into the same authoring path. Glean's specification also disallows nested subagents.
For teams adopting this, the useful measure is whether a change can be explained, tested and safely reversed. Moving instructions into Git is a good starting point. The more valuable habit is attaching evidence to every change in what the agent is allowed to do.
I'm Paras. I work at the intersection of AI, engineering and distribution.
I help technical teams explain product launches and engineering decisions in content that developers and founders can understand and share.