Logo Sre Agent

Sre Agent

Tổ chứcPhổ biến
omnara-ai
sre-agent

Deploy or update the SRE Agent on Omnara, a production investigator that diagnoses issues across AWS and source code and reports the likely cause with evidence. Use when the user asks to deploy, set up, update, or remove the SRE agent.

Tổng quan

Nhà phát hànhomnara-ai
Kho mãomnara
Tên kỹ năngsre-agent
Sao
2.9K
Bản fork
235
Tệp đi kèm
1
Giấy phépApache-2.0
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 1 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được omnara-ai công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Sre Agent trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/omnara-ai/omnara/tree/main/examples/sre-agent
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/omnara-ai/omnara.git /tmp/omnara
mkdir -p .claude/skills
cp -r /tmp/omnara/examples/sre-agent .claude/skills/sre-agent
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Sre Agent trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Sre Agent ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Sre Agent với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Deploy the SRE Agent

You are setting up an Omnara agent for the user from agent.yaml in this folder. The goal: an agent profile the user has watched run once, reachable wherever they want it (their own app, Slack, Discord, or the Omnara console), and optionally running a daily health check.

The steps below are the usual path and have the exact commands. Skip anything that's already done (for example, the secrets and profile exist and the user only wants to add code access), follow the user's lead if they want a different order, and narrate briefly as you go.

  • Start from agent.yaml as written. If the user wants something different (the instruction, data sources, model, or how they reach the agent), change it and tell them what you changed.
  • If a command fails, read the error and fix it; npx omnara <command> --help and docs.omnara.com have the details. If you're stuck, show the user the error.

The commands use the Omnara CLI (npx omnara) because its login handles auth in one step; add --json when you need to read IDs from the output. They're a reference, not a requirement: the Omnara MCP tools, the REST API, or the SDK work too, and the flags map directly to API fields. What matters is the result: secrets for the data sources, a profile from the filled-in agent.yaml, and whatever the user picks in steps 8 and 9. Slack and Discord setup is simplest with the CLI.

1. Connect to Omnara

  1. Run npx omnara whoami. If it reports that you aren't logged in, run npx omnara login in an interactive terminal, share the approval link it prints, and wait until the user approves.

  2. Pick the org and project. npx omnara whoami --json lists the user's orgs, and npx omnara projects list --org <org-id> --json lists an org's projects.

    • If there's only one org and one project, use them.
    • If there are several of either, ask the user which to use. Suggest the current defaults from npx omnara config if they're set, otherwise the project named Default.

    Save the choice with npx omnara config --org <org-id> --project <project-id>.

Remember the project ID; later steps need it.

2. Describe the system

Ask the user about the production system the agent will investigate:

  • COMPANY_NAME: the company or product name, for example Acme.
  • What it is and its main services, and how they run on AWS (ECS, Lambda, EKS, EC2), plus where logs live. Write this as SYSTEM_CONTEXT: two to four sentences on a single line, for example Acme is a checkout API for online stores. It runs an API and a worker on ECS Fargate behind an ALB, with RDS Postgres and SQS, primarily on AWS. Logs go to CloudWatch Logs under /ecs/acme-*. If the user has AWS CLI access and wants you to, you can draft it from aws ecs list-services, aws lambda list-functions, and similar read-only calls.
  • AWS_REGION: the region production runs in, for example us-west-2.
  • Whether they want the agent to read their code (step 4). It's optional and makes answers sharper.

Show SYSTEM_CONTEXT to the user and adjust until they're happy. If they can say more about their logs or metrics (for example, every request writes one structured log line with its errors and database queries), add a short section for each under # Available Data in step 6, like the ## AWS one.

3. Create read-only AWS credentials

The agent reaches AWS through the AWS MCP Server, which signs each call with these credentials, so their IAM policy is what keeps the agent read-only. Use a dedicated IAM user with only the AWS managed policies ViewOnlyAccess and CloudWatchReadOnlyAccess. They cover describing resources, metrics, alarms, and reading logs, but not S3 object contents or secret values.

