Quick Interaction
Fraus Framework provides an easy way to interact with agents hosted on its backend API at https://api.fraus.ai. Users can interact with agents using GET, POST.
Methods of Interaction
1. GET Method
You can send a message to an agent using a simple GET request.
Example:
curl "https://api.fraus.ai/api/agent/{agentName}/interact?message=Hello!"
Replace
{agentName}
with the name of your agent.Replace
Hello!
with the message you want to send.
Example Request:
curl "https://api.fraus.ai/api/agent/fraus/interact?message=Hello!"
Example Response:
{
"agentName": "fraus",
"response": "Hello! How can I assist you today?"
}
2. POST Method
For more structured interactions, you can use the POST method with a JSON body.
Example:
curl -X POST "https://api.fraus.ai/api/agent/{agentName}/interact" \
-H "Content-Type: application/json" \
-d '{"message": "Hello, fraus?"}'
Replace
{agentName}
with the name of your agent.Modify the
message
field in the JSON body with your query.
Example Request:
Copy
curl -X POST "https://api.fraus.ai/api/agent/fraus/interact" \
-H "Content-Type: application/json" \
-d '{"message": "Tell me the top 10 holders of a token."}'
Example Response:
{
"agentName": "fraus",
"response": "Here are the top 10 holders of the token you requested..."
}
GET vs POST:
Use GET for simple queries.
Use POST for detailed and structured interactions.
Flexible Interactions:
Use these methods for quick interactions, or leverage CLI commands like
npm run interactfraus
for full framework capabilities.
Last updated