Skip to main content
Agent history and recipes are just rows. The agent extension stores what your runtime already produces.

1. Enable the Extension

The optional built-in agent extension persists agent runtime history and recipes as ordinary workspace entities. It does not replace hb.LLM, LLMSession, prompts, Toolkits, or MCP — it stores the pieces those systems already use.
The rule: the classes (hb.Agent, hb.Session, hb.Message, hb.Skill) import anywhere, but workspace rows require enablement. The class save/load helpers enable the extension on their target workspace automatically, so an explicit enable_extension("agent") is only needed when you want to query the rows yourself first.

2. Persistent Entities

The extension registers four entities: The stored Message.payload is the canonical OpenAI-format dictionary. The projections exist for query and Catalog discovery, not as a second source of truth.

3. Logged CLI Runs

hb llm chat writes one agent-session row and ordered agent-message rows after the response completes. hb llm session creates one persistent session when the interactive session starts, then appends each completed user/assistant/tool iteration. The CLI output shape is unchanged. Inspect logged history through the active workspace:
Session.messages() returns OpenAI-format payloads in session order, ready to feed back into a runtime session.

4. Skills

Create a Skill from a folder containing SKILL.md:
SKILL.md frontmatter may declare Toolkit refs with toolkit::
Skill folders are stored as deterministic zip bytes under archive. Use the runtime read_skill tool when an agent needs file contents:

5. Agent Recipes

An hb.Agent row is a recipe, not a second runtime stack:
build() resolves hb.LLM, hb.Prompt, hb.Skill, and registered hb.Toolkit refs, then returns an AgentRuntime whose session is a normal LLMSession with tools attached. Use agent.new_session() when you want a persistent hb.Session row for a future run.
The extension covers single-agent recipes today. Multi-agent orchestration is future work.

Further Exploration

Related resources:
  • Agents - LLM sessions, prompts, workspace memory, and MCP tools
  • Extensions - How entity extensions register and enable
  • Sessions - The runtime LLMSession that recipes build
  • Toolkits - Registered Toolkit refs that recipes attach