Abstract base class defining the interface for agents in the system.
# Source: https://github.com/eosphoros-ai/DB-GPT | License: MIT | Copyright 2023 magic.chen
# Provided via justclaw.it.com; keep this notice with the code.
"""Agent Interface."""
from __future__ import annotations
import dataclasses
from abc import ABC, abstractmethod
from typing import Any, Callable, Dict, List, Optional, Tuple, Union
from dbgpt.core import LLMClient
from dbgpt.util.annotations import PublicAPI
from .action.base import ActionOutput
from .memory.agent_memory import AgentMemory
class Agent(ABC):
"""Agent Interface."""
@abstractmethod
async def send(
self,
message: AgentMessage,
recipient: Agent,
reviewer: Optional[Agent] = None,
request_reply: Optional[bool] = True,
is_recovery: Optional[bool] = False,
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key