Skip this step if the secret already exists: npx omnara secrets list --owner-kind project --owner-project-id <project-id> --name sre-agent-aws --json. If it does, ask whether to reuse it and note its id.

  1. Create the IAM user, either way:

    • You do it, if the user has the AWS CLI signed in to the production account with IAM permissions and says go ahead. This writes the keys straight to .env without showing them:

      sh
      aws iam create-user --user-name omnara-sre-agent
      aws iam attach-user-policy --user-name omnara-sre-agent \
        --policy-arn arn:aws:iam::aws:policy/job-function/ViewOnlyAccess
      aws iam attach-user-policy --user-name omnara-sre-agent \
        --policy-arn arn:aws:iam::aws:policy/CloudWatchReadOnlyAccess
      aws iam create-access-key --user-name omnara-sre-agent \
        --query 'AccessKey.[AccessKeyId,SecretAccessKey]' --output text \
        | awk '{print "AGENT_AWS_ACCESS_KEY_ID=" $1 "\nAGENT_AWS_SECRET_ACCESS_KEY=" $2}' >> .env
    • The user does it in the IAM console: Users → Create user → Attach policies directly (ViewOnlyAccess, CloudWatchReadOnlyAccess), then on the user's Security credentials tab, Create access key. Ask them to add the keys to a .env file in the current directory and tell you when it's saved (pasting them in the chat also works):

      sh
      AGENT_AWS_ACCESS_KEY_ID=...
      AGENT_AWS_SECRET_ACCESS_KEY=...
  2. Create the secret:

    sh
    set -a && . ./.env && set +a
    npx omnara secrets create --owner-kind project --owner-project-id <project-id> \
      --name sre-agent-aws --material-kind aws_credentials \
      --material-access-key-id "$AGENT_AWS_ACCESS_KEY_ID" \
      --material-secret-access-key "$AGENT_AWS_SECRET_ACCESS_KEY" --json

    Note the id (sec_…) as AWS_SECRET_ID. If the user prefers a role, add --material-role-arn (and --material-external-id if the role's trust policy requires one); Omnara assumes it with these keys.

4. Let the agent read the code (optional)

Recommended: with the repository cloned on a machine, the agent can trace an error to the code behind it and cite the exact lines. Ask which repository (GITHUB_REPO, as owner/name). One repository is supported as written.

  • Public repository: nothing to store.

  • Private repository: the user creates a fine-grained token with read-only Contents access to that repository and adds it to .env as AGENT_GITHUB_TOKEN=.... Check for an existing secret named sre-agent-github as in step 3, otherwise create it:

    sh
    set -a && . ./.env && set +a
    npx omnara secrets create --owner-kind project --owner-project-id <project-id> \
      --name sre-agent-github --material-kind generic \
      --material-value "$AGENT_GITHUB_TOKEN" --json

    Note the id as GITHUB_TOKEN_SECRET_ID.

5. Pick the model (and machine pool)

  1. npx omnara grant models list --json: each item has model.provider_config and model.name. Ask the user which model to use. Suggest openai/gpt-6-astra on omnara-openrouter if it's granted (the instruction was tested with it); otherwise suggest the strongest reasoning model on the list. Name a couple of alternatives rather than the whole list, and show everything if they ask. The choice gives MODEL_PROVIDER_CONFIG and MODEL_NAME.
  2. Only if the agent reads the code (step 4): npx omnara grant pools list --json; each grant's machine_pool.name is a candidate MACHINE_POOL. Use the only one, or ask if there are several. If there are none, tell the user the project needs a machine pool for code access, and continue without it if they prefer.

6. Create the agent

  1. Copy agent.yaml from this folder to ./sre-agent.yaml in the current directory. If this folder isn't available locally, download https://raw.githubusercontent.com/omnara-ai/omnara/main/examples/sre-agent/agent.yaml instead.

  2. Remove what the user isn't using:

    • No code access: delete the ## Source Code section of the instruction, machine_sources, and the tools: block at the end.
    • Public repository: delete the secret_env_overlay block.
  3. Replace every remaining placeholder:

    PlaceholderValue
    {{COMPANY_NAME}}from step 2
    {{SYSTEM_CONTEXT}}from step 2
    {{AWS_REGION}}from step 2
    {{AWS_SECRET_ID}}the sec_… ID from step 3
    {{GITHUB_REPO}}from step 4
    {{GITHUB_TOKEN_SECRET_ID}}from step 4
    {{MODEL_PROVIDER_CONFIG}}from step 5
    {{MODEL_NAME}}from step 5
    {{MACHINE_POOL}}from step 5

    Then confirm nothing is left: grep -n '{{' sre-agent.yaml must print nothing.

  4. Check for an existing profile: npx omnara profiles list --name sre-agent --json.

    • None: npx omnara profiles create --name sre-agent --file ./sre-agent.yaml --json
    • Exists: npx omnara profiles update <agent-profile-id> --file ./sre-agent.yaml --json

    Note the profile's id and current_config_id from the output.

7. Run a first health check

sh
npx omnara agents launch --profile <agent-profile-id> --config <current-config-id> \
  --message "Run a production health check." --json

Give the user the link to watch it work: https://app.omnara.com/projects/<project-id>/agents/<agent-id>. It takes a few minutes, longer on the first run while the machine clones the repository. The user can reply in the console with a real question, such as a recent alert or "why was checkout slow yesterday at 3pm?". If the agent reports an AWS call as denied, that's the read-only policy working; only widen it if the user wants that data.

8. Choose where to use it

Ask where the user wants to talk to the agent, offering these in this order. Any combination is fine.

Their own app, existing or new (recommended). Put the agent where the user's team already works: inside their existing product or internal tool, or, if there's no natural home, a small UI built for it. Both are the same integration: launch agents from the profile and stream their replies with the TypeScript SDK (@omnara/sdk) or the REST API; see docs.omnara.com. Anything else that can call the API can start the agent the same way; for example, their alerting webhook can start an investigation with the alert text as the message. The app needs an org API key: the user creates one on the dashboard's API Tokens page (Organization tab → New token), then grants it a role on this project from the key's detail panel. Help them wire it in, or build the UI with them.

Slack. The bot answers wherever it's mentioned, and thread replies become instructions to the agent. An incidents or alerts channel works well.

If npx omnara integrations list --json already has an integration named sre-agent-slack from an earlier run of this skill, reuse it whatever its state, since names are unique in a project. If npx omnara integrations get <integration-id> --json doesn't list this profile under settings.launcher.profiles, add it with npx omnara integrations profiles <integration-id> --profile-ids <agent-profile-id>; the flag replaces the list, so repeat each profile already there. Then, if its state is active, skip to its last step. If it's disconnected, setup didn't finish: skip step 2, and redo step 1 only if the token in .env has expired.

  1. The user creates an app configuration token at api.slack.com/apps under Your App Configuration Tokens → Generate Token. It expires after about 12 hours. Have the user add it to .env as SLACK_APP_CONFIG_TOKEN=....

  2. Create the integration with this profile in its launcher, so a mention starts this agent, and note the itg_… ID it returns:

    sh
    npx omnara integrations create --name sre-agent-slack \
      --integration-kind slack_thread \
      --settings '{"launcher":{"profiles":["<agent-profile-id>"]}}' --json

    The name is permanent and names the agent's Slack tools (int__sre-agent-slack__post_message).

  3. Create the Slack app and connect it:

    sh
    set -a && . ./.env && set +a
    npx omnara integrations slack <integration-id> --app-name "SRE Agent" \
      --app-configuration-token "$SLACK_APP_CONFIG_TOKEN"

    Ask before choosing a different app name; it's how the team mentions the bot. It opens a Slack authorization page that the user approves before it expires.

  4. Tell the user to invite the bot to a channel (/invite @SRE Agent) and mention it: "@SRE Agent why are checkout requests failing?"

Discord. Works like Slack: the bot answers in a new thread wherever it's mentioned in a server channel, and replies in the thread go to the same agent. It doesn't answer direct messages.

If an integration named sre-agent-discord already exists, reuse it the same way: add this profile if it's missing. If it's active, skip to step 5; Omnara can't tell whether steps 5 and 6 were done in Discord, so check them with the user. If it's disconnected, skip step 3 and do the steps that weren't done, passing the current setup_revision from npx omnara integrations get <integration-id> --json in step 4.

  1. The user creates an application named "SRE Agent" in the Discord Developer Portal; ask before choosing a different name, since it's how the team mentions the bot. They copy the Application ID and Public Key from General Information. Under Bot, they select Reset Token to copy the bot token, turn on Message Content Intent, and turn off Public Bot so only they can add it (if Discord refuses, first set Installation → Install Link to None). Have the user add the values to .env:

    sh
    DISCORD_APPLICATION_ID=...
    DISCORD_PUBLIC_KEY=...
    DISCORD_BOT_TOKEN=...
  2. Store the bot token and note the sec_… ID. If a secret named sre-agent-discord-bot-token already exists (npx omnara secrets list --owner-kind project --owner-project-id <project-id> --name sre-agent-discord-bot-token --json), reuse its ID; if the user has reset the token since, have them paste the new one into it on the dashboard's Secrets page (the ID stays the same). Otherwise:

    sh
    set -a && . ./.env && set +a
    npx omnara secrets create --owner-kind project --owner-project-id <project-id> \
      --name sre-agent-discord-bot-token --material-kind generic \
      --material-value "$DISCORD_BOT_TOKEN" --json
  3. Create the integration with this profile in its launcher, and note the itg_… ID and setup_revision it returns:

    sh
    npx omnara integrations create --name sre-agent-discord \
      --integration-kind discord_thread \
      --settings '{"launcher":{"profiles":["<agent-profile-id>"]}}' --json

    The name is permanent and names the agent's Discord tools (int__sre-agent-discord__post_message).

  4. Connect the bot. Omnara checks the token and finds the bot's user:

    sh
    set -a && . ./.env && set +a
    npx omnara integrations configure <integration-id> \
      --expected-setup-revision <setup-revision> \
      --provider-tenant-id "$DISCORD_APPLICATION_ID" \
      --credential-secret-id <secret-id> \
      --provider-config "{\"public_key\":\"$DISCORD_PUBLIC_KEY\"}" --json
  5. Under General Information, the user sets Interactions Endpoint URL to https://app.omnara.com/api/integrations/discord/<application-id>/interactions and saves; the buttons on the bot's questions need it. Discord checks the URL when it's saved, so this has to come after step 4.

  6. The user adds the bot to their server by opening this link, which asks only for the permissions the bot needs: https://discord.com/oauth2/authorize?client_id=<application-id>&scope=bot&permissions=309237746752&integration_type=0. Then they mention it in a channel: "@SRE Agent why are checkout requests failing?"

Omnara console. Already done: every agent launched from the profile shows up in the console.

9. Run a daily health check (optional)

A schedule works with any of the above. Ask whether the user wants a daily health check, and for the time and timezone (default: weekdays at 9am in the user's timezone). Set --cron and --timezone from their answer:

sh
npx omnara crons create --name sre-agent-daily \
  --target-type profile --target-agent-profile-id <agent-profile-id> \
  --cron '0 9 * * 1-5' --timezone America/Los_Angeles \
  --message-template 'Run the daily production health check.' --json

If npx omnara crons list --name sre-agent-daily --json already shows a trigger, change it with npx omnara crons update <cron-trigger-id> (same flags) instead of creating a second one.

Each firing launches a fresh agent from the profile. It shows up in the console, and the user's app can pick it up through the SDK or API. To get each check in a Slack or Discord channel, mention the bot in that channel once, then create the trigger with --target-type agent --target-agent-id <agent-id> (the agent ID from that conversation's console URL), so every check posts to that thread.

10. Wrap up

Summarize what you created: the secrets, the IAM user if you made it, the profile, and the Slack or Discord integration or cron trigger if any. Remind the user to delete .env or move the keys somewhere safe. Then tell them:

  • Add a data source or change anything else: ask a coding agent with this skill. It reuses the secrets and updates the profile in place.
  • Remove it: delete the cron trigger (npx omnara crons delete <id>), delete the Slack and Discord integrations, if any (npx omnara integrations delete <integration-id>), or, if other agents share it, rerun npx omnara integrations profiles with only their profiles. Then run npx omnara profiles delete <agent-profile-id>, delete each secret with npx omnara secrets delete <secret-id>, and delete the omnara-sre-agent IAM user's access key (or the user) in AWS. With Discord, also delete the application in the Discord Developer Portal.

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Sre Agent làm được gì?

Deploy or update the SRE Agent on Omnara, a production investigator that diagnoses issues across AWS and source code and reports the likely cause with evidence. Use when the user asks to deploy, set up, update, or remove the SRE agent.

Vì sao nên dùng Sre Agent trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Sre Agent là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Sre Agent trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/omnara-ai/omnara/tree/main/examples/sre-agent. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Sre Agent?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Sre Agent với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Sre Agent với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Sre Agent có miễn phí không?

Có. Kỹ năng này được omnara-ai phát hành trên GitHub theo giấy phép Apache-2.0. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