Modules/Taskboard/server/fake_agent.py
2026-11-03 14:23:11 +03:00

15 lines
590 B
Python

"""Test agent: completes its task directly via the DB, no LLM needed."""
import os
import sys
import time
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
from client_tools import call
tid = int(os.environ["TASK_ID"])
with open(os.path.join("reports", "summary.md"), "w") as report:
report.write(f"# Task {tid}\n\nFake agent result.\n")
time.sleep(float(os.environ.get("FAKE_DELAY", "1")))
title = call("get_task", task_id=tid)["title"]
call("complete_task", task_id=tid, result=f"fake result for '{title}'", needs_review=False)
print(f"fake agent finished task {tid}")