API Reference
Classes:
Name | Description |
---|---|
APIMode |
Mode for registering routes to FastAPI. |
BaseAgent |
Base class for an agent. |
Framework |
Framework for the agent. |
Message |
Message object in the conversation. |
RequestPayload |
Request payload for the agent endpoint. |
ResponsePayload |
Response payload for the agent endpoint. |
Role |
Role of the message in the conversation. |
APIMode
Mode for registering routes to FastAPI.
Values
simple
: Standard mode with minimal configuration.openai
: OpenAI-compatible mode for additional functionality.
BaseAgent
Base class for an agent.
Methods:
Name | Description |
---|---|
run |
Run the agent with the given payload. |
run(payload)
abstractmethod
async
Run the agent with the given payload.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
payload
|
RequestPayload
|
The payload for the agent. |
required |
Returns:
Name | Type | Description |
---|---|---|
dict |
dict
|
The response from the agent. |
Framework
Framework for the agent.
Values
pydantic-ai
: Pydantic AIsmolagents
: Smolagentsllama-index
: LlamaIndexcrewai
: CrewAI
Message
Message object in the conversation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
content
|
str
|
The content of the message. |
required |
role
|
Role
|
The role of the message in the conversation. |
required |
Returns:
Name | Type | Description |
---|---|---|
Message |
An instance of the Message object. |
RequestPayload
Request payload for the agent endpoint.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
messages
|
List[Message]
|
A list of messages in the conversation. |
required |
Returns:
Name | Type | Description |
---|---|---|
RequestPayload |
An instance of the RequestPayload object. |
ResponsePayload
Response payload for the agent endpoint.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
message
|
Message
|
The message to return in the response. |
required |
Returns:
Name | Type | Description |
---|---|---|
ResponsePayload |
An instance of the ResponsePayload object. |
Role
Role of the message in the conversation.
Values
user
: Messages sent by the user.assistant
: Messages sent by the agent.