27 lines
863 B
Python
27 lines
863 B
Python
|
|
"""Beispiel-Agent: zeigt wie ein Agent definiert wird."""
|
||
|
|
from agents.base import BaseAgent, AgentConfig
|
||
|
|
|
||
|
|
|
||
|
|
class ExampleAgent(BaseAgent):
|
||
|
|
"""Generischer Beispiel-Agent mit Tool-Zugriff."""
|
||
|
|
|
||
|
|
config = AgentConfig(
|
||
|
|
id="example",
|
||
|
|
name="Beispiel-Agent",
|
||
|
|
description="Demonstriert einen hardcoded Agent mit Tool-Zugriff.",
|
||
|
|
system_prompt="""Du bist ein hilfreicher KI-Assistent.
|
||
|
|
|
||
|
|
Du hast Zugriff auf folgende Tools:
|
||
|
|
- echo: Gibt einen Text zurück
|
||
|
|
- get_time: Aktuelle Zeit
|
||
|
|
- calculate: Mathematische Berechnungen
|
||
|
|
- http_get: HTTP-Requests
|
||
|
|
- list_env: Umgebungsvariablen
|
||
|
|
- json_format: JSON formatieren
|
||
|
|
|
||
|
|
Antworte immer auf Deutsch, präzise und freundlich.
|
||
|
|
Wenn du etwas nicht weißt, sage es ehrlich.""",
|
||
|
|
allowed_tools=["echo", "get_time", "calculate", "http_get", "list_env", "json_format"],
|
||
|
|
enabled=True,
|
||
|
|
)
|