agentleFS
GoogleKnown publishergoogle/esmeralda/apps/agents/AGENTS.md

esmeralda / agents

AGENTS.md25 starsChanged 8 days agoApache-2.0View on GitHub

Local rules for agent packages. The root AGENTS.md still applies. Library details: docs/src/4-esmeralda-library/guide.md. Each agent is a uv workspace member (listed in the root pyproject.toml) with: Orchestrators belong to the CX team (cx-*); reusable A2A agents to the AI CoE team (ai-coe-*). Always through the entry point hostnames, with the esmeralda helpers, which add the ID token, the user's token and the X-API-Key:

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 31,542 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository6 other files it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Always through the entry point hostnames, with the esmeralda helpers, which add the ID token, the user's token and the X-API-Key:

    line 28
  2. Very specific:

    After deploying: make query AGENT=cx-mortgage-orchestrator TARGET=remote ENV=<env> must return an answer.

    line 45

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

apps/agents/AGENTS.md

Local rules for agent packages. The root AGENTS.md still applies. Library details: docs/src/4-esmeralda-library/guide.md.

Package shape

Each agent is a uv workspace member (listed in the root pyproject.toml) with:

  • agent.yaml: framework (google-adk or a2a), env (deployed values), local_env (workstation overrides applied by --local), resources, and for A2A the agent_card. Terraform reads it at deploy time (agent_config_path).
  • agent/__init__.py: calls esmeralda.prepare() before importing the agent definition, then exports app = esmeralda.create_app(root_agent, plugins=[...]).
  • agent/agent.py (+ helpers), tests/, pyproject.toml (depends on esmeralda with [tool.uv.sources] esmeralda = { workspace = true }), Dockerfile.
  • The Dockerfile installs requirements.lock with --require-hashes and the esmeralda wheel from dist/ (both generated by make build-<agent>), uses ENTRYPOINT ["esmeralda", "run", "--"] and CMD ["esmeralda", "serve", "--otel-to-cloud"]. Never bake certificates or env-specific values into the image.

ADK vs A2A

ADK (cx-mortgage-orchestrator)A2A (ai-coe-mortgage-specialist)
frameworkgoogle-adka2a
Served asadk api_server (Agent Runtime streamQuery)A2A REST server, card from agent_card at /v1/card
Terraform moduleinfrastructure/modules/5-workloads/agents/adk-agentinfrastructure/modules/5-workloads/agents/a2a-agent (+ Agent Registry entry, Cloud SQL task store)
Called byEnd users / clientsOther agents, through the entry point

Orchestrators belong to the CX team (cx-*); reusable A2A agents to the AI CoE team (ai-coe-*).

Reaching MCP servers and other agents

Always through the entry point hostnames, with the esmeralda helpers, which add the ID token, the user's token and the X-API-Key:

from esmeralda import a2a, mcp

dms = mcp.toolset(os.environ.get("DMS_MCP_URL", "https://legacy-dms.esmeralda.internal/mcp"), prefix="dms")
specialist = a2a.remote_agent("mortgage_tools_agent", url=os.environ["A2A_AGENT_URL"], description="...")
  • URLs come from agent.yaml env (https://<name>.esmeralda.internal[/mcp]) and local_env (http://localhost:800x/mcp). Never hardcode run.app or Reasoning Engine URLs, and never mint tokens by hand.
  • A new destination needs an Agent Registry entry and an iap.egressor grant (infrastructure/AGENTS.md), plus a route in the gateway.

Run and test

  • make test-agents: agent + library unit tests.
  • make query AGENT=<dir>: in-process query with the local MCP servers started for you. make serve AGENT=<dir> [WEB=1]: local server as in the container.
  • After deploying: make query AGENT=cx-mortgage-orchestrator TARGET=remote ENV=<env> must return an answer.
  • A new agent also needs: a workspace member entry, build-<agent> / deploy-<agent> Make targets, a unit under infrastructure/live/<env>/layer-5-workloads/agents/, and an entry in env.yaml catalog (+ dependency in gateways/direct).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.