π¦Main Guide
Step 1: Install AIMXT
pip install AIMXTStep 2: Define Your Agents
from AIMXT import Agent, AgentJobStepRequest, AgentJobResponse, JobRequest, JobSteps, Step, RunnerAgent
class AvailabilityAgent(Agent):
async def execute_request(self, request: AgentJobStepRequest) -> AgentJobResponse:
# Simulate checking participant availability
return AgentJobResponse(
worker=self.details().name,
job_data={"available_times": ["10:00 AM", "2:00 PM", "4:00 PM"]}
)
class SchedulerAgent(Agent):
async def execute_request(self, request: AgentJobStepRequest) -> AgentJobResponse:
available_times = request.job_data["available_times"]
# Simulate selecting the best time (e.g., the first available slot)
best_time = available_times[0]
return AgentJobResponse(
worker=self.details().name,
job_data={"scheduled_time": best_time}
)
class NotifierAgent(Agent):
async def execute_request(self, request: AgentJobStepRequest) -> AgentJobResponse:
scheduled_time = request.job_data["scheduled_time"]
# Simulate notifying participants
return AgentJobResponse(
worker=self.details().name,
job_data={"notification": f"Meeting scheduled at {scheduled_time}"}
)Step 3: Create a Runner Agent
Step 4: Define the Job
Step 5: Execute the Job
Complete Code Example
What This Example Does
Last updated