Skip to content

Curriculum · Scaffolding a starter agent (@flashyos/create-mesh-agent)

Scaffolding a Starter Agent

5 lessons · For: Anyone who wants a working mesh agent — one that authenticates, declares from a charter, and reads the network — without building the plumbing by hand

The gap between "we should have an agent on the mesh" and a running one used to be days of plumbing: authentication, identity, reading the directory, wiring the SDK. The scaffolder collapses that to one command and a starting point that already does the load-bearing parts correctly.

`npx @flashyos/create-mesh-agent` writes a starter agent that authenticates, declares itself from a charter, and can read the network — a working skeleton you extend, not a blank file you fill from the docs.

Five lessons. You will finish able to scaffold an agent, understand every piece the scaffold gives you, and know the one rule it builds in that you must never remove.

Lessons

01

From nothing to a running agent in one command

You should be able to: Scaffold a starter agent and know what "working" means at that point.

One command — `npx @flashyos/create-mesh-agent` — produces a starter agent that runs. "Working" here means it can authenticate as itself, declare what it is from a charter, and read the mesh directory; it does not yet do your organization's work, and it is not meant to. It is the correct skeleton on top of which that work goes.

The value is not that it saves typing. It is that the parts that are easy to get subtly wrong — how an agent authenticates, how it declares its identity, how it reads the network without assuming an account — are done correctly from the first commit, so you extend a sound base rather than debugging a hand-rolled one.

The rest of this course is what the scaffold contains and the one principle it encodes, because using it well means understanding what it did, not just that it ran.

Source: FlashyOS — @flashyos/create-mesh-agent

02

What the scaffold writes

You should be able to: Name the pieces the scaffold provides and what each is for.

The scaffold wires three things. Authentication: how the agent proves it is itself when it acts. A charter-declared identity: the agent declares what it is and what it may do from a charter, rather than asserting capabilities in code nobody governs. And a network read: the ability to look up the directory and find other organizations by capability.

Each of these is a place a hand-built agent tends to cut a corner — a hardcoded credential, an identity asserted rather than declared, a directory read that assumes an account. The scaffold does them the estate way, so the corner is not there to cut.

What the scaffold deliberately does not write is your organization's actual work. That is the point of extension, and it is where the mesh agent SDK — the depth behind this starter — takes over.

Source: Flashy Academy — Building a Mesh Agent

03

An agent acts for a human

You should be able to: State the identity principle the scaffold builds in and why it is never removed.

The rule the scaffold encodes and you must never remove: an agent acts for a human, never as a free-floating actor. Its identity declares whose authority it carries, and everything it does is attributable to a human who can be asked why. An agent is not a new kind of principal that answers to no one — it relocates work while leaving accountability where it was.

This is why the scaffold declares identity from a charter rather than letting the agent assert its own capabilities: the charter is the governed record of what the organization — and therefore its agents — may do. An agent that granted itself authority would be exactly the thing the estate's consent doctrine exists to prevent.

So the identity the scaffold gives your agent is not a formality to route around. It is the mechanism that keeps an agent workforce safe to run: bounded, attributable, and answerable to a named human at every step.

Source: Flashy Academy — Identity with flashyID

04

create-mesh-agent versus create-mesh-node

You should be able to: Choose the right scaffolder for what you are building.

Two scaffolders sound alike and do different jobs. `create-mesh-node` scaffolds the organization: the charter, handshake and directory fragment that make a domain a readable node on the mesh. `create-mesh-agent` scaffolds an agent: a running actor that authenticates and works on behalf of an organization that already exists.

The order is node first, then agents. You bring an organization onto the mesh with the node scaffolder and the on-ramp checklist; then you give that organization agents with the agent scaffolder. An agent with no node to act for has no charter to declare from and no organization to be accountable to.

Getting the two straight saves a common early confusion: reaching for the agent scaffolder before there is a node, or expecting the node scaffolder to hand you a working agent. They are complementary, sequenced, and each does exactly one of the two jobs.

Source: Flashy Academy — The One-Command On-Ramp

05

From scaffold to real work

You should be able to: Extend the starter into an agent that does your organization's work under real thresholds.

The starter runs; now it earns its keep. Extending it means giving it the tasks your organization actually delegates, under the thresholds your charter sets — where it may act alone, and where a human must approve first. The agent SDK is the depth: how the agent reports what it did, how it escalates when it hits a ceiling, and how its work reaches the record.

Keep the scaffold's two commitments as you grow it: it acts for a human, and it declares from the charter. Everything you add is new capability under those constraints, never a way around them — a reward or a shortcut that let the agent move its own standing or grant its own authority would break the exact rules that make the workforce trustworthy.

From one command you have a sound starting agent; from there, real work under governance is extension, not reconstruction. That is the point of scaffolding the hard parts correctly once: what you build next is your organization's, and the plumbing beneath it is already right.

Source: Flashy Academy — Directing Agents Well

Frequently asked

What does the scaffolded agent actually do out of the box?

It authenticates as itself, declares what it is from a charter, and can read the mesh directory. It does not yet do your organization's work — that is the part you extend. The value is that the easy-to-get-wrong plumbing (auth, declared identity, network reads) is done the estate way from the first commit.

What is the one rule the scaffold builds in?

That an agent acts for a human — never as a free-floating actor. Its identity declares whose authority it carries, so everything it does is attributable to a named human who can be asked why. The scaffold declares identity from the charter rather than letting the agent assert its own capabilities, and that must never be removed.

How is create-mesh-agent different from create-mesh-node?

create-mesh-node scaffolds the organization (charter, handshake, fragment) so a domain becomes a readable node; create-mesh-agent scaffolds an agent that acts for an organization that already exists. Node first, then agents — an agent has nothing to declare from until its node exists.

Keep going