spec v1 · 5 SDKs · 1 linter

The Dockerfile for agents

One Agentsfile declares the skills, agents, custom commands, MCP servers and plugins of a project, grouped into named profiles. Write each one in full inside the file, or point to external files. Parse it from Python, Rust, Java, Go or TypeScript, and validate it with agentsfile-lint.

Read the specRun the linter
The dev profile of this repository with an inline skill, its bundled script and an inline agent

one format, five parsers

PythonRustJavaGoTypeScriptBunuvMavenPythonRustJavaGoTypeScriptBunuvMaven

what goes in a profile

Five building blocks, inline or by reference

Each item is either written in full with content, or points to a path, a URL or a published plugin with source. Setting both, or neither, is an error.

skill

Skills

The whole SKILL.md body in content, plus nested file blocks for scripts and references.

agent

Agents

The full system prompt inline, with its model, tools and description next to it.

command

Custom commands

The prompt inline, with argument-hint, model and the tools the command may use.

mcp

MCP servers

A full stdio, http or sse server definition, or a source pointing to one.

plugin

Plugins

Version, author and its own skills, agents, commands and MCP servers, or a published plugin by source.

<<EOT

Heredocs

Multi-line prompts and scripts without escaping. The shared indentation is stripped, and ${NAME} stays literal.

syntax

Blocks like main.tf, strict like a compiler

Strings, heredocs, lists and maps. Every SDK reports the first error with the same message and position.

version = "1"

profile "dev" {
  description = "Working on the Agentsfile spec and its SDKs"

  skill "agentsfile-lint" {
    description = "Lints every Agentsfile in the repo and fixes the errors"
    content     = <<SKILL
      Run scripts/lint.sh.
      Fix every error[...] line, then run it again until it prints 0 error(s).
      Treat warning[...] lines as suggestions.
      SKILL

    file "scripts/lint.sh" {
      content = <<SH
        #!/usr/bin/env bash
        set -euo pipefail
        cargo run -q --manifest-path linter/Cargo.toml -- Agentsfile spec/fixtures/valid/*.agentsfile
        SH
    }
  }
  ...
}
from agentsfile import load

file = load("Agentsfile")
dev = file.profiles[0]
for skill in dev.skills:
    print(skill.name, skill.content or skill.source)
    for file in skill.files:
        print("  ", file.path)

line 6, col 5: attribute "tools" must be a list
line 4, col 3: command "ship" requires "source" or "content"
line 4, col 3: skill "a" cannot set both "source" and "content"

sdks

Same model in every language

Each SDK has a lexer, a parser and a schema validator, with no runtime dependencies. Every one runs the same 54 conformance fixtures.

SDKTestsEntry point
Python71agentsfile.parse(text) · load(path)
Rust12agentsfile::parse(src) · parse_file(path)
Java66Agentsfile.parse(String) · load(Path)
Go70agentsfile.Parse(src) · ParseFile(path)
TypeScript73parse(src) · load(path)

gallery

Real output from this repository

agentsfile-lint

Every rule, with a code

Written in Rust on top of the Rust SDK. It reports every schema error, not only the first, and adds warnings a parser should not reject.

CodeLevelRule
E001errorlexical or syntax error
E002errorunknown attribute
E003errorunknown block
E004errorduplicate attribute
E005errorwrong attribute kind
E006errorunsupported version or invalid transport
E007errorduplicate profile or duplicate item
E008errormissing version, or neither source nor the inline definition
E009errortransport requirement not met
E010errorboth source and the inline definition
W001warningprofile declares nothing
W002warninga source starting with . or / does not exist next to the Agentsfile
W003warningenv or headers value looks like a hardcoded secret; use ${NAME}
W004warningblock name is not kebab-case
W005warningattribute ignored by the chosen transport
W006warninginline content is empty

stack

Built with

Python 3.15uvtypytestRust 1.99 · edition 2024cargoJava 25MavenJUnit 5Go 1.26standard libraryTypeScript 7Bun 1.4bun testzero runtime dependenciesPython 3.15uvtypytestRust 1.99 · edition 2024cargoJava 25MavenJUnit 5Go 1.26standard libraryTypeScript 7Bun 1.4bun testzero runtime dependencies

Lint your Agentsfile

The spec lives in spec/SPEC.md. The fixtures in spec/fixtures pin every error message, so a new SDK can prove it conforms.

Open SPEC.md