{
  "spec_version": "1.4.0-otel",
  "timestamp": "2026-04-24T00:13:03.355457Z",
  "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
  "span_id": "00f067aa0ba902b7",
  "severity_text": "WARN",
  "severity_number": 13,
  "event_name": "swarm.agent.lifecycle.deprecated",
  "resource": {
    "service.name": "swarm-orchestrator",
    "service.version": "4.2.0",
    "deployment.environment": "production",
    "node.id": "worker-node-aws-us-east-1a-04"
  },
  "attributes": {
    "agent.id": "TemplateAgent",
    "agent.previous_version": "v29.x",
    "agent.target_version": "v30",
    "deprecation.reason": "Transitioning to v30 architecture.",
    "deprecation.action_required": true
  },
  "metrics": {
    "agent.core_logic.function_count": 6,
    "agent.capabilities.count": 0
  },
  "artifacts": {
    "provenance": {
      "repository": "git+ssh://repo/core/agents/templates/v23_template_agent.py",
      "commit_sha": "a1b2c3d4e5f6g7h8i9j0",
      "docstring_hash": "sha256:d8c4b12389a..."
    },
    "extracted_capabilities": [],
    "core_logic_signatures": [
      {
        "name": "__init__",
        "ast_hash": "sha256:6fd09480b9125695",
        "loc": 15,
        "source": "def __init__(self, agent_id: str, config: Dict[str, Any], system_context: Any):\n        \"\"\"\n        Initialize the agent.\n\n        Args:\n            agent_id: Unique identifier for this agent instance.\n            config: Configuration dictionary (model parameters, enabled tools, etc.).\n            system_context: Reference to the broader system (orchestrator, KG, etc.).\n        \"\"\"\n        super().__init__(agent_id, config, system_context)\n        self.role = config.get(\"role\", \"generalist\")\n        self.tools = config.get(\"tools\", [])\n\n        # Ensure we have access to the Knowledge Graph if required\n        self.kg = getattr(system_context, \"knowledge_graph\", None)"
      },
      {
        "name": "execute_task",
        "ast_hash": "sha256:dd1937221db6f08f",
        "loc": 54,
        "source_omitted_for_brevity": true,
        "note": "In a real telemetry pipeline, large functions can be truncated or omitted entirely in favor of the 'ast_hash' to save network bandwidth and storage costs."
      },
      {
        "name": "_retrieve_context",
        "ast_hash": "sha256:31be8f0b9d5b92d4",
        "loc": 7,
        "source": "async def _retrieve_context(self, input_data: Any) -> str:\n        \"\"\"Helper to fetch relevant nodes from the UKG.\"\"\"\n        if not self.kg:\n            return \"\"\n        # Example query logic\n        query = f\"MATCH (n) WHERE n.text CONTAINS '{input_data}' RETURN n LIMIT 5\"\n        return \"Context data from KG placeholder\""
      },
      {
        "name": "_construct_prompt",
        "ast_hash": "sha256:0cc87018981a927c",
        "loc": 7,
        "source": "def _construct_prompt(self, input_data: Any, context: str) -> str:\n        \"\"\"Builds the final prompt string.\"\"\"\n        return f\"\"\"\n        System: {self.system_prompt}\n        Context: {context}\n        Task: {input_data}\n        \"\"\""
      },
      {
        "name": "_process_llm_response",
        "ast_hash": "sha256:97b77b76d8b93069",
        "loc": 13,
        "source": "async def _process_llm_response(self, response: Any) -> Dict[str, Any]:\n        \"\"\"Parses LLM output, executes tools if defined formats are found.\"\"\"\n        text = response.content\n\n        # Example: Check if the LLM wants to use a tool (pseudo-code)\n        if \"TOOL_CALL:\" in text:\n            # Extract tool name and args\n            # result = await self.tool_manager.execute(...)\n            # return result\n            pass\n\n        # Default: return parsed text\n        return {\"text\": text}"
      },
      {
        "name": "_update_knowledge_graph",
        "ast_hash": "sha256:5f37b4c45603137a",
        "loc": 4,
        "source": "async def _update_knowledge_graph(self, result: Dict[str, Any]):\n        \"\"\"Writes insights back to the graph.\"\"\"\n        # await self.kg.add_node(...)\n        pass"
      }
    ]
  }
}