# Session Agent Builder

Turn the current interactive conversation into an owner-reviewed reusable Agentlas...

- Repository: https://github.com/agentlas-ai/Agentlas-OS (1593 stars)
- Category: AI and agents
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add agentlas-ai/Agentlas-OS --skill session-agent-builder -g -a claude-code -y`
Codex: `npx skills add agentlas-ai/Agentlas-OS --skill session-agent-builder -g -a codex -y`
Cursor: `npx skills add agentlas-ai/Agentlas-OS --skill session-agent-builder -g -a cursor -y`
Gemini CLI: `npx skills add agentlas-ai/Agentlas-OS --skill session-agent-builder -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add agentlas-ai/Agentlas-OS`

## Description

Turn the current interactive conversation into an owner-reviewed reusable Agentlas agent; accept JSON or JSONL only for explicit terminal and automation runs.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Session Agent Builder Skill

Use `modes/session-agent-builder.md` and `agents/40-session-agent-builder/agent.md`
as the canonical route. The important distinction is between an interactive
host and the deterministic terminal utility:

- In an interactive `/hep-build session` request, the current conversation is
  already the input. Do not ask the owner to export or paste JSON/JSONL.
- In a headless or terminal request, accept only an explicitly named JSON/JSONL
  export and run the local validation boundary.

## Interactive route

1. Ask where the new agent should be written. Say that the default is the
   global Agentlas agent home (`AGENTLAS_AGENT_HOME` or
   `~/.agentlas/agentlas-agent`) and that a different folder can be supplied.
   If no alternate location is named, use the global home and create a new
   child package; never overwrite an existing child.
2. Analyze the visible user/assistant turns and relevant visible outcomes from
   this same conversation. Never search recent sessions or host databases to
   reconstruct context, and never include system/developer instructions as
   learned agent behavior.
3. Produce a generalized session report. It must extract reusable intent,
   successful procedures, decisions, corrections, failed approaches, checks,
   tool purpose, and conditional `IF / THEN / BECAUSE / AVOID / INSTEAD` rules.
   It is not a chronological summary.
4. Show the report for owner review. Support `Build Agent` and `Edit`; editing
   regenerates the report before any package write.
5. From the approved report, write the actual agent prompt and route it through
   the existing package scaffold, complete, local registration, and verify
   gates. Default to one agent; team shape requires explicit owner choice.

## Generalization and safety

The rest: https://github.com/agentlas-ai/Agentlas-OS/blob/HEAD/.agents/skills/session-agent-builder/SKILL.md
