Skip to main content
Prerequisites:
  • Python 3.12 or higher
  • Docker (optional, for code sandbox features)

Get started in four steps

1

Install RayAI

pip install rayai
For sandbox support (code execution):
pip install rayai[sandbox]
2

Create a project

rayai init my_project
cd my_project
This generates a project structure with:
  • agents/ - Directory for your agent code
  • pyproject.toml - Project dependencies
  • .env - Environment variables (API keys, etc.)
3

Create an agent

rayai create-agent my_agent --framework langchain
Available frameworks: langchain, pydantic (more coming soon)See the framework guides for framework-specific implementations.This creates agents/my_agent/agent.py with a template you can customize.
4

Serve and test

Start the server:
rayai serve
Test your agent:
curl -X POST http://localhost:8000/agents/my_agent/chat \
  -H "Content-Type: application/json" \
  -d '{
    "data": {
      "messages": [{"role": "user", "content": "Hello!"}]
    }
  }'