mirror of
https://github.com/hanzoai/papers.git
synced 2026-10-30 14:58:42 +00:00
87 lines
3.4 KiB
TeX
87 lines
3.4 KiB
TeX
\section{AI Agents: Hanzo Agent + MCP}
|
|
|
|
\label{sec:agents}
|
|
%% ============================================================================
|
|
|
|
\subsection{Overview}
|
|
|
|
Hanzo Agent is a TypeScript/Python agent framework built around the Model Context Protocol (MCP). MCP provides a standardized interface for tools, resources, and prompts that agents can discover and use. The framework supports multi-agent orchestration, persistent memory (backed by Hanzo Vector), tool composition, and structured output validation.
|
|
|
|
\subsection{Feature Matrix}
|
|
|
|
\begin{table}[H]
|
|
\centering
|
|
\caption{AI agent framework comparison.}
|
|
\footnotesize
|
|
\begin{tabular}{@{}lcccc@{}}
|
|
\toprule
|
|
Feature & \rotatebox{60}{Hanzo Agent} & \rotatebox{60}{LangChain} & \rotatebox{60}{CrewAI} & \rotatebox{60}{AutoGen} \\
|
|
\midrule
|
|
MCP native & \yes & \pmark & \no & \no \\
|
|
Multi-agent & \yes & \yes & \yes & \yes \\
|
|
Tool discovery & \yes & \pmark & \no & \no \\
|
|
Persistent memory & \yes & \yes & \pmark & \pmark \\
|
|
Vector memory & \yes & \yes & \no & \no \\
|
|
Structured output & \yes & \yes & \yes & \yes \\
|
|
Streaming & \yes & \yes & \no & \yes \\
|
|
TypeScript & \yes & \yes & \no & \no \\
|
|
Python & \yes & \yes & \yes & \yes \\
|
|
IAM-native & \yes & \no & \no & \no \\
|
|
Model agnostic & \yes & \yes & \yes & \yes \\
|
|
Blockchain tools & \yes & \pmark & \no & \no \\
|
|
Browser control & \yes & \no & \no & \no \\
|
|
Code execution & \yes & \pmark & \no & \yes \\
|
|
Dep. count & 12 & 180+ & 45 & 35 \\
|
|
Open source & \yes & \yes & \yes & \yes \\
|
|
\bottomrule
|
|
\end{tabular}
|
|
\end{table}
|
|
|
|
\subsection{Performance}
|
|
|
|
Benchmarked with a 5-tool agent performing a research task (web search, fetch, extract, summarize, save), averaged over 100 runs:
|
|
|
|
\begin{table}[H]
|
|
\centering
|
|
\caption{Agent execution overhead (excluding LLM latency).}
|
|
\footnotesize
|
|
\begin{tabular}{@{}lrrr@{}}
|
|
\toprule
|
|
Framework & Overhead/step & Memory (MB) & Cold start (s) \\
|
|
\midrule
|
|
Hanzo Agent & 2.1ms & 45 & 0.3 \\
|
|
LangChain & 18.5ms & 320 & 2.8 \\
|
|
CrewAI & 12.3ms & 180 & 1.5 \\
|
|
AutoGen & 8.7ms & 95 & 0.8 \\
|
|
\bottomrule
|
|
\end{tabular}
|
|
\end{table}
|
|
|
|
LangChain's 18.5ms overhead per step comes from its deep abstraction hierarchy (Runnable, RunnableSequence, RunnablePassthrough) and extensive callback system. Hanzo Agent's 2.1ms overhead reflects its minimal abstraction: MCP tool calls are direct function invocations with schema validation.
|
|
|
|
\subsection{Dependency Analysis}
|
|
|
|
\begin{table}[H]
|
|
\centering
|
|
\caption{Dependency tree analysis.}
|
|
\footnotesize
|
|
\begin{tabular}{@{}lrrr@{}}
|
|
\toprule
|
|
Framework & Direct deps & Transitive & Install size \\
|
|
\midrule
|
|
Hanzo Agent & 12 & 48 & 8 MB \\
|
|
LangChain & 28 & 180+ & 245 MB \\
|
|
CrewAI & 15 & 85 & 62 MB \\
|
|
AutoGen & 10 & 65 & 35 MB \\
|
|
\bottomrule
|
|
\end{tabular}
|
|
\end{table}
|
|
|
|
LangChain's 180+ transitive dependencies represent a significant supply chain attack surface. Hanzo Agent's 48 transitive dependencies are individually audited and pinned.
|
|
|
|
\subsection{Key Differentiator}
|
|
|
|
MCP-native architecture means tools are discoverable at runtime---an agent can connect to any MCP server and immediately use its tools without code changes. The blockchain tool suite provides native Web3 operations (transaction signing, contract interaction, chain queries) that LangChain requires third-party plugins for. The 12-dependency footprint (vs LangChain's 180+) dramatically reduces supply chain risk.
|
|
|
|
%% ============================================================================
|