Skip to content

CrewAI Plugin: Agent

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(
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.

Returns a FloTorch agent (CrewAI-compatible) with automatic config synchronization.


  • 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

# Create agent manager
agent_manager = FlotorchCrewAIAgent(
agent_name="customer-support",
custom_tools=[my_custom_tool]
)
# Get the CrewAI agent
agent = agent_manager.get_agent()
# Use with CrewAI Crew
from crewai import Crew, Task
crew = Crew(
agents=[agent],
tasks=[task],
verbose=True
)
result = crew.kickoff()

  • Agent configuration must exist in FloTorch Console