API Reference
Classes:
Name | Description |
---|---|
CrewAIAgent |
Adapter class for the CrewAI library for use with FastAPIAgents. |
CrewAIAgent
Adapter class for the CrewAI library for use with FastAPIAgents.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
agent
|
Crew
|
The CrewAI crew instance. |
required |
Example:
from fastapi_agents.crewai import CrewaiAgent
from crewai import Crew, Agent, Task
from crewai.process import Process
poet = Agent(...)
write_poem = Task(...)
crew = Crew(
agents=[poet],
tasks=[write_poem],
process=Process.sequential
)
agents.register("poet", CrewAIAgent(crew))
Raises:
Type | Description |
---|---|
ValueError
|
If any messages are supplied. |
Returns:
Name | Type | Description |
---|---|---|
CrewAIAgent |
A CrewAI agent. |