Laminar Agent
An AI ops agent for your deploys. Bring your own OpenAI-compatible LLM key — it reads your logs and deployment status to diagnose failures, answer questions, and alert Slack.
What it is
Laminar Agent fits the bring-your-own-everything story: you already deploy to your own AWS, now you bring your own model too. Point it at any OpenAI-compatible LLM and it works against your project’s deploy state and CloudWatch logs — no data leaves for a third-party SaaS beyond the LLM provider you choose. It runs from the same CLI you already use to deploy.
There are three things it does:
| laminar agent diagnose <stage> [--slack] | Analyze recent logs + deployment status, surface root cause + next steps. Optionally post to Slack. |
| laminar agent ask "<question>" [--stage S] | Q&A over your project’s deploy state and logs. |
| laminar agent watch <stage> [--slack] | Poll for failures and alert (e.g. to Slack) when something breaks. |
Bring your own key
The agent talks to any OpenAI-compatible endpoint — OpenAI itself, OpenRouter, or a local model server (Ollama, vLLM, LM Studio). Configure it with environment variables:
export LAMINAR_AGENT_API_KEY=sk-... # your provider key
export LAMINAR_AGENT_BASE_URL=https://api.openai.com/v1 # default; any OpenAI-compatible provider
export LAMINAR_AGENT_MODEL=gpt-4o-mini # any model the provider exposesLAMINAR_AGENT_BASE_URL defaults to https://api.openai.com/v1. Override it to use another provider:
# OpenRouter
export LAMINAR_AGENT_BASE_URL=https://openrouter.ai/api/v1
export LAMINAR_AGENT_MODEL=anthropic/claude-3.5-sonnet
# Local model (Ollama)
export LAMINAR_AGENT_BASE_URL=http://localhost:11434/v1
export LAMINAR_AGENT_MODEL=llama3.1You can also configure it per-project with an agent: block in laminar.yml (env vars take precedence so you can keep keys out of source control):
agent:
base_url: https://api.openai.com/v1
model: gpt-4o-mini
# api_key is best left in the env (LAMINAR_AGENT_API_KEY)
slack_webhook_url: ${SLACK_WEBHOOK_URL}Diagnose a failed deploy
Pass a stage and the agent pulls the latest deployment status plus recent logs, then summarizes the root cause and what to do next.
$ laminar agent diagnose production
› Root cause
Lambda init timeout: DB connection to rds-prod blocked — the function's
security group has no egress to the database subnet.
› Next step
Add an egress rule on the SG (or attach the RDS SG) and redeploy.Add --slack to also post the summary to your Slack channel.
Ask questions
Ask anything about your deploy state and logs in plain English. Scope it to a stage with --stage.
laminar agent ask "why did production roll back last night?"
laminar agent ask "what's the cold-start p95 right now?" --stage stagingWatch for failures
Run watch to poll a stage for failures and get alerted the moment something breaks — useful right after a deploy or in a long-running session.
laminar agent watch production --slackSlack setup
The --slack flag posts to Slack via an incoming webhook. Create one for the channel you want, then expose it as SLACK_WEBHOOK_URL (or set slack_webhook_url in the agent: block).
export SLACK_WEBHOOK_URL=https://hooks.slack.com/services/T000/B000/XXXX
laminar agent diagnose production --slack # → posts the summary to that channelWithout --slack the agent only prints to your terminal — Slack is fully opt-in.
Telegram setup
Prefer Telegram? Bring your own bot and the agent will send diagnoses straight to a chat you control — no shared third-party app, the bot is yours. It works alongside Slack and any other notification channel you’ve configured.
First, create a bot: message @BotFather on Telegram, run /newbot, and it will hand you a bot_token. Then find your chat_id: send your new bot any message, then open https://api.telegram.org/bot<bot_token>/getUpdates and read the chat.id from the response.
Add both to the agent: block of laminar.yml (or set the TELEGRAM_BOT_TOKEN / TELEGRAM_CHAT_ID env vars, which take precedence):
agent:
base_url: https://api.openai.com/v1
model: gpt-4o-mini
telegram_bot_token: ${TELEGRAM_BOT_TOKEN} # from @BotFather
telegram_chat_id: ${TELEGRAM_CHAT_ID} # the chat to post diagnoses toCloud users don’t edit laminar.yml — set the bot token and chat ID in the agent settings of your dashboard, where they’re stored encrypted.