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.

  1. Go to Settings → AI Integrations.
  2. Connect one or more providers. Keys are encrypted with APP_KEY and stored in Postgres. To update a provider, leave a secret field blank to keep the current value.
  3. 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.
ProviderFields
OpenAI, Anthropic, GeminiAPI key, optional base URL
DeepSeek, Groq, xAI, Mistral, OpenRouterAPI key
OllamaURL, optional key
OpenAI-compatibleURL, key
Azure OpenAIKey, URL, API version, deployment
Amazon BedrockAccess 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:

BASH
php artisan ai:sync-models

Supported text providers:

AnthropicAzure OpenAIAmazon Bedrock
DeepSeekGoogle GeminiGroq
MistralOllama (local)OpenAI
OpenAI-compatibleOpenRouterxAI

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:

  1. Scan — gathers context: the target URL, attached connectors, repositories and existing scripts.
  2. Plan — proposes scenarios (smoke, load, stress, soak…). Each test type becomes its own script unless you ask to combine them.
  3. Create — after you approve, writes one script per scenario.
  4. Validate — runs k6 inspect plus 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:

FieldContent
summaryOne-paragraph overview
overall_healthhealthy, acceptable or poor
what_is_slowThe slowest endpoints and why
key_findings[]Title, severity (low → critical) and detail
recommendations[]Title, expected impact and detail
script_observationsWhether 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 / teardownTimeout and batch cleanup requests with http.batch() — keep that when editing by hand.