Skip to content

feat(agentctl): make a new agent with the agent builder - #368

Open
elsand wants to merge 1 commit into
feat/setup-updatefrom
feat/agent-builder
Open

elsand wants to merge 1 commit into
feat/setup-updatefrom
feat/agent-builder

Conversation

@elsand

@elsand elsand commented Oct 29, 2026 •

Copy link
Copy Markdown

Writing an agent definition that makes an agent a full teammate takes knowing the repository: its toolchains and pins, its checks down to end-to-end and browser tests, and the services they need. It also takes knowing the platform: base-image features, variants, mediated secrets, nested agents and what an existing agent cannot change. Altinn Studio's agents show the result, but nothing helps you get there.

agentctl setup now offers a third way to start: "Make a new agent with the agent builder". Setup asks only which repository the agent is for, as the folder of a checkout or a GitHub address. It clones an address with your own git into a folder you choose, since the builder's work is yours to review and push from there.

  • The builder is an agent that studies the repository, asks what the new agent is for, shows what it found and writes the definition. A team's agent goes into the checkout, and a personal one into ~/agent-definitions. It then tries the definition in a nested agent and says what it could not try. It writes files and pushes nothing, so it needs no GitHub token.
  • Setup's tool, not your agent. Setup runs the builder as it runs its sign-in agent: under a reserved name that get and the TUI leave out, sized and signed in without questions. When you leave the session, setup offers to set up what the builder made, and removes the builder once that agent exists. Until then it keeps running, so making a new agent again goes back to the same conversation.
  • The conventions live in one place, an agent-definition skill that every agent gets beside agentctl. The builder writes definitions with it, and any agent can use it to improve its own. A personal agent's improvements come in through the Update action from feat(agentctl): update an agent in ~/agents from its source #367.
  • The image. agentctl embeds the builder's definition from agents/agent-builder beside the standard catalog, through extraction code they now share. CI publishes its image through the same reusable workflow as the standard images.
  • Setup also offers to create a missing folder that a manifest mounts in your home folder. The summary marks it, and setup creates it once you confirm.

Stacked on #367 and #359. Review the last commit only, and this retargets to main once they merge.

Try it

Comment /agentctl-experimental for an installable build. The builder's image is published once this merges, so for now setup offers to build it here, which needs Docker. On a home of its own:

agentctl --home ~/.agent-try setup --source builder
  • Give it a small repository you know, by folder or GitHub address, and talk with the builder about what the agent should do.
  • Leave the session. Setup offers to set up the agent it made.

Clean up with agentctl --home ~/.agent-try delete agent/<name> and rm -rf ~/agents/<name>, plus the definition the builder wrote.

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0d407c18-b9de-4f0b-bdfc-f23faf5b6f61

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@elsand
elsand added this pull request to stack #369 October 29, 2026 21:49
@elsand
elsand force-pushed the feat/agent-builder branch from 73539d4 to 84474cf Compare October 30, 2026 08:44
Writing an agent definition that makes a full teammate of an agent
takes knowing the repository: its toolchains and pins, its checks down
to end-to-end and browser tests, and the services they need. It also
takes knowing the platform: base-image features, variants, mediated
secrets, nested agents and what an existing agent cannot change.
altinn-studio's agents show the result, but nothing helps you get
there.

`agentctl setup` now offers a third way to start, beside a standard
agent and a team's: Make a new agent. It asks only which repository the
agent is for, by the folder of its checkout or by its GitHub address.
Setup clones an address with the person's own git into a folder they
choose, since the builder's work is theirs to review and push from
there. Then it runs the agent builder on that checkout and attaches to a
session in it that asks what the agent is for. The builder studies the
repository, shows what it found, writes the definition into the checkout
for a team or into ~/agent-definitions for one person, and tries it in a
nested agent. It leaves the files for the person to review, so it needs
no GitHub token. When the person leaves the session, setup offers to set
up what the builder made, and removes the builder once that agent
exists.

The builder is setup's tool, not one of the person's agents. Setup runs
it like its sign-in agent: under a reserved name that `get` and the TUI
leave out, sized and signed in without questions, from a folder in the
control-plane home rather than in ~/agents. It keeps running until its
agent is set up, so leaving mid-way and making a new agent again goes
back to the same conversation. agentctl embeds its definition from
agents/agent-builder beside the catalog, through extraction code they
now share, and CI publishes its image through the same reusable
workflow.

The conventions live once, in an `agent-definition` skill that every
agent gets beside `agentctl`, since every agent should be able to
improve its own definition. The builder's nested variant builds its
image from a digdir-agents checkout, for trying changes to it.

Setup also offers to create a missing folder a manifest mounts in the
person's home folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@elsand
elsand force-pushed the feat/agent-builder branch from 84474cf to 8e3de19 Compare October 30, 2026 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant