AI Agents
Straden includes three AI agents built on the Laravel AI SDK. They work through tools — reading metrics, logs, scripts and code — rather than guessing, and any tool that writes to disk requires your approval first.
Connect a provider
AI configuration is instance-wide and admin only.
- Go to Settings → AI Integrations.
- Connect one or more providers. Keys are encrypted with
APP_KEYand stored in Postgres. To update a provider, leave a secret field blank to keep the current value. - Under Settings → Insights model, choose the provider and model for run insights. You can pick a suggested model or type any model name. Insights can't be generated until this is set.
| Provider | Fields |
|---|---|
| OpenAI, Anthropic, Gemini | API key, optional base URL |
| DeepSeek, Groq, xAI, Mistral, OpenRouter | API key |
| Ollama | URL, optional key |
| OpenAI-compatible | URL, key |
| Azure OpenAI | Key, URL, API version, deployment |
| Amazon Bedrock | Access key ID, secret access key, region or bearer token |
Choosing a chat model
Every chat has a provider / model picker that lists the providers with a key configured. The model list is searchable and includes every text model with tool support from the provider's catalog, with featured models first. Your choice is remembered in your browser.
The catalog ships with Straden in resources/data/ai-models.json. To refresh it from models.dev, run:
BASHphp artisan ai:sync-models
Supported text providers:
| Anthropic | Azure OpenAI | Amazon Bedrock |
| DeepSeek | Google Gemini | Groq |
| Mistral | Ollama (local) | OpenAI |
| OpenAI-compatible | OpenRouter | xAI |
Use Ollama or an OpenAI-compatible endpoint to keep everything on your own infrastructure.
Chatting with agents
- Messages can be up to 2000 characters. Replies stream live as the agent works in the background, so you can leave the page and come back.
- Conversations are saved for each test and script. Open History to switch to an old conversation, or use + to start a new one; the latest one reopens automatically.
- To delete a conversation, hover it in History and press the trash icon. This removes the conversation and all its messages permanently.
- Any tool that changes files pauses for your approval. You can Approve or Reject each one, or use Approve all / Reject all.
Test Agent
Lives on the test page. It plans and creates k6 scripts for the test's target URL.
Workflow:
- Scan — gathers context: the target URL, attached connectors, repositories and existing scripts.
- Plan — proposes scenarios (smoke, load, stress, soak…). Each test type becomes its own script unless you ask to combine them.
- Create — after you approve, writes one script per scenario.
- Validate — runs
k6 inspectplus structural checks and fixes any issues.
Tools: ScanContext, CreateScript, UpdateScript, ValidateScript, Prometheus / database / Redis metric tools, and read-only file tools for every synced repository.
Script Agent
Lives on the script page. It edits and maintains a single script's folder — splitting helpers into modules, adding checks and thresholds, or fixing errors from a previous run.
Tools: ListScriptFiles, ReadScriptFile, WriteScriptFile, DeleteScriptFile, RenameScriptFile*, ValidateScript, ScriptInsights (recent run results for this script).
* Requires your approval in the chat before it runs.
Run Insight Agent
Runs in the background when you request an insight for a finished run. It acts as a performance engineer and returns a structured report:
| Field | Content |
|---|---|
summary | One-paragraph overview |
overall_health | healthy, acceptable or poor |
what_is_slow | The slowest endpoints and why |
key_findings[] | Title, severity (low → critical) and detail |
recommendations[] | Title, expected impact and detail |
script_observations | Whether VUs, duration, thresholds and think time were appropriate |
Tools: RunContext (k6 summary, thresholds, config), RunInfluxMetrics (time-series), ReadRunLog (raw k6 output), read-only script and repository files, plus Prometheus, database and Redis metrics when connectors are attached.
When the report is ready you get a notification; failures are reported the same way.
Tips for better results
- Attach repositories. With source code the agents can trace a slow endpoint to an N+1 query or missing cache.
- Attach observability connectors. Insights backed by CPU, connection pool or Redis metrics are far more specific.
- Be concrete in chat. Endpoints, auth flow, target VUs and acceptable p95 latency all make better scripts.
- Keep lifecycle budgets. Agents set
setupTimeout/teardownTimeoutand batch cleanup requests withhttp.batch()— keep that when editing by hand.