@@ -235,16 +235,14 @@ class MyAgent:
235235 identity_prompt = identity_prompt,
236236 )
237237
238- def _setup (self , mock_mode = False ):
238+ def _setup (self ):
239239 self ._storage_path = Path.home() / " .hive" / " agents" / " my_agent"
240240 self ._storage_path.mkdir(parents = True , exist_ok = True )
241241 self ._tool_registry = ToolRegistry()
242242 mcp_config = Path(__file__ ).parent / " mcp_servers.json"
243243 if mcp_config.exists():
244244 self ._tool_registry.load_mcp_config(mcp_config)
245- llm = None
246- if not mock_mode:
247- llm = LiteLLMProvider(model = self .config.model, api_key = self .config.api_key, api_base = self .config.api_base)
245+ llm = LiteLLMProvider(model = self .config.model, api_key = self .config.api_key, api_base = self .config.api_base)
248246 tools = list (self ._tool_registry.get_tools().values())
249247 tool_executor = self ._tool_registry.get_executor()
250248 self ._graph = self ._build_graph()
@@ -257,9 +255,9 @@ class MyAgent:
257255 checkpoint_max_age_days = 7 , async_checkpoint = True ),
258256 )
259257
260- async def start (self , mock_mode = False ):
258+ async def start (self ):
261259 if self ._agent_runtime is None :
262- self ._setup(mock_mode = mock_mode )
260+ self ._setup()
263261 if not self ._agent_runtime.is_running:
264262 await self ._agent_runtime.start()
265263
@@ -274,8 +272,8 @@ class MyAgent:
274272 return await self ._agent_runtime.trigger_and_wait(
275273 entry_point_id = entry_point, input_data = input_data or {}, session_state = session_state)
276274
277- async def run (self , context , mock_mode = False , session_state = None ):
278- await self .start(mock_mode = mock_mode )
275+ async def run (self , context , session_state = None ):
276+ await self .start()
279277 try :
280278 result = await self .trigger_and_wait(" default" , context, session_state = session_state)
281279 return result or ExecutionResult(success = False , error = " Execution timeout" )
@@ -471,19 +469,17 @@ def cli():
471469
472470@cli.command ()
473471@click.option (" --topic" , " -t" , required = True )
474- @click.option (" --mock" , is_flag = True )
475472@click.option (" --verbose" , " -v" , is_flag = True )
476- def run (topic , mock , verbose ):
473+ def run (topic , verbose ):
477474 """ Execute the agent."""
478475 setup_logging(verbose = verbose)
479- result = asyncio.run(default_agent.run({" topic" : topic}, mock_mode = mock ))
476+ result = asyncio.run(default_agent.run({" topic" : topic}))
480477 click.echo(json.dumps({" success" : result.success, " output" : result.output}, indent = 2 , default = str ))
481478 sys.exit(0 if result.success else 1 )
482479
483480
484481@cli.command ()
485- @click.option (" --mock" , is_flag = True )
486- def tui (mock ):
482+ def tui ():
487483 """ Launch TUI dashboard."""
488484 from pathlib import Path
489485 from framework.tui.app import AdenTUI
@@ -499,7 +495,7 @@ def tui(mock):
499495 storage.mkdir(parents = True , exist_ok = True )
500496 mcp_cfg = Path(__file__ ).parent / " mcp_servers.json"
501497 if mcp_cfg.exists(): agent._tool_registry.load_mcp_config(mcp_cfg)
502- llm = None if mock else LiteLLMProvider(model = agent.config.model, api_key = agent.config.api_key, api_base = agent.config.api_base)
498+ llm = LiteLLMProvider(model = agent.config.model, api_key = agent.config.api_key, api_base = agent.config.api_base)
503499 runtime = create_agent_runtime(
504500 graph = agent._build_graph(), goal = agent.goal, storage_path = storage,
505501 entry_points = [EntryPointSpec(id = " start" , name = " Start" , entry_node = " intake" , trigger_type = " manual" , isolation_level = " isolated" )],
@@ -564,7 +560,6 @@ import sys
564560from pathlib import Path
565561
566562import pytest
567- import pytest_asyncio
568563
569564_repo_root = Path(__file__ ).resolve().parents[3 ]
570565for _p in [" exports" , " core" ]:
@@ -576,18 +571,17 @@ AGENT_PATH = str(Path(__file__).resolve().parents[1])
576571
577572
578573@pytest.fixture (scope = " session" )
579- def mock_mode ():
580- return True
574+ def agent_module ():
575+ """ Import the agent package for structural validation."""
576+ import importlib
577+ return importlib.import_module(Path(AGENT_PATH ).name)
581578
582579
583- @pytest_asyncio.fixture (scope = " session" )
584- async def runner (tmp_path_factory , mock_mode ):
580+ @pytest.fixture (scope = " session" )
581+ def runner_loaded ():
582+ """ Load the agent through AgentRunner (structural only, no LLM needed)."""
585583 from framework.runner.runner import AgentRunner
586- storage = tmp_path_factory.mktemp(" agent_storage" )
587- r = AgentRunner.load(AGENT_PATH , mock_mode = mock_mode, storage_path = storage)
588- r._setup()
589- yield r
590- await r.cleanup_async()
584+ return AgentRunner.load(AGENT_PATH )
591585```
592586
593587## entry_points Format
0 commit comments