agentleFS
davidesilverdavidesilver/ZeroHuman-Agency/docs/AGENTS.md

ZeroHuman-Agency

AGENTS.md1 starsChanged 5 months agoMITView on GitHub

The platform uses a database-driven agent configuration model. Agent identities, tone, and skills are stored per tenant in the database and loaded at runtime — you can customize every agent's behavior per brand without touching code or redeploying. An agent identity is a system prompt that defines who an agent is: its persona, objectives, constraints, writing style, and decision rules. Identities are stored in the agent_configs table, one record per tenant per agent key. Skills are modular instruction blocks attached…

  • Sends data out

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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If no database configuration exists for a given agent, the system falls back to hardcoded default prompts.

    line 21
  2. Very specific:

    All endpoints require an authenticated session.

    line 153
  3. Very specific:

    Add the new key to the VALID_AGENT_KEYS set in routes_agents.py.

    line 191
  4. Very specific:

    Call agent_loader.get_agent_identity(brand_id, "your_key") to load the identity.

    line 193
  5. Distinctive:

    Add a hardcoded fallback prompt in the agent module for tenants without DB configuration.

    line 194
  6. Distinctive:

    No migrations needed unless you want to store the key as an enum (currently stored as text with application-layer validation).

    line 196

≈ “Common” is an estimate: at least 1 in 5 of the 36,368 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

Agent System

The platform uses a database-driven agent configuration model. Agent identities, tone, and skills are stored per tenant in the database and loaded at runtime — you can customize every agent's behavior per brand without touching code or redeploying.


Concepts

Agent identity

An agent identity is a system prompt that defines who an agent is: its persona, objectives, constraints, writing style, and decision rules. Identities are stored in the agent_configs table, one record per tenant per agent key.

Agent skills

Skills are modular instruction blocks attached to an agent. They are concatenated after the identity prompt and let you compose behavior without rewriting the full identity. Examples: "always end posts with a question", "prioritize data-driven openings", "never use passive voice".

Skills are stored in agent_skills, ordered by priority, and loaded alongside the identity at runtime.

Fallback behavior

If no database configuration exists for a given agent, the system falls back to hardcoded default prompts. This means the platform works out of the box on a fresh database and you can customize incrementally.


Agent keys

KeyRole in pipeline
writerProduces the initial draft from a research item
editorRefines the writer's draft for tone, flow, and grammar
adapterRewrites a draft for a different target platform
god_advocateCritical analysis agent in GOD mode review
god_factcheckFact-verification agent in GOD mode review
god_creativeEnhancement suggestions agent in GOD mode review
god_synthesisProduces final verdict (pass / needs revision / reject)
humanizerRemoves AI patterns and re-applies brand voice

GOD mode review

GOD mode runs four agents sequentially on a single draft. Each agent sees the full draft and the output of agents that ran before it.

draft
  ↓
god_advocate   → critique, weaknesses, strengths, score
  ↓
god_factcheck  → claim verification, issues list
  ↓
god_creative   → enhancement suggestions, alternative angles
  ↓
god_synthesis  → final verdict + rationale
                 pass | needs_revision | reject

The synthesis verdict gates the humanizer: only drafts that pass move to humanization.


Humanizer

The humanizer runs a double-pass refinement:

  1. Pass 1 — Strips AI-specific patterns (filler phrases, hedging, passive constructions, hollow affirmations). Applies voice calibration using gold_examples and top-performing drafts from the brand's history.
  2. Pass 2 — Anti-AI audit. Checks the output of Pass 1 and runs a final refinement to catch anything that slipped through.

The humanizer only activates when:

  • brands.use_humanizer = true for the brand
  • The target platform is in brands.humanizer_channels
  • The GOD mode verdict is pass (if GOD mode was run)

Runtime resolution

Request arrives with brand_id
        ↓
agent_loader.get_agent_identity(brand_id, agent_key)
        ↓
Check in-memory TTL cache (5 min per brand+key)
        ↓ cache miss
Query agent_configs WHERE brand_id = ? AND agent_key = ? AND is_active = true
        ↓ no DB record
Use hardcoded default prompt (fallback)
        ↓
Append skills from agent_skills WHERE brand_id = ? AND target_agent = ?
        ORDER BY priority ASC AND is_active = true
        ↓
