Agent SDK: Build Intelligent Assistants
Introducing the Hanzo Agent SDK: tools for building intelligent commerce assistants.
The Agent Framework powers automation. The Agent SDK powers interaction. Today we are releasing tools for building intelligent commerce assistants.
From Automation to Interaction
The Agent Framework (launched 2020) handles autonomous operations: churn prevention, inventory management, pricing optimization. These agents work in the background.
The Agent SDK enables interactive agents: customer service, shopping assistants, internal tools. These agents work alongside humans.
SDK Overview
import { Agent, Tool, Conversation } from '@hanzo/agent-sdk';
const shoppingAssistant = new Agent({
name: 'Shopping Assistant',
description: 'Helps customers find and purchase products',
tools: [
new ProductSearchTool(),
new CartTool(),
new OrderTool(),
new RecommendationTool()
],
persona: {
tone: 'helpful and friendly',
constraints: ['never pressure customers', 'always offer alternatives']
}
});
// Handle conversation
const response = await shoppingAssistant.respond(
conversation,
userMessage
);
Core Concepts
Tools
Tools give agents capabilities:
class ProductSearchTool extends Tool {
name = 'search_products';
description = 'Search for products by query or filters';
parameters = {
query: { type: 'string', description: 'Search query' },
filters: { type: 'object', description: 'Filter criteria' }
};
async execute({ query, filters }) {
return await hanzo.products.search({ query, ...filters });
}
}
Built-in tools for common operations:
- Product search and retrieval
- Cart management
- Order lookup and modification
- Customer data access
- Recommendation fetching
Memory
Agents remember conversation context:
const agent = new Agent({
memory: {
type: 'conversation',
maxTurns: 50,
persistence: 'session' // or 'user' for cross-session
}
});
Memory types:
- Conversation: Current conversation history
- User: Persistent user preferences and history
- Knowledge: Domain-specific information
Guardrails
Agents operate within defined boundaries:
const agent = new Agent({
guardrails: {
maxActions: 5, // per turn
requireConfirmation: ['place_order', 'apply_discount'],
prohibit: ['access_other_users', 'modify_pricing'],
escalateTo: 'human_support' // when uncertain
}
});
Evaluation
Measure agent performance:
const evaluator = new AgentEvaluator({
metrics: ['task_completion', 'customer_satisfaction', 'efficiency'],
testCases: testConversations
});
const results = await evaluator.evaluate(agent);
Integration Patterns
Chat Widget
<hanzo-chat
agent="shopping-assistant"
api-key="pk_live_xxx"
></hanzo-chat>
API Integration
app.post('/chat', async (req, res) => {
const { conversationId, message } = req.body;
const conversation = await agent.loadConversation(conversationId);
const response = await agent.respond(conversation, message);
res.json({ response: response.message, actions: response.actions });
});
Voice
const voiceAgent = new VoiceAgent({
baseAgent: shoppingAssistant,
voice: { provider: 'elevenlabs', voiceId: 'xxx' },
stt: { provider: 'whisper' }
});
Example: Customer Service Agent
const supportAgent = new Agent({
name: 'Support Agent',
tools: [
new OrderLookupTool(),
new RefundTool({ maxAmount: 100, requireApproval: true }),
new ShippingUpdateTool(),
new EscalateTool()
],
knowledge: await loadKnowledgeBase('support-docs'),
guardrails: {
requireConfirmation: ['issue_refund'],
escalateOn: ['legal_mention', 'repeated_frustration']
}
});
// Agent handles: order status, returns, shipping issues
// Agent escalates: complex complaints, policy exceptions
Results
Early adopters report:
- 67% of support conversations resolved without human
- 4.2/5 average customer satisfaction
- 45% reduction in response time
- 3x more customers served per support hour
Pricing
Agent SDK is included with Hanzo Growth and Enterprise plans. Usage-based pricing for agent interactions.
What's Next
- Multi-agent orchestration
- Agent marketplace
- Visual agent builder
- Agent analytics dashboard
Build assistants that actually help. Start with the Agent SDK.
Zach Kelling is the founder of Hanzo Industries.
Read more
The Complete AI Agent Stack: Models, Compute, and Tools in One Platform
Hanzo AI introduces the first platform combining 100+ AI models, cloud compute, GPU access, and 260+ MCP tools under a single developer account.
Hanzo Dev: AI Coding Agent for Your Terminal
Hanzo Dev launches — an AI coding agent that lives in your terminal, understands your codebase, and writes production-quality code.
Zen VL: Vision-Language Models with Function Calling
Zen VL is a family of vision-language models at 4B, 8B, and 30B -- each with instruct and agent variants -- supporting OCR in 32 languages, GUI navigation, spatial grounding, and native function calling with visual context.