MCPcopy Create free account
hub / github.com/agi-inc/agent-protocol / step_handler

Function step_handler

packages/sdk/python/examples/smol_developer.py:84–91  ·  view source on GitHub ↗
(step: Step)

Source from the content-addressed store, hash-verified

82
83
84async def step_handler(step: Step) -> Step:
85 task = await Agent.db.get_task(step.task_id)
86 if step.name == StepTypes.PLAN:
87 return await _generate_shared_deps(step)
88 elif step.name == StepTypes.SPECIFY_FILE_PATHS:
89 return await _generate_file_paths(task, step)
90 else:
91 return await _generate_code(task, step)
92
93
94Agent.setup_agent(task_handler, step_handler).start()

Callers

nothing calls this directly

Calls 4

_generate_shared_depsFunction · 0.85
_generate_file_pathsFunction · 0.85
_generate_codeFunction · 0.85
get_taskMethod · 0.45

Tested by

no test coverage detected