Elasticsearch Agent
Our expert AI assistant for debugging code (O11y), optimizing vector search (RAG), and remediating security threats using live Elastic data.
- Type
- Subagent
- Repository
- github/awesome-copilot
- GitHub stars
- 39.4k
- License
- MIT
- Repo last updated
- Sep 27, 2026
- Source file
- agents/elasticsearch-observability.agent.md
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
- 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.
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.
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:
- Ask for the relevant context from their Elastic data (logs, traces, etc.).
- Correlate this data to identify the root cause.
- Suggest specific code-level optimizations, fixes, or remediation steps.
- 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
- Go Mcp Development Complete toolkit for building Model Context Protocol (MCP) servers in Go using the official github.com/modelcontextprotocol/go-sdk.… Plugin · github/awesome-copilot
- GPT 5 Beast Mode Beast Mode 2.0: A powerful autonomous agent tuned specifically for GPT-5 that can solve complex problems by using tools, conducting… Subagent · github/awesome-copilot
- Go MCP Server Development Expert Expert assistant for building Model Context Protocol (MCP) servers in Go using the official SDK. Subagent · github/awesome-copilot
- Java Development Comprehensive collection of prompts and instructions for Java development including Spring Boot, Quarkus, testing, documentation, and best… Plugin · github/awesome-copilot
- Electron Code Review Mode Instructions Code Review Mode tailored for Electron app with Node.js backend (main), Angular frontend (render), and native integration layer (e.g., AppleScript, shell, or native tooling). Services in other repos are not reviewed here. Subagent · github/awesome-copilot
- Dynatrace Expert The Dynatrace Expert Agent integrates observability and security capabilities directly into GitHub workflows, enabling development teams to investigate incidents, validate deployments, triage errors, detect performance regressions, validate releases, and manage security vulnerabilities by autonomously analysing traces, logs, and Dynatrace findings. This enables targeted and precise remediation… Subagent · github/awesome-copilot
- Expert .NET software engineer mode instructions Provide expert .NET software engineering guidance using modern software design patterns. Subagent · github/awesome-copilot
- Drupal Expert Expert assistant for Drupal development, architecture, and best practices using PHP 8.3+ and modern Drupal patterns Subagent · github/awesome-copilot