Skip to content

Commit 1fed7ce

Browse files
committed
docs(ai): migrate every agent example from the removed tools[] to skills
The prose-example gate caught two `os:check`-marked agent examples still authoring `agent.tools` after this PR removed the field; three more unmarked examples on the same page taught it too. All five now express capability through `skills`, which is the point — these are examples an AI copies verbatim, so leaving them on a slot that no longer exists would have taught the removed pattern to the next generated app. Each rewrite also names WHERE the tools come from (platform data tools, `action_<name>` from an `ai.exposed` Action, `search_knowledge`), so the examples teach the ADR-0109 default path rather than just dropping a field. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BHjroNkLkajskKbJaidko4
1 parent c091666 commit 1fed7ce

2 files changed

Lines changed: 19 additions & 37 deletions

File tree

content/docs/ai/agents.mdx

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -256,12 +256,9 @@ Always be professional and data-driven.`,
256256
maxTokens: 2000,
257257
},
258258

259-
// References to Actions/Flows exposed as tools (see "Actions as Tools").
260-
tools: [
261-
{ type: 'flow', name: 'analyze_lead', description: 'Analyze a lead and provide a qualification score' },
262-
{ type: 'flow', name: 'suggest_next_action', description: 'Suggest the next best action for an opportunity' },
263-
{ type: 'action', name: 'generate_email', description: 'Generate a personalized email template' },
264-
],
259+
// Capability comes from skills — the only tool-bearing slot (ADR-0064).
260+
// Each skill names the platform tools and `action_<name>` tools it needs.
261+
skills: ['lead_qualification', 'opportunity_coaching', 'email_drafting'],
265262

266263
// RAG access: sources to recruit knowledge from + vector store indexes.
267264
knowledge: {
@@ -296,11 +293,10 @@ Always be empathetic and solution-focused.`,
296293
maxTokens: 1500,
297294
},
298295

299-
// `search_knowledge` is provided by the Knowledge Protocol tool, not declared inline.
300-
tools: [
301-
{ type: 'flow', name: 'triage_case', description: 'Analyze a case and assign priority' },
302-
{ type: 'action', name: 'generate_response', description: 'Generate a customer response' },
303-
],
296+
// Skills carry the tools. `case_triage` names the platform data tools it
297+
// reads with; `knowledge_search` names `search_knowledge` (Knowledge
298+
// Protocol). Neither needs a `defineTool` record.
299+
skills: ['case_triage', 'knowledge_search', 'response_drafting'],
304300

305301
knowledge: {
306302
sources: ['support-kb', 'cases'],
@@ -334,10 +330,10 @@ Use reputable data sources.`,
334330
maxTokens: 1000,
335331
},
336332

337-
tools: [
338-
{ type: 'flow', name: 'lookup_company', description: 'Look up company information' },
339-
{ type: 'flow', name: 'enrich_contact', description: 'Enrich contact information' },
340-
],
333+
// The enrichment Flows are exposed with `ai.exposed`, so the runtime
334+
// materialises `action_lookup_company` / `action_enrich_contact` for the
335+
// skill to name.
336+
skills: ['contact_enrichment'],
341337
});
342338
```
343339

@@ -370,11 +366,10 @@ Use the data tools to query records and aggregate metrics.`,
370366
maxTokens: 3000,
371367
},
372368

373-
// Built-in data tools (query_records / get_record / aggregate_data) are
374-
// available to agents automatically once registered — see "Natural Language Queries".
375-
tools: [
376-
{ type: 'flow', name: 'analyze_pipeline', description: 'Analyze sales pipeline health' },
377-
],
369+
// Pipeline analysis is reasoning over the platform's own data tools
370+
// (query_records / aggregate_data / visualize_data), which the skill
371+
// names directly — see "Natural Language Queries".
372+
skills: ['revenue_forecasting'],
378373

379374
knowledge: {
380375
sources: ['opportunities', 'pipeline'],

content/docs/getting-started/common-patterns.mdx

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -397,23 +397,10 @@ export const supportAgent = defineAgent({
397397
instructions: `You are a helpful customer support agent.
398398
You can search for customer records, look up order status,
399399
and create support tickets. Always be polite and professional.`,
400-
tools: [
401-
{
402-
type: 'query',
403-
name: 'contact',
404-
description: 'Search customer records'
405-
},
406-
{
407-
type: 'query',
408-
name: 'order',
409-
description: 'Look up order status'
410-
},
411-
{
412-
type: 'action',
413-
name: 'create_support_ticket',
414-
description: 'Create a support ticket'
415-
}
416-
]
400+
// Capability lives in skills, never inline on the agent (ADR-0064): a
401+
// skill names the platform data tools plus the `action_<name>` tools
402+
// materialised from your own AI-exposed Actions.
403+
skills: ['customer_lookup', 'order_status', 'ticket_intake']
417404
});
418405
```
419406

0 commit comments

Comments
 (0)