AgentRail Docs

Configuration

The .agentrail config, choosing an agent, environment, and BYO LLM keys.

AgentRail is repo-native and deterministic. Configuration lives in your project, and you bring your own LLM keys.

.agentrail/config.json

Project configuration lives in .agentrail/config.json at the root of your repo. Settings under the "context" key control the context engine — what gets indexed, how big files can be, and how secrets are handled.

KeyTypeDefaultDescription
context.includeGlobsstring[]["**/*"]Glob patterns for files to include in the index.
context.excludeGlobsstring[]sensible defaultsPatterns to exclude (node_modules, dist, .git, secrets, …).
context.maxFileSizeBytesnumber262144Files larger than this are skipped during indexing.
context.skipBinarybooleantrueSkip binary files during indexing.
context.respectGitIgnorebooleantrueHonour .gitignore when walking the tree.
context.daemonAutoSpawnbooleanfalseWhen true, the first cold query silently spawns the warm-index daemon in the background; later queries use the fast warm path.
context.secretRedaction.enabledbooleantrueEnable secret redaction.
context.secretRedaction.actionstring"exclude"Action on matched secrets ("exclude" or "redact").
context.secretRedaction.denyGlobsstring[]credential/key patternsFiles that contain secrets and must not be indexed.
context.embedding.modestring"disabled"Embedding provider mode ("disabled", "local", "openai", "custom").
context.summary.modestring"disabled"Summary provider mode.

Example

{
  "context": {
    "daemonAutoSpawn": true,
    "maxFileSizeBytes": 131072,
    "excludeGlobs": [".git/**", "node_modules/**", "dist/**"]
  }
}

Choosing an agent

AgentRail runs the coding agent you already use — it is not a coding agent itself. Pick one when you set up the project, or per run:

agentrail init claude           # set the project up for an agent
agentrail run issue 42 --agent claude
agentrail run issue 42 --agent codex

The --agent flag accepts claude, codex, or cursor. agentrail init takes the same agent names as a positional argument.

Bring your own LLM keys

You supply the provider keys for whichever agent you run. AgentRail invokes your agent with your own credentials — it does not provision or proxy model access. Set the provider keys your chosen agent expects in your environment (for example, in your shell profile or a local .env), the same way you'd run that agent on its own. Secret-bearing files are kept out of the index by context.secretRedaction and the exclude globs above.

Secrets stay local

Indexing runs on your machine. The context.secretRedaction settings exclude or redact credential files before anything is indexed, and respectGitIgnore keeps ignored paths out of the index. Nothing about your source leaves your machine to retrieve context.