Skip to content

API Overview

Carrot Agent provides a RESTful API for interacting with the agent programmatically.

Base URL

http://localhost:8080/api

Authentication

Currently, the API does not require authentication. For production use, consider adding an API gateway or reverse proxy with authentication.

Endpoints

MethodEndpointDescription
GET/healthHealth check
POST/chatSend message and get response
GET/skillsList all skills
POST/skillsCreate a new skill
GET/memoryList memories
POST/memoryAdd memory
GET/session/List sessions
GET/session/{id}Get session details
DELETE/session/{id}Delete session
GET/statsGet agent statistics

Response Format

All responses are in JSON format:

json
{
  "status": "success",
  "data": {...}
}

Error responses:

json
{
  "error": "Error message",
  "code": 400
}

Rate Limiting

Currently no rate limiting is implemented. For production deployments, add rate limiting at the reverse proxy level.

Examples

See individual endpoint documentation for detailed examples:

Released under the MIT License.