
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
seraph-agent
Advanced tools
An extremely lightweight, SRE autonomous AI agent for seamless integration with common observability tasks.
Seraph is an extremely lightweight, SRE autonomous AI agent designed for seamless integration with common observability tasks.
It is highly scalable, capable of independent asynchronous analysis, and possesses the ability to integrate with other AI agents for automated mitigation and code modifications.
Seraph now comes with a built-in Model Context Protocol (MCP) server that provides essential SRE tools out-of-the-box. When you start the Seraph agent, it automatically starts a second server on the next available port (e.g., 8081) that provides these tools to the agent for its investigations.
Git: The agent can analyze the Git repository where your application's source code is located. It can read commit logs to correlate a production error with a recent code change.
Prometheus: The agent can query your Prometheus instance to investigate metrics, alerts, targets, and rules. This enables correlation of log anomalies with system metrics and infrastructure health.
To use the built-in tools, configure them in your seraph.config.json:
{
"builtInMcpServer": {
"gitRepoPath": "/path/to/your/local/git/repo",
"prometheusUrl": "http://localhost:9090"
}
}
With this configuration, the agent will automatically have access to:
git_log and git_clone tools for code analysisprometheus_query for custom PromQL queriesprometheus_metrics to explore available metricsprometheus_alerts to check current alert statusprometheus_targets to verify scrape target healthprometheus_rules to inspect alerting and recording rulesSeraph now supports the Model Context Protocol (MCP), allowing it to dynamically connect to and use external tools from any MCP-compliant server. This "plug and play" functionality makes the agent highly extensible and adaptable to new tasks without requiring any code changes.
This architecture allows you to easily expand the agent's capabilities by simply pointing it to a new MCP server.
There are two ways to connect Seraph to MCP servers:
Custom Server: You can connect to any MCP-compliant server using the --mcp-server-url flag. This is useful for development or for connecting to private, custom tool servers.
seraph chat "What's the weather in London?" --mcp-server-url https://some-weather-mcp-server.com
Built-in Toolsets: Seraph comes with a curated list of high-quality, pre-configured MCP servers that you can easily use with the --tools flag.
seraph chat "What is the current time in Tokyo?" --tools time
To see the list of all available built-in toolsets, run:
seraph tools list
Security Warning: Only connect to MCP servers that you trust. A malicious MCP server could provide tools that could harm your system or exfiltrate data.
Seraph's core feature is its ability to autonomously analyze logs and perform root cause analysis. The process involves two stages:
Triage: When a log is ingested, it is passed to a triage worker. This worker makes a quick decision on whether the log requires further attention. The model responds with a decision ("alert" or "ok") and a brief reason.
Investigation: If the decision is "alert", the log is passed to an investigation worker. This worker uses a ReAct-style loop to conduct a detailed root cause analysis. It can use a variety of tools (like the built-in Git tool) to gather more context.
Reporting: The findings of the investigation, including the root cause analysis, impact assessment, and suggested remediation steps, are saved to a local SQLite database.
This multi-stage process allows Seraph to quickly filter through a high volume of logs and perform deep analysis only when necessary, making it both efficient and powerful.
Seraph is distributed as an npm package. You can install it globally to use the CLI anywhere on your system.
npm install -g seraph-agent
Note on Native Addons: The agent uses the sqlite3 package to store investigation reports, which is a native Node.js addon. If you encounter installation issues, you may need to install the necessary build tools for your operating system. Please see the "Troubleshooting" section for more details.
Alternatively, you can add it as a dependency to your project:
npm install seraph-agent
Seraph is configured via a seraph.config.json file in your project root. Environment variables can also be used and will override settings in the file.
For a detailed explanation of all available options, please see the well-commented example configuration file:
config.example.json
Seraph supports optional Redis-based semantic caching to reduce LLM API costs:
{
"llmCache": {
"redis": {
"host": "localhost",
"port": 6379,
"password": "secret",
"keyPrefix": "seraph:"
},
"similarityThreshold": 0.85,
"ttlSeconds": 3600
}
}
Benefits:
See CACHE.md for detailed caching documentation.
The primary LLM API key is configured via environment variables.
GEMINI_API_KEY: Your Gemini API key.ANTHROPIC_API_KEY: Your Anthropic API key.OPENAI_API_KEY: Your OpenAI API key.sqlite3 Native Addon Installation IssuesThe agent uses the sqlite3 package to store investigation reports, which is a native Node.js addon. If you encounter errors during npm install related to node-gyp or sqlite3, it likely means you are missing the necessary build tools for your operating system.
npm install --global windows-build-tools
xcode-select --installsudo apt-get install -y build-essential
For more detailed instructions, please refer to the node-gyp installation guide.
Seraph is designed to be a component in a larger observability and automation ecosystem. It supports integrations with log forwarders, LLM providers, monitoring tools, and alert managers.
For a detailed guide on integrating with tools like Fluentd, Vector, and Alertmanager, or for information on inter-agent communication, please see the Integration Guide.
You can choose from the following LLM providers:
gemini (default)anthropicopenaiYou can also specify a model for the selected provider. If no model is specified, a default will be used.
Configure your API Key: Set the environment variable for your chosen provider:
# For Gemini
export GEMINI_API_KEY="YOUR_GEMINI_API_KEY"
# For Anthropic
export ANTHROPIC_API_KEY="YOUR_ANTHROPIC_API_KEY"
# For OpenAI
export OPENAI_API_KEY="YOUR_OPENAI_API_KEY"
Alternatively, you can create a seraph.config.json file as described above.
Start the agent: If you installed it globally, you can run:
seraph start
This will start the log ingestion server on port 8080 and spin up 4 analysis workers.
The Seraph agent features a superior CLI experience designed to address common pain points found in other AI SRE tools:
seraph setup - Interactive setup wizard with auto-detectionseraph start - Start the AI SRE agentseraph status --verbose - Detailed agent status with health checksseraph doctor - Comprehensive diagnostics and troubleshootingseraph startStarts the agent and the log ingestion server.
Options:
--mcp-server-url <url>: Connect to an MCP server to enable dynamic tool usage--tools <names>: Comma-separated list of built-in toolsets to useseraph status [--verbose]Check agent status with beautiful, responsive output.
Features:
seraph stopGracefully stops the agent and all workers.
seraph doctorComprehensive diagnostics covering:
seraph setup [--guided]Interactive setup wizard featuring:
seraph reports list [options]List investigation reports with flexible formatting.
Options:
--format table|json|markdown - Output format (default: table)--limit <number> - Maximum number of results (default: 50)--filter <status> - Filter by status: all, resolved, open, acknowledgedseraph reports view <incidentId> [options]View detailed investigation reports.
Options:
--format json|markdown|raw - Output format (default: markdown)Features:
seraph tools list [--format table|json|markdown]List available built-in toolsets with descriptions and URLs.
seraph chat <message>Chat with the Seraph agent. Requires a configured LLM provider and API key.
Options:
-c, --context: Include the last 100 logs as context for the chat. This allows you to ask questions like "summarize the recent errors".--mcp-server-url <url>: Connect to a custom MCP server to use its tools.--tools <names>: A comma-separated list of built-in toolsets to use (e.g., "fetch,git").seraph tools listLists all available built-in toolsets.
You can also run the Seraph agent in a Docker container for easy deployment.
Build the Docker image:
docker build -t seraph-agent .
Run the Docker container:
You can configure the agent inside the container using environment variables.
Example for Gemini:
docker run -d -p 8080:8080 \
-e GEMINI_API_KEY="YOUR_GEMINI_API_KEY" \
--name seraph-agent seraph-agent
Example for Anthropic:
docker run -d -p 8080:8080 \
-e ANTHROPIC_API_KEY="YOUR_ANTHROPIC_API_KEY" \
--name seraph-agent seraph-agent
Alternatively, you can mount a seraph.config.json file to configure the container, which is useful if you want to specify a provider and model.
docker run -d -p 8080:8080 \
-v $(pwd)/seraph.config.json:/usr/src/app/seraph.config.json \
--name seraph-agent seraph-agent
Interact with the agent:
You can then interact with the agent using the docker exec command:
docker exec -it seraph-agent node dist/index.js status
docker exec -it seraph-agent node dist/index.js chat "hello"
docker exec -it seraph-agent node dist/index.js chat --context "any recent errors?"
Check the logs or stop the agent:
docker logs -f seraph-agent
docker stop seraph-agent
The Seraph agent exposes a /metrics endpoint for Prometheus scraping.
Example prometheus.yml scrape configuration:
scrape_configs:
- job_name: 'seraph-agent'
static_configs:
- targets: ['localhost:8080']
For more detailed documentation on deployment and integrations, please see the docs directory.
A Helm chart is provided for easy deployment to Kubernetes with optional Redis caching.
Prerequisites:
helm command-line tool installed.Configure API Keys:
The Helm chart uses environment variables for API keys. You can set these in the helm/values.yaml file or by using the --set flag during installation.
Example helm/values.yaml modification:
env:
GEMINI_API_KEY: "YOUR_GEMINI_API_KEY"
Install the Chart: From the root of the project, run the following command:
# Basic installation
helm install my-seraph-release ./helm \
--set env.GEMINI_API_KEY="YOUR_GEMINI_API_KEY"
# With Redis caching enabled
helm install my-seraph-release ./helm \
--set env.GEMINI_API_KEY="YOUR_GEMINI_API_KEY" \
--set redis.enabled=true
This will deploy the Seraph agent to your Kubernetes cluster with optional Redis for LLM response caching.
Accessing the Agent:
By default, the service is of type ClusterIP. To access it from your local machine, you can use kubectl port-forward:
kubectl port-forward svc/my-seraph-release-seraph 8080:8080
You can then send logs to http://localhost:8080/logs.
Uninstalling the Chart: To remove the deployment, run:
helm uninstall my-seraph-release
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
FAQs
An extremely lightweight, SRE autonomous AI agent for seamless integration with common observability tasks.
The npm package seraph-agent receives a total of 13 weekly downloads. As such, seraph-agent popularity was classified as not popular.
We found that seraph-agent demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.