superagent-files

A way to describe software agents in YAML files named .superagent. YAML is a human-readable configuration format; these files specify an agent's model, instructions, connected servers, memory, sandbox, and links to other agents.

In plain words
What is it for?
Use it to define agents declaratively, connect them to services such as databases, configure their runtime settings, and load them from Python.
Why use it?
It keeps an agent's setup in one validated file instead of spreading configuration through program code.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/promptise-com/foundry/superagent-files
Clone the repo
git clone --depth 1 https://github.com/promptise-com/Foundry
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,665 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.03665
Opus 5 $0.00000 $0.01833
Sonnet 5 $0.00000 $0.00733
Haiku 4.5 $0.00000 $0.00366

Measured 3d ago against content hash 8297f8cc090d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

superagent-files scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

| `allow_sudo` | `bool` | `false` | Allow sudo access in container. |
docs/core/agents/superagent-files.md · 383 lines

How it starts

The opening of the file, as written. The whole thing — 383 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SuperAgent Files

Define agents declaratively using .superagent YAML files -- configure model, servers, memory, sandbox, and cross-agent references in a single file.

Quick Example

# analyst.superagent
version: "1.0"

agent:
  model: "openai:gpt-5-mini"
  instructions: "You are a data analyst. Use available tools to answer questions."
  trace: true

servers:
  database:
    type: http
    url: "http://localhost:9000/mcp"
    headers:
      Authorization: "Bearer ${DB_TOKEN}"

Load and run it in Python:

import asyncio
from promptise import build_agent
from promptise.superagent import load_superagent_file

async def main():
    loader, cross_agents = load_superagent_file("analyst.superagent")
    config = loader.to_agent_config()
    agent = await build_agent(**config.to_build_kwargs())

    result = await agent.ainvoke({
        "messages": [{"role": "user", "content": "Show me top 10 customers by revenue"}]
    })
    print(result["messages"][-1].content)
    await agent.shutdown()

asyncio.run(main())

Concepts

A .superagent file is a YAML document validated against SuperAgentSchema. It replaces the programmatic build_agent() call with a declarative configuration file that can be version-controlled, shared across teams, and loaded at runtime.

The loader pipeline works in three steps:

  1. Parse and validate -- SuperAgentLoader.from_file() reads YAML and validates it against the Pydantic schema. Invalid fields are rejected immediately.
  2. Resolve environment variables -- resolve_env_vars() replaces ${VAR} and ${VAR:-default} placeholders with actual values from the environment.
  3. Convert to native types -- to_agent_config() produces a SuperAgentConfig object whose to_build_kwargs() method returns a dict ready for build_agent(**kwargs).

Full YAML Schema

Here is a .superagent file using every available section:

version: "1.0"

agent:
  model: "openai:gpt-5-mini"          # or detailed config (see below)
  instructions: "You are a research assistant."
  trace: true

identity:
  provider: entra                      # local|entra|aws|gcp|spiffe|oidc|auto
  agent_id: research-bot               # who is acting (for attribution)
  owner: research-team
  labels: {env: prod}
  client_id: "${AZURE_CLIENT_ID}"      # provider-specific (Entra here)
  resource: api://search.example.com   # audience the credential targets

servers:
  search:
    type: http
    url: "https://search.example.com/mcp"
    transport: streamable-http
    headers:
      Authorization: "Bearer ${SEARCH_TOKEN}"
  local_tools:
    type: stdio
    command: python
    args: ["-m", "my_tools.server"]
    env:
      API_KEY: "${MY_API_KEY}"
    cwd: "/opt/tools"
    keep_alive: true

cross_agents:
  math_expert:
    file: "./agents/math.superagent"
    description: "Specialized math and calculation agent"

memory:
  provider: chroma                     # "in_memory", "chroma", or "mem0"
  collection: research_memory
  persist_directory: ".promptise/chroma"

sandbox:
  backend: docker
  image: "python:3.11-slim"
  cpu_limit: 2
  memory_limit: "4G"
  disk_limit: "10G"
  network: restricted
  timeout: 300
  tools: ["python"]
  workdir: "/workspace"
  allow_sudo: false

Read the full file on GitHub · 383 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 383 lines · 0 tokens per session scan B 8297f8cc090d

Subscribe to this mod's changes

superagent-files is an agent published in the GitHub repository promptise-com/Foundry (869 stars, last pushed 13d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 3,665 tokens. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

lg-react-named-services-config

Agent "lg-react-named-services-config" from kdcube/kdcube, covering lg-react: connecting named services — two config shapes, shape a — per-service connections, shape b — whole surface, choosing and keeping the three declarations honest.

kdcube/kdcube · 0 tokens

rn-tester

Tests React Native features on simulator/emulator. Verifies UI renders correctly, user flows work, and internal state matches expectations. Use when a feature has been implemented and needs verification. PARENT-SESSION-ONLY: requires MCP tools (cdp, device) — do NOT spawn via Task tool, run protocol inline in parent…

Lykhoyda/rn-dev-agent · 337 tokens

rn-code-architect

Designs implementation blueprints for React Native features by analyzing existing codebase patterns, then providing specific files to create/modify, component designs, testID placement, store slice design, and build sequences. Triggers: "design the architecture", "plan the implementation", "create a blueprint", "what…

Lykhoyda/rn-dev-agent · 238 tokens

rn-debugger

Diagnoses broken or unexpected behavior in a React Native app running on simulator/emulator. Gathers parallel evidence (component tree, logs, network, store), narrows root cause, applies a fix, and verifies recovery. PARENT-SESSION-ONLY: requires MCP tools (cdp, device, collectlogs) — do NOT spawn via Task tool, run…

Lykhoyda/rn-dev-agent · 341 tokens

rn-code-reviewer

Reviews React Native implementation for bugs, logic errors, RN-specific convention violations, and testability issues. Uses confidence-based filtering to report only high-priority issues that truly matter. Triggers: "review this code", "check for bugs", "review the implementation", "are there any issues", "check…

Lykhoyda/rn-dev-agent · 234 tokens

stack-auditor

Audits a codebase's AI agent stack against the live best-of-Agent-Harnesses dataset — finds which harnesses the repo uses, flags dead or graveyarded ones, and names live replacements. Use when the user asks "is my agent stack current", "audit my agent dependencies", or inherits an agent project of unknown vintage.

RyanAlberts/best-of-Agent-Harnesses · 73 tokens