async def arun(
            self,
            system_instruction: str = None,
            messages: list[Message] = None,
            *args,
            **kwargs,
        ) -> AsyncGenerator[str, None]:
            """Custom arun with no citations in the response."""
            await self._setup(system_instruction)

            if messages:
                for m in messages:
                    await self.conversation.add_message(m)

            # Initialize citation tracker
            citation_tracker = CitationTracker()

            # Empty response with no citations
            response_content = "This is a response with no citations."

            # Yield an initial message event with the start of the text
            yield self._format_sse_event("message", {"content": response_content})

            # No citation spans to extract
            citation_spans = extract_citation_spans(response_content)

            # Should be empty
            assert len(citation_spans) == 0, "No citation spans should be found"

            # Add assistant message to conversation (with no citation metadata)
            await self.conversation.add_message(
                Message(
                    role="assistant",
                    content=response_content,
                    metadata={"citations": []}
                )
            )

            # Create and emit final answer event
            final_evt_payload = {
                "id": "msg_final",
                "object": "agent.final_answer",
                "generated_answer": response_content,
                "citations": []
            }

            yield self._format_sse_event("agent.final_answer", final_evt_payload)
            yield "event: done\ndata: {}\n\n"
Custom arun with no citations in the response.
py/tests/unit/agent/test_agent_citations_old.py