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

esmeralda / services

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

Local rules for MCP tool servers. The root AGENTS.md still applies. Background: docs/src/2-workloads-and-catalog/02-mcp-tool-servers.md. envoy/ is the digest-pinned Envoy adapter image (see its README.md), not an MCP server.

  • 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

1 rule. About 0 are common, 0 are distinctive, and 1 is 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.

  • 1

    Very specific

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

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

    Verify: make test, make test-terraform, then after deploy make test-gateway ENV=<env> and a real make query AGENT=cx-mortgage-orchestrator …

    line 31

≈ “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/services/AGENTS.md

Local rules for MCP tool servers. The root AGENTS.md still applies. Background: docs/src/2-workloads-and-catalog/02-mcp-tool-servers.md. envoy/ is the digest-pinned Envoy adapter image (see its README.md), not an MCP server.

Server conventions

  • One directory per server (corporate-email, income-verification, legacy-dms), each a uv workspace member listed in the root pyproject.toml.
  • FastMCP app mounted at /mcp (streamable HTTP, stateless, JSON responses) inside a Starlette app with a /health route; served by uvicorn on port 8080 in the container. Follow income-verification/main.py.
  • Telemetry through the local otel_setup.py (init_telemetry, trace_tool).
  • tools.json lists the tools (name, description, inputSchema). It is published as the server's Agent Registry tool spec, so keep it in sync with the @mcp.tool() functions.
  • Unit tests next to the code (test_main.py / test_server.py), wired into make test.
  • Data is synthetic only (e.g. the fictional Sterling applicants). Never add real personal data.
  • Dockerfile: python:3.12-slim, uv copied from the pinned ghcr.io/astral-sh/uv image, requirements.lock installed with --require-hashes, non-root user. Keep that uv version in sync with .github/workflows/*.yml.

Deployment contract (infrastructure/modules/5-workloads/services/<name>/)

  • Cloud Run with ingress = "INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER": reachable only through the entry point and the gateway.
  • Custom audiences: the service accepts ID tokens for http(s)://<name>.esmeralda.internal and .../mcp (plus legacy *.internal.gateway names) in addition to its run.app URI. A new server must list its own hostnames in custom_audiences.
  • roles/run.invoker only for invoker_service_accounts (the gateway SA is the normal path).
  • Image resolved to a digest in image.tf (local.image_by_digest).
  • Registry entry: google_agent_registry_service.governance_mcp in the governance project with interface https://<name>.esmeralda.internal/mcp (JSONRPC) and mcp_server_spec.content = file(var.tools_spec_path) (apps/services/<name>/tools.json). Its registry_service_id output must be added to the iap-egress unit, or agents can't reach it through the Agent Gateway.
  • register_mcp.py only writes a local, gitignored apps/services/mcp_registry.json; it calls no Google API.

Adding a server

  1. apps/services/<name>/ (app, tools.json, tests, pyproject.toml, Dockerfile, .dockerignore); add it to the workspace members, then make lock and commit uv.lock.
  2. Make targets: build-service-<name> (and build-services), tests in make test, ports in make run-mcp-local and the agents' local_env.
  3. Module + live units (dev and prd) under layer-5-workloads/services/<name>, an entry in the gateway's agent_endpoints (probe = "mcp"), and the iap-egress registry list.
  4. Verify: make test, make test-terraform, then after deploy make test-gateway ENV=<env> and a real make query AGENT=cx-mortgage-orchestrator TARGET=remote ENV=<env>.

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.