> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xorafin.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# How xorafin works

Xorafin is designed to make it easy to build, run, and share AI agents. The platform manages the entire lifecycle of an agent — from creation and configuration to execution and distribution.

Each agent in Xorafin is defined through a structured configuration file and can be executed with custom inputs to generate outputs using large language models.

***

## High-Level Flow

The basic flow of how Xorafin works is simple:
User Input
↓
Xorafin Platform
↓
AI Agent
↓
Model / Tools
↓
Generated Output

1. A user provides input to an agent
2. Xorafin loads the agent configuration
3. The agent processes the request using its defined model and tools
4. The underlying language model generates a response
5. The final output is returned to the user

***

## Agent Definition

Every agent in Xorafin is defined using a configuration file. This file describes how the agent behaves, which model it uses, and what inputs and outputs it expects.

Agents can be defined using:

* **JSON**
* **YAML**
* **TOML**

Example agent definition:

```json theme={null}
{
  "name": "research-agent",
  "description": "Research a topic and generate a summary",
  "model": "gpt-4",
  "input": "topic",
  "output": "summary"
}
```
