Skip to content

Commit 646efb5

Browse files
chore: include documentation for agent builder
1 parent d990ac2 commit 646efb5

22 files changed

Lines changed: 178 additions & 245 deletions

File tree

docs/docs.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"guides/transformation-thesis",
6060
"guides/chain-with-connectors",
6161
"guides/deep-research",
62-
"guides/code-and-agents"
62+
"guides/agent-builder"
6363
]
6464
},
6565
{
@@ -88,7 +88,8 @@
8888
"tools/process-index",
8989
"tools/observations-and-changes",
9090
"tools/artifacts",
91-
"tools/workspace"
91+
"tools/workspace",
92+
"tools/agent-builder"
9293
]
9394
}
9495
]

docs/guides.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Each guide is a recipe: an example prompt, the tool chain the assistant should r
2525
<Card title="Combine with deep research" icon="magnifying-glass-plus" href="/guides/deep-research">
2626
Your reality vs. external benchmarks — gap analysis with citations on both sides.
2727
</Card>
28-
<Card title="Build agents, skills, and code" icon="robot" href="/guides/code-and-agents">
29-
Ground Skills, Custom GPTs, and code generation in your real processes.
28+
<Card title="Build an agent with Agent Builder" icon="wand-magic-sparkles" href="/guides/agent-builder">
29+
A guided, evidence-grounded workflow from "what should we automate?" to a shipped skill or spec.
3030
</Card>
3131
</Columns>

docs/guides/agent-builder.mdx

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
title: "Build an agent with Agent Builder"
3+
description: "A guided, evidence-grounded workflow that takes you from 'what should we automate?' to a shipped skill or a developer-ready spec."
4+
icon: "wand-magic-sparkles"
5+
---
6+
7+
Agent Builder is a guided workflow for turning how your organization actually works into automations. Instead of guessing at what to build, the assistant walks you through a lifecycle — scope an objective, map your current state, diagnose the highest-leverage opportunities, propose a prioritized plan, and then either ship a skill or hand a developer a ready-to-build spec. Every recommendation is grounded in real process evidence from your workspace.
8+
9+
You don't need to memorize the steps. Agent Builder is self-guiding: you ask for the instructions once, and it orients you, figures out where you are, and tells you what to run next.
10+
11+
<Note>
12+
Agent Builder is gated per workspace. If the tools below aren't available, ask your Klarity admin to enable agent development for your workspace.
13+
</Note>
14+
15+
## Start here
16+
17+
Ask your assistant to **get the Agent Builder instructions**, or just tell it what you're trying to do ("help me figure out what to automate in procurement"). Under the hood this calls `get_agent_builder_instructions` with the `begin` step — the orientation step that resolves your workspace, reads your intent, and routes you into the right part of the lifecycle.
18+
19+
From there the assistant self-navigates. It fetches the instructions for each step as it reaches it and pulls in supporting resources on demand with `get_agent_builder_resource`. You stay in the loop at every decision point.
20+
21+
## The lifecycle
22+
23+
Agent Builder follows one lifecycle with two entry paths.
24+
25+
| Step | What happens |
26+
|---|---|
27+
| **Objective** | Capture the scope of the project — what you're trying to improve and why. |
28+
| **Current state** | Map the relevant part of your workspace from real process evidence and confirm the readout with you. |
29+
| **Diagnose** | Score and rank the automation opportunities, each tied to the kind of artifact it would become. |
30+
| **Propose** | Present a prioritized plan you review and pick from, then route each choice to the right next step. |
31+
| **Spec** | For a buildable recommendation, produce a developer-ready specification to hand off. |
32+
33+
There's also a **skill track** — when a recommendation is best expressed as a skill, Agent Builder walks you through discovering, outlining, and building it end-to-end. And a read-only **home** view answers "where am I?" and "what's next?" at any point.
34+
35+
## Two ways in
36+
37+
<Steps>
38+
<Step title="Build skills">
39+
You already know you want to build something. Agent Builder takes you into the skill track — discover candidate skills, outline the one you pick, and build the bundle.
40+
</Step>
41+
<Step title="Explore and decide">
42+
You're not sure what to build yet. Agent Builder walks the full explore chain — objective → current state → diagnose → propose — and only then routes you to a spec or a skill build, grounded in what it found.
43+
</Step>
44+
</Steps>
45+
46+
## What to expect
47+
48+
<Steps>
49+
<Step title="It asks before it assumes">
50+
When there's a finite set of choices, the assistant presents them and lets you pick rather than guessing. Human checkpoints are built into the workflow by design.
51+
</Step>
52+
<Step title="No recommendation without evidence">
53+
Every diagnosis and proposal is backed by real process data from your workspace. If the evidence isn't there, Agent Builder won't invent it.
54+
</Step>
55+
<Step title="Your work stays with you">
56+
Project artifacts and intermediate state live in a local `./klarity/` project directory on your machine — not in the Klarity backend. You can revisit or resume a project across sessions, and the assistant reconciles where you are against your saved progress.
57+
</Step>
58+
</Steps>
59+
60+
## Watch for
61+
62+
- **Come back after the plan.** The proposal step is interactive — you review and make your picks, then the assistant continues from your selections. Give it your choices before expecting it to build.
63+
- **One workspace at a time.** Agent Builder resolves the workspace up front. If you work across multiple workspaces, confirm you're in the right one before you start.
64+
- **Resuming a project.** If you've done work before, start the same way — ask for the instructions. The `begin` step reads your local project state and picks up where you left off instead of starting over.

docs/guides/code-and-agents.mdx

Lines changed: 0 additions & 40 deletions
This file was deleted.

docs/tools/agent-builder.mdx

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
title: "Agent Builder"
3+
description: "Fetch the guided Agent Builder workflow and its supporting resources, step by step."
4+
icon: "wand-magic-sparkles"
5+
---
6+
7+
Agent Builder is a guided workflow for turning how an organization works into automations — scope an objective, map current state, diagnose opportunities, propose a plan, then ship a skill or a developer-ready spec. The methodology is served over these two tools rather than shipped in the client, so the assistant fetches each step's instructions as it reaches it.
8+
9+
<Note>
10+
These tools are gated by the `enable_agent_development_mcp` workspace setting. They only appear for workspaces where agent development is enabled.
11+
</Note>
12+
13+
| Tool | When to use |
14+
|---|---|
15+
| `get_agent_builder_instructions` | The entry point and the per-step fetcher. Start with `step="begin"` to orient, then fetch each step as the workflow routes to it. |
16+
| `get_agent_builder_resource` | Pull a supporting resource (reference, primitive, or template) named in a step's manifest — fetched on demand, not up front. |
17+
18+
## `get_agent_builder_instructions`
19+
20+
Fetches one step's instruction body plus the manifest of supporting resources it may draw on.
21+
22+
- **`step`** — the step to fetch. One of: `begin`, `home`, `start`, `objective`, `current_state`, `diagnose`, `propose`, `spec`, `skill_track`, `skill_discovery`, `skill_outline`, `skill_build`.
23+
24+
Returns:
25+
26+
- **`instructions`** — the step's body, with a "Relevant resources" appendix listing the resources you can fetch on demand.
27+
- **`resource_manifest`** — the same resources as structured `(type, subtype)` pairs. These are **relevance hints**, not required reads — fetch one only when the conversation calls for it.
28+
29+
Always begin with `step="begin"`. The orientation step resolves the workspace, reads the user's intent, and routes into the right part of the lifecycle. There is no `next` field — routing lives in each step's prose, so the workflow self-navigates from `begin` onward.
30+
31+
## `get_agent_builder_resource`
32+
33+
Fetches a single supporting resource named in a step's `resource_manifest`.
34+
35+
- **`type`**`reference`, `primitive`, or `template`.
36+
- **`subtype`** — the specific variant. Must be valid for the given `type`; an invalid pairing is rejected.
37+
38+
Returns:
39+
40+
- **`content`** — the resource payload (markdown, HTML, or YAML).
41+
- **`version`** — the resource version number.
42+
- **`subtype`** — the resolved subtype.
43+
44+
## The loop
45+
46+
<Steps>
47+
<Step title="Orient">
48+
Call `get_agent_builder_instructions` with `step="begin"`. Resolve the workspace and let the step route you to the entry point.
49+
</Step>
50+
<Step title="Walk the lifecycle">
51+
Fetch each step's instructions as the workflow reaches it — `objective`, `current_state`, `diagnose`, `propose`, and then `spec` or the skill track. Follow the body's prose to decide what runs next.
52+
</Step>
53+
<Step title="Pull resources on demand">
54+
When a step's manifest names a resource the current work needs, call `get_agent_builder_resource` for that `(type, subtype)`. Don't fetch the whole manifest up front.
55+
</Step>
56+
</Steps>
57+
58+
## Watch for
59+
60+
- **Begin first.** For MCP-only clients with no skills to auto-load, the convention is that the first call is `get_agent_builder_instructions(step="begin")`. Everything else routes from there.
61+
- **The manifest is a hint.** `resource_manifest` tells you what a step *may* draw on, not what to load. Fetch resources lazily.
62+
- **Feature-gated.** If these tools aren't present, the workspace doesn't have agent development enabled.
63+
64+
See the [Build an agent with Agent Builder](/guides/agent-builder) guide for the end-to-end walkthrough.

