Skip to main content

Universal agent manifest standard with resolver, signed profiles, and Noether composition — the missing layer between agent definitions and runtimes. (Import as `agentspec`.)

Project description

AgentSpec

Universal agent manifest standard with resolver, signed profiles, and Noether composition.

License Python Tests

AgentSpec is the missing layer between agent definitions and runtimes:

your .agent file
      ↓
  AgentSpec resolver        ← auto-negotiates environment (the moat)
  (model, tools, runtime, auth)
      ↓
claude-code / gemini-cli / codex-cli / aider / opencode / ollama

Plus persistent agent profiles with cryptographically signed portfolios — every agent accumulates a verifiable CV across sprints.


Why AgentSpec

Every existing agent format (gitagent, Agent Format, OSSA, Open Agent Spec) is a static config file. None of them resolve. AgentSpec asks:

"I have this agent definition. Figure out what's installed, what API keys I have, pick the best runtime, warn me about what's missing, accumulate what the agent learns, and just run it."

What makes AgentSpec unique:

Feature AgentSpec Others
Resolver (auto-negotiate runtime)
Inheritance with trust-restrict invariant
Signed agent profiles + portfolios
Content-addressable hashing partial
Multi-runtime (6 frameworks) usually 1
ACLI-compliant CLI for agent discovery
Noether composition integration

Install

pip install agentspec-alpibru

Optional extras:

pip install "agentspec-alpibru[registry]"     # FastAPI registry server
pip install "agentspec-alpibru[signing]"      # Ed25519 via PyNaCl (recommended)

# (The package is published as agentspec-alpibru on PyPI.
#  In code, you still import it as `agentspec`.)

Quick Start

# Create a new agent
agentspec init my-researcher

# Validate the schema
agentspec validate my-researcher.agent

# See what would run (without executing)
agentspec resolve my-researcher.agent

# Run it
agentspec run my-researcher.agent --input "quantum tunneling"

# Push to a registry
agentspec push my-researcher.agent --registry https://registry.agentspec.dev

# Pull and run someone else's agent
agentspec pull ag1:abc123 --registry https://registry.agentspec.dev

The .agent Format

apiVersion: agent/v1
name: deep-researcher
version: 1.0.0

# What model + capability tier
model:
  capability: reasoning-high
  preferred:
    - claude/claude-sonnet-4-6
    - gemini/gemini-2.5-pro
    - local/llama3:70b

# Abstract skills (resolver maps to concrete tools)
skills:
  - web-search
  - cite-sources

# Behavior traits (portable across models)
behavior:
  traits:
    - cite-everything
    - never-guess
  temperature: 0.2

# Trust invariant — child cannot escalate
trust:
  filesystem: none
  network: allowed
  exec: none

Two formats supported:

  • Single file (researcher.agent) — simple, hashable
  • Directory (researcher/) — rich identity with agent.yaml + SOUL.md + RULES.md

Inheritance

Agents extend other agents with enforced merge semantics:

base: ./researcher.agent
merge:
  skills: append      # append | override | restrict
  tools: append
  behavior: override
  trust: restrict     # always restrict — child cannot escalate

The trust: restrict invariant is hardcoded. A child agent can never escalate permissions beyond its parent. Enforced at merge time.


The Resolver

Given a .agent file, the resolver:

  1. Detects installed runtimes (shutil.which("claude"), etc.)
  2. Checks API keys in environment
  3. Walks the model preference list, picks the first that's available
  4. Maps abstract skills to concrete tools
  5. Builds the system prompt from traits / SOUL.md / RULES.md
  6. Falls back to capability tier if no preferred model resolves
  7. Explains every decision with --verbose
$ agentspec resolve researcher.agent
  Runtime:  claude-code
  Model:    claude/claude-sonnet-4-6
  Auth:     env.ANTHROPIC_API_KEY
  Tools:    web-search, cite-sources
  Resolver decisions:
    Detected runtimes: [claude-code, gemini-cli, ollama]
      selected claude/claude-sonnet-4-6 via claude-code (env.ANTHROPIC_API_KEY)
      skill web-search: resolved to brave-mcp
      skill cite-sources: resolved to arxiv-mcp

Agent Profiles & Signed Portfolios

The killer feature. Every agent gets a persistent profile that accumulates across sprints — a verifiable CV signed by the supervisor.

from agentspec.profile import ProfileManager
from agentspec import load_agent

mgr = ProfileManager("./profiles")
manifest = load_agent("my-agent.agent")
profile = mgr.load_or_create(manifest)

# After a sprint completes
mgr.process_retro(profile, feedback={
    "assessment": "completed",
    "blockers": ["pandas std=0 silently skips z-score"],
    "tools": ["pandas", "fastapi", "pytest"],
    "clarity": 9,
}, sprint_id="sprint-42", project="OTA Anomaly Detector")

