submit_jimeng_task.py 774 B

1234567891011121314151617181920212223242526272829303132
  1. #!/usr/bin/env python3
  2. """
  3. Submit Jimeng AI tool task to CodingAgent
  4. """
  5. import asyncio
  6. from pathlib import Path
  7. from tool_agent.tool.agent import CodingAgent
  8. async def main():
  9. # Read task spec
  10. task_spec_path = Path(__file__).parent.parent / "task_specs" / "jimeng_ai_task.md"
  11. task_spec = task_spec_path.read_text(encoding="utf-8")
  12. # Create CodingAgent instance
  13. agent = CodingAgent()
  14. print(">> Submitting Jimeng AI tool task...")
  15. print(f">> Task spec: {task_spec_path}")
  16. print("-" * 60)
  17. # Execute task
  18. result = await agent.execute(
  19. task=task_spec,
  20. reference_files=None
  21. )
  22. print("-" * 60)
  23. print(">> Task completed!")
  24. print(f">> Result: {result}")
  25. if __name__ == "__main__":
  26. asyncio.run(main())