Co-authored-by: Dt8333 <25431943+Dt8333@users.noreply.github.com> Co-authored-by: Soulter <905617992@qq.com>
15 lines
366 B
Python
15 lines
366 B
Python
from dataclasses import dataclass
|
|
from typing import Generic
|
|
|
|
from .hooks import BaseAgentRunHooks
|
|
from .run_context import TContext
|
|
from .tool import FunctionTool
|
|
|
|
|
|
@dataclass
|
|
class Agent(Generic[TContext]):
|
|
name: str
|
|
instructions: str | None = None
|
|
tools: list[str | FunctionTool] | None = None
|
|
run_hooks: BaseAgentRunHooks[TContext] | None = None
|