agent_script_spec.simplified_models
agent_script_spec.simplified_models
¶
Simplified Agent Script Specification Models
This module provides a simplified version of the agent script specification that reduces hierarchical complexity and enforces RFC 2119 language for requirements clarity.
Key improvements: 1. Flattened interaction model (removed phases/steps hierarchy) 2. Eliminated redundant fields 3. Enforced RFC 2119 terminology (MUST, SHOULD, MAY) 4. Streamlined structure for better usability
Frontmatter
¶
Bases: BaseModel
Frontmatter specification for agent scripts.
This section MUST contain the essential metadata for the agent.
Source code in packages/agent-script-spec/src/agent_script_spec/simplified_models.py
InteractionWorkflow
¶
Bases: BaseModel
Simplified interaction workflow without hierarchical phases.
This replaces the complex phase/step/sub-step hierarchy with a flat list of workflow steps.
Source code in packages/agent-script-spec/src/agent_script_spec/simplified_models.py
RequirementRule
¶
Bases: BaseModel
A single requirement rule using RFC 2119 language.
Requirements MUST use RFC 2119 keywords to specify obligation levels:
- MUST: Absolute requirement (mandatory)
- MUST NOT: Absolute prohibition (forbidden)
- SHOULD: Strong recommendation (preferred)
- SHOULD NOT: Strong recommendation against (discouraged)
- MAY: Optional or permissible (allowed)
- MAY NOT: Optional prohibition (not required to avoid)
Source code in packages/agent-script-spec/src/agent_script_spec/simplified_models.py
SimplifiedAgentScriptSpecification
¶
Bases: BaseModel
Simplified Agent Script Specification.
This model reduces complexity by: 1. Flattening the interaction model 2. Consolidating redundant fields 3. Enforcing RFC 2119 language 4. Streamlining the overall structure
Source code in packages/agent-script-spec/src/agent_script_spec/simplified_models.py
| Python | |
|---|---|
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | |
capabilities
instance-attribute
¶
Core capabilities of the agent. Keys MUST be capability names, values MUST describe the specific skills.
This consolidates the previous key_capabilities and core_competencies fields.
communication_style = None
class-attribute
instance-attribute
¶
How the agent SHOULD communicate with users. MAY include tone, format, and interaction preferences.
deliverables = None
class-attribute
instance-attribute
¶
Expected outputs and their specifications. Keys MUST be deliverable names, values MUST describe requirements.
expertise
instance-attribute
¶
Domain expertise and knowledge areas. This SHOULD be comprehensive but concise.
frontmatter
instance-attribute
¶
The frontmatter metadata. This MUST be provided.
mcp_integration = None
class-attribute
instance-attribute
¶
MCP server integration descriptions. Keys MUST match mcp_server_names from frontmatter.
mission
instance-attribute
¶
The agent's mission statement. This MUST clearly state the agent's purpose.
name
instance-attribute
¶
The display name of the agent. This MUST match the frontmatter name.
requirements = None
class-attribute
instance-attribute
¶
Behavioral requirements using RFC 2119 language. Each rule MUST use RFC 2119 keywords.
Supported keywords: MUST, MUST NOT, SHOULD, SHOULD NOT, MAY, MAY NOT. Use negative forms (MUST NOT, SHOULD NOT) to specify prohibited behaviors and constraints.
This consolidates the previous rules, guiding_principles, and approach fields.
role
instance-attribute
¶
The primary role of the agent. This MUST clearly define the agent's function.
workflow
instance-attribute
¶
The simplified interaction workflow. This MUST define how the agent operates.
validate_mcp_integration_keys()
¶
Validate that mcp_integration keys match mcp_server_names from frontmatter.
Source code in packages/agent-script-spec/src/agent_script_spec/simplified_models.py
validate_name_matches_frontmatter(v, info)
classmethod
¶
Validate that name matches frontmatter name.
Source code in packages/agent-script-spec/src/agent_script_spec/simplified_models.py
validate_rfc2119_requirements(v)
classmethod
¶
Validate that requirements use RFC 2119 language.
Source code in packages/agent-script-spec/src/agent_script_spec/simplified_models.py
WorkflowStep
¶
Bases: BaseModel
A single workflow step with clear requirements.
Each step MUST have a clear description and MAY include specific requirements.