@@ -43,11 +43,6 @@ class Agent(Base):
4343 )
4444
4545 # Agent configuration
46- url = Column (
47- String (500 ),
48- nullable = False ,
49- comment = "Base URL where the agent service is hosted" ,
50- )
5146 version = Column (
5247 String (50 ), nullable = True , default = "1.0.0" , comment = "Agent version"
5348 )
@@ -83,22 +78,6 @@ class Agent(Base):
8378 JSON , nullable = True , comment = "Agent-specific configuration parameters"
8479 )
8580
86- # Performance and usage tracking
87- last_health_check = Column (
88- DateTime (timezone = True ),
89- nullable = True ,
90- comment = "Timestamp of last successful health check" ,
91- )
92- total_requests = Column (
93- Integer ,
94- default = 0 ,
95- nullable = False ,
96- comment = "Total number of requests processed by this agent" ,
97- )
98- success_rate = Column (
99- String (10 ), nullable = True , comment = "Success rate percentage (e.g., '95.5%')"
100- )
101-
10281 # Timestamps
10382 created_at = Column (
10483 DateTime (timezone = True ), server_default = func .now (), nullable = False
@@ -120,18 +99,12 @@ def to_dict(self) -> Dict[str, Any]:
12099 "name" : self .name ,
121100 "display_name" : self .display_name ,
122101 "description" : self .description ,
123- "url" : self .url ,
124102 "version" : self .version ,
125103 "enabled" : self .enabled ,
126104 "is_active" : self .is_active ,
127105 "capabilities" : self .capabilities ,
128- "metadata " : self .agent_metadata ,
106+ "agent_metadata " : self .agent_metadata ,
129107 "config" : self .config ,
130- "last_health_check" : self .last_health_check .isoformat ()
131- if self .last_health_check
132- else None ,
133- "total_requests" : self .total_requests ,
134- "success_rate" : self .success_rate ,
135108 "created_at" : self .created_at .isoformat () if self .created_at else None ,
136109 "updated_at" : self .updated_at .isoformat () if self .updated_at else None ,
137110 }
@@ -143,11 +116,10 @@ def from_config(cls, config_data: Dict[str, Any]) -> "Agent":
143116 name = config_data .get ("name" ),
144117 display_name = config_data .get ("display_name" , config_data .get ("name" )),
145118 description = config_data .get ("description" ),
146- url = config_data .get ("url" ),
147119 version = config_data .get ("version" , "1.0.0" ),
148120 enabled = config_data .get ("enabled" , True ),
149121 is_active = config_data .get ("is_active" , True ),
150122 capabilities = config_data .get ("capabilities" ),
151123 agent_metadata = config_data .get ("metadata" ),
152124 config = config_data .get ("config" ),
153- )
125+ )
0 commit comments