|
14 | 14 |
|
15 | 15 | from __future__ import annotations |
16 | 16 |
|
17 | | -from typing import Optional |
| 17 | +from typing import Optional, Union |
18 | 18 |
|
19 | 19 | from google.adk.agents import LlmAgent, RunConfig |
20 | 20 | from google.adk.agents.base_agent import BaseAgent |
21 | | -from google.adk.agents.llm_agent import ToolUnion |
| 21 | +from google.adk.agents.llm_agent import InstructionProvider, ToolUnion |
22 | 22 | from google.adk.agents.run_config import StreamingMode |
23 | 23 | from google.adk.models.lite_llm import LiteLlm |
24 | 24 | from google.adk.runners import Runner |
@@ -57,8 +57,8 @@ class Agent(LlmAgent): |
57 | 57 | description: str = DEFAULT_DESCRIPTION |
58 | 58 | """The description of the agent. This will be helpful in A2A scenario.""" |
59 | 59 |
|
60 | | - instruction: str = DEFAULT_INSTRUCTION |
61 | | - """The instruction for the agent, such as principles of function calling.""" |
| 60 | + instruction: Union[str, InstructionProvider] = DEFAULT_INSTRUCTION |
| 61 | + """The instruction for the agent.""" |
62 | 62 |
|
63 | 63 | model_name: str = Field(default_factory=lambda: settings.model.name) |
64 | 64 | """The name of the model for agent running.""" |
@@ -93,9 +93,6 @@ class Agent(LlmAgent): |
93 | 93 | tracers: list[BaseTracer] = [] |
94 | 94 | """The tracers provided to agent.""" |
95 | 95 |
|
96 | | - serve_url: str = "" |
97 | | - """The url of agent serving host. Show in agent card.""" |
98 | | - |
99 | 96 | def model_post_init(self, __context: Any) -> None: |
100 | 97 | super().model_post_init(None) # for sub_agents init |
101 | 98 |
|
|
0 commit comments