We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 655fb18 commit 68ef33fCopy full SHA for 68ef33f
1 file changed
community/mta-trigger-test/main.py
@@ -0,0 +1,24 @@
1
+from src.agent.capability import MatchingCapability
2
+from src.agent.capability_worker import CapabilityWorker
3
+from src.main import AgentWorker
4
+
5
6
+class MTATriggerTestCapability(MatchingCapability):
7
+ worker: AgentWorker = None
8
+ capability_worker: CapabilityWorker = None
9
10
+ #{{register capability}}
11
12
+ def call(self, worker: AgentWorker):
13
+ self.worker = worker
14
+ self.capability_worker = CapabilityWorker(self)
15
+ self.worker.session_tasks.create(self.run())
16
17
+ async def run(self):
18
+ try:
19
+ self.worker.editor_logging_handler.info("MTA ability triggered")
20
+ await self.capability_worker.speak(
21
+ "MTA ability triggered successfully."
22
+ )
23
+ finally:
24
+ self.capability_worker.resume_normal_flow()
0 commit comments