This commit is contained in:
tcmofashi
2026-04-03 23:18:30 +08:00
parent 185361f2c3
commit 7b9e1cf925
40 changed files with 52 additions and 86 deletions

View File

@@ -5,7 +5,6 @@ from __future__ import annotations
import os
import sys
import asyncio
import signal
sys.path.insert(0, "/home/tcmofashi/proj/l2d_backend/agentlite/src")

View File

@@ -56,7 +56,7 @@ async def main():
start_time = time.time()
message = "Run 'echo test' and tell me the result."
logger.info(f"\n=== Starting Agent Run ===")
logger.info("\n=== Starting Agent Run ===")
logger.info(f"Message: {message}")
logger.info(f"Max iterations: {agent.max_iterations}")
logger.info(f"Tools: {[t.name for t in agent.tools.tools]}")
@@ -178,7 +178,7 @@ async def main():
output_preview = output[:100] if output else "None"
logger.info(f" Output preview: {output_preview}...")
except asyncio.TimeoutError:
logger.error(f" !!! Tool execution TIMEOUT")
logger.error(" !!! Tool execution TIMEOUT")
output = "Tool execution timed out"
is_error = True
except Exception as e:
@@ -209,7 +209,7 @@ async def main():
final_response = f"Max iterations ({agent.max_iterations}) reached"
logger.info(f"\n{'=' * 60}")
logger.info(f"FINAL RESULT:")
logger.info("FINAL RESULT:")
logger.info(f"{'=' * 60}")
logger.info(f"{final_response}")
logger.info(f"Total iterations: {iterations}")

View File

@@ -22,11 +22,6 @@ from agentlite import Agent, OpenAIProvider
from agentlite.tools import (
ConfigurableToolset,
ToolSuiteConfig,
Shell,
ReadFile,
WriteFile,
Glob,
Grep,
)
# =============================================================================

View File

@@ -17,7 +17,7 @@ from pathlib import Path
import pytest
from agentlite import Agent, TextPart, tool
from agentlite import Agent, tool
# =============================================================================