-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathagent_engine_app.py
More file actions
45 lines (37 loc) · 1.29 KB
/
agent_engine_app.py
File metadata and controls
45 lines (37 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Agent Engine Application Entry Point
# Perception - AI News Intelligence Platform
# GCP Project: perception-with-intent
from google.adk.apps import App
from google.adk.agents import Agent
from google.adk import telemetry
import logging
# Configure telemetry and monitoring
telemetry.enable_cloud_trace(
project_id="perception-with-intent",
service_name="perception-agents",
service_version="1.0.0"
)
telemetry.enable_cloud_monitoring(
project_id="perception-with-intent",
metrics_prefix="perception"
)
# Configure structured logging
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
handlers=[
logging.StreamHandler(),
telemetry.CloudLoggingHandler()
]
)
# Initialize ADK application
app = App()
# Load root orchestrator (Agent 0) with all sub-agents
root_agent = Agent.from_config_file("perception_app/perception_agent/agents/agent_0_orchestrator.yaml")
app.register_agent(root_agent)
# The root agent automatically loads all sub-agents via config references
# Sub-agents communicate via A2A Protocol
if __name__ == "__main__":
logging.info("Perception Agent Engine starting...")
logging.info("Root orchestrator loaded with all sub-agents")
logging.info("Ready to receive tasks via A2A Protocol")