Skip to main content

kibana-agent

Read-only Kibana/ES CLI for AI agents. Queries Elasticsearch through Kibana's console proxy API.

Install

uv tool install kibana-agent

# or just run:
# uvx kibana-agent

Setup

kibana-agent profile create prd --url https://kibana.example.com --auth 1password \
  --op-username "op://vault/item/username" --op-password "op://vault/item/password" --use

Auth: 1password (Touch ID, cached 24h per profile), keychain (OS keyring — macOS Keychain / Linux Secret Service / Windows Credential Locker via the keyring library; on Linux requires a running Secret Service provider such as gnome-keyring, KWallet, or KeePassXC), plain.

Usage

kibana-agent context                                            # index overview
kibana-agent search 'my-index-*' --last 1h -n 10                 # search logs
kibana-agent count 'my-index-*' -q '{"match":{"level":"ERROR"}}'   # count docs
kibana-agent tail 'my-index-*' -f @timestamp,level,message        # live stream
kibana-agent histogram 'my-index-*' --last 6h --interval 10m     # date histogram
kibana-agent discover 'my-index-*' --kql "level:ERROR"            # Kibana URL

Agent setup

This repo ships an agent skill that teaches an agent how to drive the CLI: which query matches which field type, how to read the hints on stderr, and why an empty result is usually a wrong query rather than missing data.

npx skills add hyzyla/kibana-agent -g     # all projects
npx skills add hyzyla/kibana-agent        # this project only
npx skills update                         # pull later changes

This works with any agent the skills CLI supports — Claude Code, Cursor, Codex, and others. For Claude Code it installs to ~/.claude/skills/ (global) or .claude/skills/ (project), and loads automatically when you ask about Kibana, Elasticsearch, or logs.

To install by hand instead, copy or symlink skills/kibana-agent/ into your agent's skills directory.

Without a skill

Add to your CLAUDE.md (or equivalent system prompt):

Use `kibana-agent` to query Elasticsearch. Start with `kibana-agent context` to
discover indices and fields, then use `kibana-agent search`, `kibana-agent count`,
`kibana-agent histogram` to investigate. Read stderr: the CLI warns when a query
cannot match and explains empty results. Run `kibana-agent agent-help` for the
full reference.

Output is JSON. All operations are read-only.

MCP server

The same operations are also available as an MCP server (kibana-agent mcp) for use with Claude Code, Claude Desktop, Cursor, etc. Profiles and credentials are shared with the CLI.

License

MIT

Metadata

Release files for kibana-agent 0.7.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kibana-agent 0.7.5
File Size Uploaded
kibana_agent-0.7.5.tar.gz 35.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kibana-agent 0.7.5
File Interpreter ABI Platform
kibana_agent-0.7.5-py3-none-any.whl Python 3 none any Details

Total release size: 74.2 kB

Release files / kibana_agent-0.7.5.tar.gz

Download URL kibana_agent-0.7.5.tar.gz
Size 35.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f18e3fd9fd9f487d7a76dd6281cdefa52e063accb18e072940311af7fff2ec10
BLAKE2b-256 checksum
How to use checksums
0d311ca0424e3270f17122c7ed9896ae1bd1b17e091673611b7452e65b0f9286
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / kibana_agent-0.7.5-py3-none-any.whl

Download URL kibana_agent-0.7.5-py3-none-any.whl
Size 38.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
663f988a826e93b68a694dd302e8fc62d39f8e14c3131b7582bfa6bba718b3a2
BLAKE2b-256 checksum
How to use checksums
14665c9ac92445f1fa17c74b12322c3bb23691bdbc9641d74d00072acb79342c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.7.5 This release

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page