docs/tools/overview.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Every workflow reduces to: **find the right process(es) → fetch detail → gat
1717
| [Process observations](/tools/observations-and-changes) | Recent changes, observations, activity timelines, sessions | "What changed?", "what happened?", "why does this run this way?" |
1818
| [Artifacts](/tools/artifacts) | Document search, content retrieval, in-document text search | The user names a document or recording |
1919
| [Workspace](/tools/workspace) | List accessible workspaces | Orienting before drilling in |
20+
| [Agent Builder](/tools/agent-builder) | `get_agent_builder_instructions`, `get_agent_builder_resource` | Building an agent or skill through the guided workflow (gated feature) |
2021

2122
## Before you call
2223

gemini-extension.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
"url": "https://api.klarity.ai/mcp"
88
}
99
},
10-
"contextFileName": "skills/klarity-agent-builder-using-klarity/SKILL.md"
10+
"contextFileName": "skills/agent-builder/SKILL.md"
1111
}

klarity_mcp/metadata.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -95,20 +95,9 @@ class KlarityMCPMetadata:
9595
repository_url="https://github.com/Klarity-AI/klarity-mcp",
9696
skills=(
9797
"klarity-process-context-graph",
98-
"klarity-agent-builder-using-klarity",
99-
"klarity-agent-builder-start",
100-
"klarity-agent-builder-home",
101-
"klarity-agent-builder-objective",
102-
"klarity-agent-builder-current-state",
103-
"klarity-agent-builder-diagnose",
104-
"klarity-agent-builder-propose",
105-
"klarity-agent-builder-spec",
106-
"klarity-agent-builder-skill-track",
107-
"klarity-agent-builder-skill-discovery",
108-
"klarity-agent-builder-skill-outline",
109-
"klarity-agent-builder-skill-build",
98+
"agent-builder",
11099
),
111-
gemini_context_skill="klarity-agent-builder-using-klarity",
100+
gemini_context_skill="agent-builder",
112101
)
113102

114103

skills/agent-builder/SKILL.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: agent-builder
3+
description: Entry point for all Klarity agent-building work. Guides you from "what should we automate?" through scoping, diagnosis, and a plan to a shipped skill or developer-ready spec. The methodology is served from the Klarity Architect MCP — invoke before any response when the user mentions processes, automation, agents, or ops intelligence.
4+
---
5+
6+
# Agent Builder
7+
8+
This is the single entry point for all Klarity agent-building work. The methodology is served from the Klarity Architect MCP — do not improvise it. Fetch it before doing anything else, and let it route you through the rest of the lifecycle.
9+
10+
1. FIRST, call `get_agent_builder_instructions(step="begin")` and follow it before any other agent-building work. Workspace resolution, the lifecycle model, the two-door gate, and the next-step routing all come from that call.
11+
2. Follow the returned `instructions` exactly. They include a **resource manifest** — references, primitives, and templates the step may draw on.
12+
3. For each manifest entry the current work needs, call `get_agent_builder_resource(type=..., subtype=...)` and use the returned content. Fetch on demand — the manifest is a relevance hint, not a required read.
13+
4. Move through the lifecycle by following each step's prose. There is no `next` field; `begin` routes you to the entry step and each step's instructions say what runs next. Fetch each step (`objective`, `current_state`, `diagnose`, `propose`, `spec`, or the skill track: `skill_track``skill_discovery``skill_outline``skill_build`) as you reach it.
14+
5. Write all durable outputs to the local project directory as the instructions specify. The tools are read-only — they only serve methodology; the client owns project state.
15+
16+
See `tools.md` for the full tool catalog and the lifecycle step list.

0 commit comments

Comments
 (0)