Simple Agents with existing Agent Frameworks

Choose this approach when you want to leverage existing agent frameworks with added xpander.ai capabilities like state management, authentication, and enhanced tools.

query = "Hello, world! You are AI Agent with State managed by xpander.ai. You are now have access to more tools, authenticate users, and preserve state, return to tasks later"

smolagent = CodeAgent(
		    tools=[xpander_agent.get_tools("smolagents")],
		    model=LiteLLMModel(model_id=xpander.get_model()),
		)
smolagent.memory = xpander_agent.get_memory(agent.to_dict())
result = smolagent.run(query)
xpander_agent.send_result(result)

Event streaming (Slack, Teams, RestAPI, Realtime voice)

def handle_event(event):
		smolagent = CodeAgent(
		    tools=[xpander_agent.get_tools("smolagents")],
		    model=LiteLLMModel(model_id=xpander.get_model()),
		)
		smolagent.memory = xpander_agent.get_memory(agent.to_dict())
    result = smolagent.run(event.payload)
    xpander_agent.send_result(result)

xpander_agent.start_event_listener()

Next Steps