# Profile now has:
#   - signed memories (Ed25519)
#   - portfolio entry
#   - skill proofs (pandas at 70% confidence)
#   - all verifiable against supervisor pubkey

Cold start: profiles seed from the manifest (declared skills at 30%). After real sprints, demonstrated skills upgrade to 70%+.

This means agents are portable with their experience. Pull an agent from the registry and you get not just its config but its accumulated knowledge — signed, verifiable, content-addressed.


ACLI Compliant

Built with ACLI — agents discover capabilities at runtime:

agentspec introspect          # full command tree as JSON
agentspec skill               # generate SKILLS.md
agentspec --help              # structured help

CLI Commands

Command Description
run Resolve and execute an agent
validate Validate a .agent file against the schema
resolve Show what would run without executing
extend Scaffold a child agent extending an existing one
push Publish an agent to a registry (local or Noether)
pull Fetch an agent from a registry
search Semantic search for agents in a registry
schema Print the JSON Schema for .agent files
init Scaffold a new .agent project

Noether Integration

AgentSpec operations are registered as Noether stages — content-addressed, type-safe, composable:

noether stage search "agentspec"

# Returns 9 stages:
#   agentspec_validate    27980442
#   agentspec_resolve     2a6da6ec
#   agentspec_hash        99640059
#   agentspec_merge       284128cf
#   agentspec_evolve      002cebee
#   agentspec_schema      7ea3d017
#   agentspec_profile_create  89146f8f
#   agentspec_profile_retro   23b7f0f1
#   agentspec_profile_export  795d38b0

Compose AgentSpec operations with the 370+ other Noether stages (data, AI, web, infra) and serve them as HTTP APIs via noether serve.


Registry

Push and pull agents from any Noether-compatible registry:

# Self-hosted (docker compose up in noether-cloud)
agentspec push my.agent --registry http://localhost:3000

# Public registry
agentspec push my.agent --registry https://registry.agentspec.dev
agentspec search "researcher" --registry https://registry.agentspec.dev
agentspec pull <id> --registry https://registry.agentspec.dev

Agents are stored with their signed profiles — when you pull, you get the agent with its accumulated experience.


Base Agent Templates

Pre-built bases in examples/bases/ for the 4 main runtimes, each with a Noether-flavored variant:

bases/
  claude.agent          → claude-noether.agent
  gemini.agent          → gemini-noether.agent
  codex.agent           → codex-noether.agent
  local.agent           → local-noether.agent

Extend them in your own agents:

base: bases/claude-noether.agent
merge:
  skills: append
behavior:
  traits:
    - my-custom-trait

Architecture

src/agentspec/
  parser/          Pydantic models, .agent loader, content-addressable hashing
  resolver/        Environment negotiation, inheritance, merge engine
  runner/          Spawns the resolved runtime
  profile/         Persistent identity, memories, portfolio, Ed25519 signing
  registry/        HTTP client for Noether-compatible registries
  cli/             ACLI-compliant CLI (Typer + acli-spec)

Testing

pytest tests/         # 45 tests across parser, merger, resolver, profile

License

EUPL-1.2 — the European Union Public Licence. Compatible with most other open source licenses (GPL, MIT, Apache via the matrix in the EUPL).


Documentation

Full documentation: agentspec.dev

Or build locally:

pip install "agentspec-alpibru[docs]"
mkdocs serve

Contributing

This is part of a larger ecosystem:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentspec_alpibru-0.3.0.tar.gz (53.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentspec_alpibru-0.3.0-py3-none-any.whl (53.7 kB view details)

Uploaded Python 3

File details

Details for the file agentspec_alpibru-0.3.0.tar.gz.

File metadata

  • Download URL: agentspec_alpibru-0.3.0.tar.gz
  • Upload date:
  • Size: 53.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agentspec_alpibru-0.3.0.tar.gz
Algorithm Hash digest
SHA256 24f411c7dd6ce4134aad5e5f90908488acbb1fdb1042944c2c107c86739730bf
MD5 5327b4ec099823ca939dc04461a1bcd4
BLAKE2b-256 3584f93bc5190382b17866dd19581797b6802837655499f8c311a4dfccc00633

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentspec_alpibru-0.3.0.tar.gz:

Publisher: release.yml on alpibrusl/agentspec

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agentspec_alpibru-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agentspec_alpibru-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1e640cb1f54c9e4444c15d8226721ac9393f3f0b074937ab67bb496585eb0af5
MD5 d105bbaca4b49fafc7c3b4be30212652
BLAKE2b-256 c23c4db0184a27aa2a83c19e5120801c6c69941d16041cd052ba51de6db3d3b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentspec_alpibru-0.3.0-py3-none-any.whl:

Publisher: release.yml on alpibrusl/agentspec

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page