diff --git a/trustgraph-flow/trustgraph/agent/react/tools.py b/trustgraph-flow/trustgraph/agent/react/tools.py index 401a454a..c74be6b7 100644 --- a/trustgraph-flow/trustgraph/agent/react/tools.py +++ b/trustgraph-flow/trustgraph/agent/react/tools.py @@ -251,8 +251,17 @@ class ToolServiceImpl: from trustgraph.schema import ToolServiceRequest, ToolServiceResponse import uuid - request_topic = f"{self.service_topic}-request" - response_topic = f"{self.service_topic}-response" + # Construct full topic paths using non-persistent topics + # If topic already contains "://", assume it's a full Pulsar URI + # Otherwise, construct default path + if '://' in self.service_topic: + # Full Pulsar URI provided + request_topic = f"{self.service_topic}-request" + response_topic = f"{self.service_topic}-response" + else: + # Construct default path matching DynamicToolService pattern + request_topic = f"non-persistent://tg/request/{self.service_topic}-request" + response_topic = f"non-persistent://tg/response/{self.service_topic}-response" request_metrics = ProducerMetrics( processor=self.processor.id, diff --git a/trustgraph-flow/trustgraph/tool_service/joke/service.py b/trustgraph-flow/trustgraph/tool_service/joke/service.py index 4c855e9c..737602f7 100644 --- a/trustgraph-flow/trustgraph/tool_service/joke/service.py +++ b/trustgraph-flow/trustgraph/tool_service/joke/service.py @@ -41,6 +41,7 @@ from ... base import DynamicToolService logger = logging.getLogger(__name__) default_ident = "joke-service" +default_topic = "joke" # Joke database organized by topic and style JOKES = {