Agent Builder: Scaffolding New Agents in Five Steps
#worksona#portfolio#agents#developer-tools#worksona-platform
David OlssonAgent Builder is a browser-based wizard for constructing agent definitions from scratch. A practitioner works through five steps — Select Template, Basic Information, Agent Traits and Capabilities, System Prompt and Examples, Test and Export — and exits with a deployable agent configuration in JSON or JavaScript format. No backend, no build step. The application opens from an HTML file and runs entirely in the browser, using Worksona.js as the underlying AI abstraction layer.
Three template tiers shape what gets generated. Basic produces a minimal agent with a short prompt and no examples. Standard adds structured traits, tone, and a few-shot example pair. Advanced produces a full agent with domain knowledge, personality parameters, a staged interaction model, and multiple examples. All three templates generate valid Worksona.js-compatible configurations that can be dropped directly into any application consuming the Worksona agent runtime.
The test panel — Step 5 — provides a live chat interface powered by the configured agent. A practitioner can validate that the system prompt and trait configuration produce the intended behavior before exporting. Adjustments loop back through Steps 3 and 4 without losing progress.
Why is it useful?
Writing an agent system prompt from scratch requires understanding both the domain the agent should operate in and the structural conventions that make system prompts reliable. These are two distinct skills. Practitioners who have deep domain expertise often lack the prompt engineering experience to translate that expertise into a well-structured system prompt. Those who can write prompts fluently often need significant time with domain experts to understand the knowledge boundary the agent should respect.
Agent Builder separates these concerns. The template tier provides the structural scaffold. The practitioner supplies the domain content: the name, the background, the knowledge areas, the tone, the examples of good responses. The wizard assembles them into a prompt that follows established patterns without requiring the practitioner to know what those patterns are.
The few-shot example interface in Step 4 is particularly valuable. Good examples are the highest-leverage input in a system prompt. The wizard surfaces them explicitly — user turn, then expected assistant turn — so practitioners focus on concrete behavior rather than abstract instruction.
The export produces two formats. JSON stores the agent definition as a data structure, suitable for a registry or a configuration file. JavaScript wraps it in a Worksona.js initialization call, suitable for dropping into an existing application immediately.
How and where does it apply?
Agent Builder is the entry point for practitioners who are adding new agents to a Worksona-based system. The typical path is: identify a gap in the current agent roster, open Agent Builder, select the Advanced template, fill in the domain-specific fields, test against a few representative queries, and export.
The exported JSON format matches the schema consumed by the Agent Registry and by the Worksona.js registerAgent call. An agent constructed here integrates into the broader platform without format translation.
The two included reference agents — Dr. Chen (research analyst) and Sophia Rivers (creative writer) — demonstrate what well-formed Advanced-template agents look like in practice. Dr. Chen uses temperature 0.4 and a staged five-phase research methodology. Sophia Rivers uses temperature 0.7 and a client-intake approach that establishes audience and purpose before producing any content. Both can be loaded into the builder as starting points for new agent variants.
The export format produced by Agent Builder is the same schema the Worksona runtime consumes. Here is the JavaScript export for an Advanced-template agent:
const agent = new WorksonaAgent({
id: "research-analyst",
name: "Dr. Chen",
description: "Senior research analyst specializing in comprehensive market research and data analysis",
traits: {
personality: ["methodical", "thorough", "analytical", "patient"],
knowledge: ["market research", "data analysis", "trend analysis", "competitive intelligence"],
tone: "professional and detail-oriented",
background: "PhD in Market Research with 15 years of experience in strategic analysis"
},
config: {
provider: "openai",
model: "gpt-4o",
temperature: 0.4,
maxTokens: 2000,
systemPrompt: "You are Dr. Chen, a senior research analyst...",
examples: [
{
user: "I need to research the competitive landscape for electric vehicles",
assistant: "I'd be happy to help with this research project. Let's start by establishing scope and methodology..."
}
]
}
});
The traits object is not decoration. Worksona.js serializes it into the system prompt alongside the explicit systemPrompt field, so both the structured parameters and the narrative anchor reach the model. Changing a trait value changes the prompt the model receives — that traceability is what makes Agent Builder useful as a tuning interface, not just an authoring one.