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

# Introduction

LarAgent brings Laravel-grade productivity to the world of AI agents - combining the speed and structure Laravel developers love with powerful agentic capabilities. Together, Laravel + LarAgent form the most productive stack available for building AI agents today.

It is backed by [Redberry](https://redberry.international/?utm_source=documentation\&utm_medium=documentation_introduction\&utm_campaign=AI+service+campaign), one of only 10 Diamond-tier Laravel partners. This partnership allows LarAgent to scale development and stay open-source - while also giving teams the option to get hands-on help with AI agent implementation.

> Need help building your AI agents? [Talk to us](https://redberry.international/ai-agent-development/?utm_source=documentation\&utm_medium=documentation_introduction\&utm_campaign=AI+service+campaign) about our 5-week PoC sprint for AI agent development.

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Get started with LarAgent in minutes
  </Card>

  <Card title="Core Concepts" icon="code" href="/v1/agents/overview">
    Learn how to create agents and tools
  </Card>

  <Card title="Structured output" icon="screwdriver-wrench" href="/v1/responses/structured-output">
    Learn about structured output
  </Card>

  <Card title="Blog" icon="stars" href="https://blog.laragent.ai">
    Check out our blog for tutorials and updates
  </Card>
</CardGroup>

## What is LarAgent?

What if you can create AI agents just like you create any other Eloquent model?

Why not?! 👇

```bash theme={null}
php artisan make:agent YourAgentName
```

And it looks familiar, isn't it?

```php theme={null}
namespace App\AiAgents;

use LarAgent\Agent;

class YourAgentName extends Agent
{
    protected $model = 'gpt-4';

    protected $history = 'in_memory';

    protected $provider = 'default';

    protected $tools = [];

    public function instructions()
    {
        return "Define your agent's instructions here.";
    }

    public function prompt($message)
    {
        return $message;
    }
}

```

And you can tweak the configs, like `history`

```php theme={null}
// ...
protected $history = \LarAgent\History\CacheChatHistory::class;
// ...
```

Or add `temperature`:

```php theme={null}
// ...
protected $temperature = 0.5;
// ...
```

Oh, and add a new tool:

```php theme={null}
// ...
#[Tool('Get the current weather in a given location')]
public function exampleWeatherTool($location, $unit = 'celsius')
{
    return 'The weather in '.$location.' is '.'20'.' degrees '.$unit;
}
// ...
```

And run it, per user:

```php theme={null}
Use App\AiAgents\YourAgentName;
// ...
YourAgentName::forUser(auth()->user())->respond($message);
```

Or use your custom name for the chat history:

```php theme={null}
Use App\AiAgents\YourAgentName;
// ...
YourAgentName::for("custom_history_name")->respond($message);
```

Let's check the [quickstart](/quickstart) page 👍