Return: identity_prompt + "\n\n## Active Skills\n" + skills

The cache is per-process and in-memory. Invalidation happens on TTL expiry (5 minutes). If you update an agent config in the database, the change takes effect within 5 minutes without restart.


Database schema

agent_configs

ColumnTypeDescription
iduuidPrimary key
brand_iduuidTenant scope
agent_keytextOne of the supported keys above
identitytextFull system prompt for this agent
task_type_overridetextOptional override for task routing
is_activebooleanSoft-disable without deleting
created_attimestamptz
updated_attimestamptz

Version history is preserved in agent_config_versions on every update.

agent_skills

ColumnTypeDescription
iduuidPrimary key
brand_iduuidTenant scope
target_agenttextWhich agent this skill applies to
skill_nametextHuman-readable name
instructionstextThe instruction block
priorityintegerLower = applied first
is_activebooleanSoft-disable

API

Agent configs and skills are managed via authenticated REST endpoints.

Agent configs

GET    /api/v1/agent-configs              # list all configs for the active brand
POST   /api/v1/agent-configs              # create a config
GET    /api/v1/agent-configs/:id          # get one config
PATCH  /api/v1/agent-configs/:id          # update (saves version history)
DELETE /api/v1/agent-configs/:id          # soft-delete (sets is_active=false)

Agent skills

GET    /api/v1/agent-skills               # list all skills for the active brand
POST   /api/v1/agent-skills               # create a skill
GET    /api/v1/agent-skills/:id           # get one skill
PATCH  /api/v1/agent-skills/:id           # update
DELETE /api/v1/agent-skills/:id           # soft-delete

All endpoints require an authenticated session. The brand_id is resolved from the session token — you cannot manage another tenant's agents.


Example: customizing the writer

Create a writer identity for a brand:

curl -X POST http://localhost:3000/api/v1/agent-configs \
  -H "Authorization: Bearer <session-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_key": "writer",
    "identity": "You are a senior content strategist writing for operators and founders. You write in first person, use specific numbers when available, and always open with a concrete observation rather than a generic statement."
  }'

Add a skill to that writer:

curl -X POST http://localhost:3000/api/v1/agent-skills \
  -H "Authorization: Bearer <session-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "target_agent": "writer",
    "skill_name": "Close with a question",
    "instructions": "End every post with a single open question that invites the reader to share their experience or opinion. The question must be directly related to the post content, not generic.",
    "priority": 10
  }'

The next time the writer agent runs for this brand, it will use the custom identity and append the skill instruction.


Extending to new agent keys

  1. Add the new key to the VALID_AGENT_KEYS set in routes_agents.py.
  2. Implement the agent logic in python/src/content_engine/agents/.
  3. Call agent_loader.get_agent_identity(brand_id, "your_key") to load the identity.
  4. Add a hardcoded fallback prompt in the agent module for tenants without DB configuration.

No migrations needed unless you want to store the key as an enum (currently stored as text with application-layer validation).


Community agent library (agency-agents)

The .vendor/agency-agents submodule pins msitarzewski/agency-agents — 142+ specialist agent .md files covering marketing, paid-media, design, sales, product, and more.

Install a subset into /agents

# First-time submodule init
git submodule update --init --recursive

# Install default categories (marketing, paid-media, design, sales, product)
./scripts/install-agents.sh

# Install specific categories
./scripts/install-agents.sh --categories marketing,design

# Install everything
./scripts/install-agents.sh --all

The script copies selected categories into /agents/ for runtime use. After running it, review with git diff --stat agents/ and commit only the subset you approve (HITL gate).

Runtime API

Once agents are in /agents/, they are surfaced through:

GET  /api/agents/          — list available agents (slug, name, description)
POST /api/agents/:slug/invoke  — invoke an agent with a user prompt

The invoke endpoint loads the agent's .md file as the system prompt and calls the LLM via the provider registrar.

Available categories

CategoryCountUse case
marketing50+SEO, content creation, growth, brand
paid-media5PPC, paid social, programmatic, creative
design5Brand guardian, UI/UX, image prompts
salesvariesSDR, account management, deal coaching
productvariesProduct strategy, roadmap, PRDs

Full category list: ls .vendor/agency-agents/

Download now (ZIP)

  • 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 28,693 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 repository4 other files it gives its agents.

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.