CrewAI Plugin: Agent
Overview
Section titled “Overview”FlotorchCrewAIAgent
is the main entry point for creating CrewAI-compatible agents that integrate with FloTorch’s Gateway. It provides seamless integration with CrewAI’s multi-agent framework while leveraging FloTorch’s infrastructure.
from flotorch.crewai.agent import FlotorchCrewAIAgent
API_KEY = "<your_api_key>"BASE_URL = "https://gateway.flotorch.cloud"AGENT_NAME = "<your_agent_name>" # agent name configured in console
FlotorchCrewAIAgent
Section titled “FlotorchCrewAIAgent”FlotorchCrewAIAgent( agent_name: str, # agent name configured in console enable_memory: bool = False, custom_tools: list = None, base_url: str = None, api_key: str = None,)
Creates an agent manager that fetches configuration from FloTorch Gateway and builds a CrewAI-compatible agent.
get_agent() -> Agent
Section titled “get_agent() -> Agent”Returns a FloTorch agent (CrewAI-compatible) with automatic config synchronization.
Features
Section titled “Features”Tool Integration
Section titled “Tool Integration”- Memory Tools: Set
enable_memory=True
to automatically include FloTorch Memory tools (preload/search) so the agent can read/write memories via your configured provider. This uses the FloTorch Memory SDK under the hood; ensure a Memory Provider is configured in your Console and see the plugin docs here: FloTorch CrewAI: Memory. - Custom Tools: User-defined tools passed via
custom_tools
Usage Example
Section titled “Usage Example”# Create agent manageragent_manager = FlotorchCrewAIAgent( agent_name="customer-support", custom_tools=[my_custom_tool])
# Get the CrewAI agentagent = agent_manager.get_agent()
# Use with CrewAI Crewfrom crewai import Crew, Task
crew = Crew( agents=[agent], tasks=[task], verbose=True)
result = crew.kickoff()
- Agent configuration must exist in FloTorch Console