agents

package
v0.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package agents is the AGENTS.md adapter for agent-memory. AGENTS.md is a project-root Markdown file that an industry-broad set of AI agent runtimes (OpenAI Codex CLI, Cursor's agent mode, Sourcegraph Cody, and others) reads as persistent project context.

Unlike Claude / Cursor (which use hidden dirs), AGENTS.md sits at the repo root. There is no widely-agreed user-global location for it; this adapter is project-local only and rejects UserGlobal: true with a clear error.

Index

Constants

View Source
const AdapterName = "agents"

AdapterName is the stable identifier used by `agent-memory install <name>`.

Variables

This section is empty.

Functions

func AgentsContent

func AgentsContent() []byte

AgentsContent returns the embedded AGENTS.md bytes verbatim. Used by tests and by future `install agents --print`.

Types

type Options

type Options struct {
	Root       string
	UserGlobal bool
	Force      bool
	HomeDir    string // unused for this adapter
}

Options mirrors claude/cursor for shape uniformity. UserGlobal must be false; Install rejects true with a clear message.

type Result

type Result struct {
	Adapter string   `json:"adapter"`
	Files   []string `json:"files,omitempty"`
	Skipped []string `json:"skipped,omitempty"`
}

Result is the standard adapter Result.

func Install

func Install(opts Options) (*Result, error)

Install writes the embedded AGENTS.md to <Root>/AGENTS.md. Returns an error for UserGlobal: true because there is no convention this adapter respects — open an issue if you have a use case.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL