The web3 extension imports, and says what is missing

eth-account was declared nowhere, so importing the shipped extension
failed on a clean install and its tests took the suite's collection with
them. It is a web3 extra now, which dev names once.

web3_agent and web3_network are no longer exported: they are written
against an agent model this package does not have — InferenceResult,
State, Router, RouterFn, a network module, and two sibling modules that
do not exist either. Importing them from the package __init__ made all
of it unimportable, including the two modules that are sound. Whether
this SDK grows a network model is a decision, not a rename.

Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
2026-09-11 04:10:09 -07:00
co-authored by Hanzo Dev
parent 41b460b760
commit 116fc35319
2 changed files with 24 additions and 6 deletions
@@ -1,6 +1,20 @@
"""Web3 integration for Hanzo agents.
Provides wallet management, transaction handling, and Web3-enabled agents.
Provides wallet management, transaction handling, and MPC custody.
``web3_agent`` and ``web3_network`` are NOT exported here. They are written
against an agent model this package does not have: they import
``hanzo_agents.agent.InferenceResult``, ``hanzo_agents.execution_context.State``,
``hanzo_agents.router.Router``/``RouterFn`` and ``hanzo_agents.network``, and
none of those exist. An agent here serves reasoners and skills over HTTP; those
two describe a router stepping a network of agents over shared state, which is
a different design and not one this SDK can be made to satisfy by renaming
imports.
Importing either from this package's ``__init__`` made every module in it
unimportable, including the four that are sound — and took the whole test
suite's collection down with them. Whether this SDK grows a network model, or
those two modules go, is a decision to make rather than a rename to guess at.
"""
from .wallet import (
@@ -11,8 +25,6 @@ from .wallet import (
derive_agent_wallet,
generate_shared_mnemonic,
)
from .web3_agent import Web3Agent, Web3AgentConfig
from .web3_network import Web3Network
__all__ = [
"AgentWallet",
@@ -21,7 +33,4 @@ __all__ = [
"create_wallet_tool",
"derive_agent_wallet",
"generate_shared_mnemonic",
"Web3Agent",
"Web3AgentConfig",
"Web3Network",
]
+9
View File
@@ -51,7 +51,16 @@ include = ["hanzo_agents*"]
exclude = ["tests*", "examples*"]
[project.optional-dependencies]
# The web3 extension imports eth_account at module scope, so importing
# hanzo_agents.extensions.web3 from a clean install failed until this existed —
# and its tests took the whole suite's collection down with them.
web3 = [
"eth-account>=0.11,<1",
]
dev = [
# Named once, here, so the dev environment can run every test this project
# ships rather than most of them.
"hanzo-agents[web3]",
"pytest>=7.4,<9",
"pytest-asyncio>=0.21,<0.24",
"pytest-cov>=4.1,<5",