Sponsor Suno AI Music arrow_forward
Subagent

Elasticsearch Agent

Our expert AI assistant for debugging code (O11y), optimizing vector search (RAG), and remediating security threats using live Elastic data.

Type
Subagent
GitHub stars
39.4k
License
MIT
Repo last updated
Sep 27, 2026

What Elasticsearch Agent is

Elasticsearch Agent is a subagent published in the github/awesome-copilot repository on GitHub, which has about 39.4k stars. The repository describes itself as: “Community-contributed instructions, agents, skills, and configurations to help you make the most of GitHub Copilot.”

A subagent is a specialist assistant that Claude can hand part of a task to. It is a markdown file whose frontmatter sets a name, a description that tells Claude when to delegate, and optionally the tools and model it may use; the body becomes the subagent's own system prompt.

Because a subagent works in its own context, it keeps the main conversation focused: Claude can send a narrow job, such as a review or a specialised analysis, to Elasticsearch Agent and get back a compact result.

How to install Elasticsearch Agent

Claude Code

  1. Download elasticsearch-observability.agent.md from the repository.
  2. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
  3. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Claude Cowork

  1. Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent.
  2. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.

Inside the source file

An excerpt from agents/elasticsearch-observability.agent.md, shared under the repository's MIT license. Read the full file on GitHub.

You are the Elastic AI Assistant, a generative AI agent built on the Elasticsearch Relevance Engine (ESRE).

Your primary expertise is in helping developers, SREs, and security analysts write and optimize code by leveraging the real-time and historical data stored in Elastic. This includes:

  • Observability: Logs, metrics, APM traces.
  • Security: SIEM alerts, endpoint data.
  • Search & Vector: Full-text search, semantic vector search, and hybrid RAG implementations.

You are an expert in ES|QL (Elasticsearch Query Language) and can both generate and optimize ES|QL queries. When a developer provides you with an error, a code snippet, or a performance problem, your goal is to:

  1. Ask for the relevant context from their Elastic data (logs, traces, etc.).
  2. Correlate this data to identify the root cause.
  3. Suggest specific code-level optimizations, fixes, or remediation steps.
  4. Provide optimized queries or index/mapping suggestions for performance tuning, especially for vector search.

User

Observability & Code-Level Debugging

Prompt

My checkout-service (in Java) is throwing HTTP 503 errors. Correlate its logs, metrics (CPU, memory), and APM traces to find the root cause.

Prompt

I'm seeing javax.persistence.OptimisticLockException in my Spring Boot service logs. Analyze the traces for the request POST /api/v1/update_item and suggest a code change (e.g., in Java) to handle this concurrency issue.

Prompt

An 'OOMKilled' event was detected on my 'payment-processor' pod. Analyze the associated JVM metrics (heap, GC) and logs from that container, then generate a report on the potential memory leak and suggest remediation steps.

Prompt

Generate an ES|QL query to find the P95 latency for all traces tagged with http.method: "POST" and service.name: "api-gateway" that also have an error.

Search, Vector & Performance Optimization

Prompt

I have a slow ES|QL query: [...query...]. Analyze it and suggest a rewrite or a new index mapping for my 'production-logs' index to improve its performance.

Prompt

I am building a RAG application. Show me the best way to create an Elasticsearch index mapping for storing 768-dim embedding vectors using HNSW for efficient kNN search.

Prompt

Show me the Python code to perform a hybrid search on my 'doc-index'. It should combine a BM25 full-text search for query_text with a kNN vector search for query_vector, and use RRF to combine the scores.

Prompt

My vector search recall is low. Based on my index mapping, what HNSW parameters (like m and ef_construction) should I tune, and what are the trade-offs?

Security & Remediation

Prompt

Elastic Security generated an alert: "Anomalous Network Activity Detected" for user_id: 'alice'. Summarize the associated logs and endpoint data. Is this a false positive or a real threat, and what are the recommended remediation steps?

Before you install

  • Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
  • Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
  • Try it in a test project or a copy of your files before pointing it at real work.
  • Pin the version you tested, and review changes before updating.
  • Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.

FAQ

What is Elasticsearch Agent?

Elasticsearch Agent is a subagent for Claude Code and Claude Cowork from the github/awesome-copilot repository on GitHub. Our expert AI assistant for debugging code (O11y), optimizing vector search (RAG), and remediating security threats using live Elastic data.

How do I install Elasticsearch Agent in Claude Code?

Download elasticsearch-observability.agent.md from the repository. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Can I use Elasticsearch Agent in Claude Cowork?

Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

Is Elasticsearch Agent safe to install?

It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.

Similar resources

Browse all skills, subagents, and plugins →

Listing data comes from the public GitHub repository and was last checked in September 2026. Excerpts are © their authors and shared under MIT. This directory is independent and not affiliated with Anthropic or the resource's authors.