Best practices, patterns, and examples for building goal-driven agents. Includes client-facing interaction, feedback edges, judge patterns, fan-out/fan-in, context management, and anti-patterns.
SkillScore100Maintained
Automatic
◆AI Engineer pack
Last verified 9/1/2026
What it changes
Passed 22 of 22 test cases with the skill, and 8 of 22 without it.
Without skill36%
With skill100%
Checks it passed that the model alone missed
Runs python -m support_bot validate
Sets positive priority for the forward edge
Uses serve_file_to_user to expose the file link
and 19 more in the full report
14 fixed8 passed either way0 still failing0 broke
Pass-rate lift
+64 pp
Tokens
+83%
Agent turns
0%
Response time
-40%
Model gemini-3.6-flashMeasured 9/1/2026v122 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 14 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 14
Prompt
Before starting integration testing on a newly built agent package named `support_bot`, what command-line check should be run to verify structural validity?
What was checked, without and with the skill
Checked
Without skill
With skill
Runs python -m support_bot validate
Missed
Passed
case-16 · gemini-3.6-flash · 9/1/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md374 linessingle file
Building Agents - Patterns & Best Practices
Design patterns, examples, and best practices for building robust goal-driven agents.
Prerequisites: Complete agent structure using hive-create.
Practical Example: Hybrid Workflow
How to build a node using both direct file writes and optional MCP validation:
# 1. WRITE TO FILE FIRST (Primary - makes it visible)
node_code = '''
search_node = NodeSpec(
id="search-web",
node_type="event_loop",
input_keys=["query"],
output_keys=["search_results"],
system_prompt="Search the web for: {query}. Use web_search, then call set_output to store results.",
tools=["web_search"],
)
'''
Edit(
file_path="exports/research_agent/nodes/__init__.py",
old_string="# Nodes will be added here",
new_string=node_code
)
# 2. OPTIONALLY VALIDATE WITH MCP (Secondary - bookkeeping)
validation = mcp__agent-builder__test_node(
node_id="search-web",
test_input='{"query": "python tutorials"}',
mock_llm_response='{"search_results": [...mock results...]}'
)
User experience:
Immediately sees node in their editor (from step 1)