Summary
Currently, the eino ADK agent's behavior is entirely hardcoded in buildSystemPrompt() (pkg/analyzer/analyzer.go). There is no way to customize or extend the agent's instructions without modifying Go source code.
Motivation
Google recently introduced the AGENTS.md convention as a standard way to provide instructions to AI agents — similar to how CLAUDE.md, CURSORRULES, or COPILOT-INSTRUCTIONS.md guide coding assistants. The idea is that a project can include an AGENTS.md file (or per-directory variants) that agents automatically discover and follow.
Supporting this convention in lapp would:
- Make agent behavior configurable without recompilation — users could tweak analysis instructions, add domain-specific guidance, or customize output format by editing a markdown file.
- Enable per-project customization — different log sources (Kubernetes, application servers, CI pipelines) benefit from different analysis strategies. An
AGENTS.md in the workspace could provide context-specific hints.
- Align with the emerging ecosystem convention — as more tools adopt
AGENTS.md, supporting it makes lapp interoperable and familiar.
Proposed Behavior
- When building the agent, check for an
AGENTS.md file in the workspace directory (and optionally the project root).
- If found, append its contents to the system prompt (after the hardcoded base instructions).
- Support a flag like
--agents-md <path> to explicitly specify the file.
- The hardcoded
buildSystemPrompt() remains the default — AGENTS.md is purely additive.
Example
<!-- AGENTS.md -->
# Log Analysis Guidelines
- This project uses structured JSON logging via Zap.
- The `trace_id` field links related log entries across services.
- Ignore `health_check` endpoint logs — they are noise.
- When reporting errors, always include the `request_id` for correlation.
The agent would then incorporate these hints when analyzing logs from this project.
Alternatives Considered
- Environment variables / CLI flags for each option: Does not scale well for rich, structured instructions.
- Config file (YAML/TOML): Less expressive than markdown for free-form guidance; also less aligned with the emerging convention.
Summary
Currently, the eino ADK agent's behavior is entirely hardcoded in
buildSystemPrompt()(pkg/analyzer/analyzer.go). There is no way to customize or extend the agent's instructions without modifying Go source code.Motivation
Google recently introduced the
AGENTS.mdconvention as a standard way to provide instructions to AI agents — similar to howCLAUDE.md,CURSORRULES, orCOPILOT-INSTRUCTIONS.mdguide coding assistants. The idea is that a project can include anAGENTS.mdfile (or per-directory variants) that agents automatically discover and follow.Supporting this convention in lapp would:
AGENTS.mdin the workspace could provide context-specific hints.AGENTS.md, supporting it makes lapp interoperable and familiar.Proposed Behavior
AGENTS.mdfile in the workspace directory (and optionally the project root).--agents-md <path>to explicitly specify the file.buildSystemPrompt()remains the default —AGENTS.mdis purely additive.Example
The agent would then incorporate these hints when analyzing logs from this project.
Alternatives Considered