"""
LangChain Agent Worker (optional): consume tasks from bus and execute with AgentRunner.
"""

import asyncio
from evenage.core.config import get_bus, get_storage, get_tracer
from evenage.core.runner import AgentRunner
from agents.{{ agent_name }}.handler import {{ agent_name|capitalize }}Agent


async def main():
    agent = {{ agent_name|capitalize }}Agent()
    bus = get_bus()
    tracer = get_tracer()
    storage = get_storage()

    runner = AgentRunner(agent, bus, storage, tracer)
    await runner.start()


if __name__ == "__main__":
    asyncio.run(main())
