|
1 | | -# onto2py-source-sha256: 6a584cb5560f23483ede25d5dc1ce9be7e153a5b5d8cb849a48ad3852ea808a0 |
| 1 | +# onto2py-source-sha256: 7c2423bfe3ffb71cbffda5de998aec7b7f199516b5672181bc359890d3bd5c3d |
2 | 2 | from __future__ import annotations |
3 | 3 |
|
4 | 4 | import datetime |
|
16 | 16 | get_origin, |
17 | 17 | ) |
18 | 18 |
|
| 19 | +from pydantic import BaseModel, Field, ValidationError |
| 20 | +from rdflib import Graph, Literal, Namespace, URIRef |
| 21 | +from rdflib.namespace import OWL, RDF, RDFS, XSD |
| 22 | + |
19 | 23 | from naas_abi.ontologies.modules.ABIOntology import ( |
20 | | - Agent, |
21 | 24 | Disposition, |
22 | 25 | GenericallyDependentContinuant, |
23 | 26 | MaterialEntity, |
|
30 | 33 | TemporalInstant, |
31 | 34 | TemporalRegion, |
32 | 35 | ) |
33 | | -from pydantic import BaseModel, Field, ValidationError |
34 | | -from rdflib import Graph, Literal, Namespace, URIRef |
35 | | -from rdflib.namespace import OWL, RDF, RDFS, XSD |
36 | 36 |
|
37 | 37 | BFO = Namespace("http://purl.obolibrary.org/obo/") |
38 | 38 | ABI = Namespace("http://ontology.naas.ai/abi/") |
@@ -1007,6 +1007,148 @@ class Message(GenericallyDependentContinuant, RDFEntity): |
1007 | 1007 | ] = None |
1008 | 1008 |
|
1009 | 1009 |
|
| 1010 | +class Agent(GenericallyDependentContinuant, RDFEntity): |
| 1011 | + """ |
| 1012 | + Agent |
| 1013 | + """ |
| 1014 | + |
| 1015 | + _class_uri: ClassVar[str] = "http://ontology.naas.ai/nexus/Agent" |
| 1016 | + _name: ClassVar[str] = "Agent" |
| 1017 | + _property_uris: ClassVar[dict] = { |
| 1018 | + "class_name": "http://ontology.naas.ai/nexus/class_name", |
| 1019 | + "class_path": "http://ontology.naas.ai/nexus/class_path", |
| 1020 | + "created": "http://purl.org/dc/terms/created", |
| 1021 | + "creator": "http://purl.org/dc/terms/creator", |
| 1022 | + "description": "http://ontology.naas.ai/nexus/description", |
| 1023 | + "generically_depends_on": "http://ontology.naas.ai/abi/genericallyDependsOn", |
| 1024 | + "has_agent_role": "http://ontology.naas.ai/nexus/hasAgentRole", |
| 1025 | + "has_intent": "http://ontology.naas.ai/nexus/hasAgentIntent", |
| 1026 | + "has_subagent": "http://ontology.naas.ai/nexus/hasSubAgent", |
| 1027 | + "has_tool": "http://ontology.naas.ai/nexus/hasAgentTool", |
| 1028 | + "is_concretized_by": "http://ontology.naas.ai/abi/isConcretizedBy", |
| 1029 | + "is_subagent_of": "http://ontology.naas.ai/nexus/isSubAgentOf", |
| 1030 | + "label": "http://www.w3.org/2000/01/rdf-schema#label", |
| 1031 | + "logo_url": "http://ontology.naas.ai/nexus/logo_url", |
| 1032 | + "module_path": "http://ontology.naas.ai/nexus/module_path", |
| 1033 | + "system_prompt": "http://ontology.naas.ai/nexus/system_prompt", |
| 1034 | + "uses_model": "http://ontology.naas.ai/nexus/usesModel", |
| 1035 | + } |
| 1036 | + _object_properties: ClassVar[set[str]] = { |
| 1037 | + "generically_depends_on", |
| 1038 | + "has_agent_role", |
| 1039 | + "has_intent", |
| 1040 | + "has_subagent", |
| 1041 | + "has_tool", |
| 1042 | + "is_concretized_by", |
| 1043 | + "is_subagent_of", |
| 1044 | + "uses_model", |
| 1045 | + } |
| 1046 | + |
| 1047 | + # Data properties |
| 1048 | + description: Optional[ |
| 1049 | + Annotated[ |
| 1050 | + str, |
| 1051 | + Field( |
| 1052 | + description="A description used in Nexus platform to identify a generically dependent continuant instance." |
| 1053 | + ), |
| 1054 | + ] |
| 1055 | + ] = None |
| 1056 | + logo_url: Optional[ |
| 1057 | + Annotated[ |
| 1058 | + str, |
| 1059 | + Field( |
| 1060 | + description="A URL to a logo image used in Nexus platform to identify a generically dependent continuant instance." |
| 1061 | + ), |
| 1062 | + ] |
| 1063 | + ] = None |
| 1064 | + class_name: Optional[Annotated[str, Field(description="Agent class name.")]] = None |
| 1065 | + module_path: Optional[ |
| 1066 | + Annotated[str, Field(description="Agent module path in naas-abi.")] |
| 1067 | + ] = None |
| 1068 | + class_path: Optional[ |
| 1069 | + Annotated[str, Field(description="Agent module path and class name.")] |
| 1070 | + ] = None |
| 1071 | + system_prompt: Optional[ |
| 1072 | + Annotated[ |
| 1073 | + str, |
| 1074 | + Field( |
| 1075 | + description="A system prompt used in Nexus platform to configure a software agent." |
| 1076 | + ), |
| 1077 | + ] |
| 1078 | + ] = None |
| 1079 | + label: Optional[Annotated[str, Field(description="Label of the resource.")]] = None |
| 1080 | + created: Optional[ |
| 1081 | + Annotated[ |
| 1082 | + datetime.datetime, |
| 1083 | + Field(description="Date of creation of the resource."), |
| 1084 | + ] |
| 1085 | + ] = None |
| 1086 | + creator: Optional[ |
| 1087 | + Annotated[ |
| 1088 | + Any, |
| 1089 | + Field(description="An entity responsible for making the resource."), |
| 1090 | + ] |
| 1091 | + ] = None |
| 1092 | + |
| 1093 | + # Object properties |
| 1094 | + generically_depends_on: Optional[ |
| 1095 | + Annotated[ |
| 1096 | + List[Union[MaterialEntity, URIRef, str]], |
| 1097 | + Field( |
| 1098 | + description="b generically depends on c =Def b is a generically dependent continuant & c is an independent continuant that is not a spatial region & at some time t there inheres in c a specifically dependent continuant which concretizes b at t" |
| 1099 | + ), |
| 1100 | + ] |
| 1101 | + ] = None |
| 1102 | + has_agent_role: Optional[ |
| 1103 | + Annotated[ |
| 1104 | + List[Union[AgentRole, URIRef, str]], |
| 1105 | + Field( |
| 1106 | + description="Relates an agent to an agent role that concretizes it in platform use." |
| 1107 | + ), |
| 1108 | + ] |
| 1109 | + ] = None |
| 1110 | + has_intent: Optional[ |
| 1111 | + Annotated[ |
| 1112 | + List[Union[AgentIntent, URIRef, str]], |
| 1113 | + Field(description="Relates an agent to an intent available to it."), |
| 1114 | + ] |
| 1115 | + ] = None |
| 1116 | + has_subagent: Optional[ |
| 1117 | + Annotated[ |
| 1118 | + List[Union[Agent, URIRef, str]], |
| 1119 | + Field( |
| 1120 | + description="Relates a supervisor agent to a sub-agent it orchestrates within the Nexus platform." |
| 1121 | + ), |
| 1122 | + ] |
| 1123 | + ] = None |
| 1124 | + has_tool: Optional[ |
| 1125 | + Annotated[ |
| 1126 | + List[Union[AgentTool, URIRef, str]], |
| 1127 | + Field(description="Relates an agent to a tool available to it."), |
| 1128 | + ] |
| 1129 | + ] = None |
| 1130 | + is_concretized_by: Optional[ |
| 1131 | + Annotated[ |
| 1132 | + List[Union[Disposition, Process, Quality, Role, URIRef, str]], |
| 1133 | + Field(description="c is concretized by b =Def b concretizes c"), |
| 1134 | + ] |
| 1135 | + ] = None |
| 1136 | + is_subagent_of: Optional[ |
| 1137 | + Annotated[ |
| 1138 | + List[Union[Agent, URIRef, str]], |
| 1139 | + Field( |
| 1140 | + description="Relates a sub-agent to the supervisor agent that orchestrates it within the Nexus platform." |
| 1141 | + ), |
| 1142 | + ] |
| 1143 | + ] = None |
| 1144 | + uses_model: Optional[ |
| 1145 | + Annotated[ |
| 1146 | + List[Union[AIModel, URIRef, str]], |
| 1147 | + Field(description="Relates an agent to the AI model it uses."), |
| 1148 | + ] |
| 1149 | + ] = None |
| 1150 | + |
| 1151 | + |
1010 | 1152 | class AgentTool(GenericallyDependentContinuant, RDFEntity): |
1011 | 1153 | """ |
1012 | 1154 | Agent Tool |
@@ -4680,6 +4822,7 @@ class Logout(Process, RDFEntity): |
4680 | 4822 | Search.model_rebuild() |
4681 | 4823 | Conversation.model_rebuild() |
4682 | 4824 | Message.model_rebuild() |
| 4825 | +Agent.model_rebuild() |
4683 | 4826 | AgentTool.model_rebuild() |
4684 | 4827 | AgentIntent.model_rebuild() |
4685 | 4828 | Ontology.model_rebuild() |
|
0 commit comments