Metadata-Version: 2.4
Name: agentspecs
Version: 0.0.3
Project-URL: Home, https://github.com/datalayer/agentspecs
Author-email: Datalayer <info@datalayer.io>
License: BSD 3-Clause License
        
        Copyright (c) 2025, Datalayer
        All rights reserved.
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
License-File: LICENSE
Keywords: AI,Jupyter,MCP,Model Context Protocol
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Requires-Dist: agent-skills
Requires-Dist: code-sandboxes
Requires-Dist: httpx>=0.24
Requires-Dist: mcp[cli]>=1.0
Requires-Dist: pydantic>=2.0
Provides-Extra: lint
Requires-Dist: mdformat-gfm>=0.3.5; extra == 'lint'
Requires-Dist: mdformat>0.7; extra == 'lint'
Requires-Dist: ruff; extra == 'lint'
Provides-Extra: pydantic-ai
Requires-Dist: pydantic-ai-slim; extra == 'pydantic-ai'
Requires-Dist: pydantic-graph; extra == 'pydantic-ai'
Provides-Extra: test
Requires-Dist: ipykernel; extra == 'test'
Requires-Dist: jupyter-server<3,>=1.6; extra == 'test'
Requires-Dist: pytest-asyncio>=0.21; extra == 'test'
Requires-Dist: pytest>=7.0; extra == 'test'
Provides-Extra: typing
Requires-Dist: mypy>=0.990; extra == 'typing'
Description-Content-Type: text/markdown

<!--
  ~ Copyright (c) 2025-2026 Datalayer, Inc.
  ~
  ~ BSD 3-Clause License
-->

[![Datalayer](https://assets.datalayer.tech/datalayer-25.svg)](https://datalayer.ai)

[![Become a Sponsor](https://img.shields.io/static/v1?label=Become%20a%20Sponsor&message=%E2%9D%A4&logo=GitHub&style=flat&color=1ABC9C)](https://github.com/sponsors/datalayer)

# 🧾 Agentspecs

YAML-based specifications for AI agents, MCP servers, skills and more...

## Overview

This repository is the source of truth for declarative specs consumed by Agent Runtimes code generation.

The YAML files in [agentspecs/agentspecs](agentspecs) are compiled into Python and TypeScript catalogs used by runtime and UI layers.

## Current Repository Structure

```text
agentspecs/
├── agents/           # Agent specs
├── teams/            # Team orchestration specs
├── mcp-servers/      # MCP server specs
├── skills/           # Skill specs
├── tools/            # Runtime tool specs
├── envvars/          # Environment variable specs
├── models/           # Model specs
├── memory/           # Memory backend specs
├── guardrails/       # Guardrail policy specs
├── evals/            # Evaluation suite specs
├── triggers/         # Trigger specs
├── outputs/          # Output format specs
└── notifications/    # Notification channel specs
```

Current YAML file counts:

- Agents: 26
- Teams: 9
- MCP servers: 12
- Skills: 4
- Tools: 3
- Env vars: 10
- Models: 20
- Memory backends: 4
- Guardrails: 6
- Evals: 8
- Triggers: 3
- Outputs: 8
- Notifications: 4

## Versioning

All specs are versioned.

### Required Version Field

Each spec includes:

- `id`: logical identifier
- `version`: semantic version string (currently `0.0.1` for all shipped specs)

Example:

```yaml
id: data-acquisition
version: 0.0.1
name: Data Acquisition Agent
```

### Versioned References

Cross-spec references should use `id:version` format.

Examples:

```yaml
mcp_servers:
  - tavily:0.0.1

skills:
  - github:0.0.1

envvars:
  - TAVILY_API_KEY:0.0.1

agent_spec_id: comprehensive-sales-analytics:0.0.1
```

### Runtime Catalog Aliases

Generated catalogs are keyed by unversioned id only (e.g. `data-acquisition`).

The `get_*` / `get*Spec` accessor functions accept both bare ids and versioned refs (`data-acquisition:0.0.1`), stripping the version suffix automatically.

Iterating catalog values (`.values()` / `Object.values()`) returns each spec exactly once — no deduplication is needed.

### Default Version During Codegen

Code generation enforces a default spec version of `0.0.1` if omitted (`scripts/codegen/versioning.py`).

In practice, specs in this repository should always declare `version` explicitly.

## Spec Types

### Agents (`agentspecs/agents`)

Defines agent behavior and runtime defaults.

Common fields:

- `id`, `version`, `name`, `description`, `enabled`
- `model`, `sandbox_variant`, `memory`
- `mcp_servers`, `skills`, `tools`
- `environment_name`
- `icon`, `emoji`, `color`
- `suggestions`, `welcome_message`, `welcome_notebook`, `welcome_document`
- `system_prompt`, `system_prompt_codemode_addons`
- Optional workflow fields such as `goal`, `trigger`, `guardrails`, `evals`, `output`, `notifications`, `advanced`

### Teams (`agentspecs/teams`)

Defines multi-agent orchestration over an underlying agent spec.

Common fields:

- `id`, `version`, `name`, `description`, `enabled`
- `agent_spec_id` (versioned)
- `orchestration_protocol`, `execution_mode`, `supervisor`
- `agents` (team members), `reaction_rules`, `health_monitoring`
- `notifications`, `output`

### MCP Servers (`agentspecs/mcp-servers`)

Defines MCP integrations and process startup configuration.

Common fields:

- `id`, `version`, `name`, `description`
- `command`, `args`, `transport`
- `env`, `envvars` (usually versioned)
- `tags`, `icon`, `emoji`

### Skills (`agentspecs/skills`)

Defines reusable skill modules.

Common fields:

- `id`, `version`, `name`, `description`, `module`
- `envvars`, `optional_env_vars`, `dependencies`
- `tags`, `icon`, `emoji`

### Tools (`agentspecs/tools`)

Defines runtime tool metadata and implementation binding.

Common fields:

- `id`, `version`, `name`, `description`, `enabled`
- `approval`
- `runtime.language`, `runtime.package`, `runtime.method`
- `tags`, `icon`, `emoji`

### Env Vars (`agentspecs/envvars`)

Defines environment variable metadata.

Common fields:

- `id`, `version`, `name`, `description`
- `registrationUrl`, `tags`, `icon`, `emoji`

### Models (`agentspecs/models`)

Defines model options available to specs.

Common fields:

- `id`, `version`, `name`, `description`, `provider`
- `default`
- `required_env_vars`

### Other Catalogs

- `memory`: memory backend options
- `guardrails`: security and policy profiles
- `evals`: evaluation suites
- `triggers`: reusable trigger templates
- `outputs`: output format templates/capabilities
- `notifications`: notification channel templates

## Generation and Consumption

From Agent Runtimes, generated catalogs are produced via:

```bash
make specs
```

Generation scripts are under [scripts/codegen](../scripts/codegen), and outputs are written to:

- Python: [agent_runtimes/specs](../agent_runtimes/specs)
- TypeScript: [src/specs](../src/specs)

## Adding or Updating Specs

1. Add or edit YAML in the relevant folder under [agentspecs/agentspecs](agentspecs).
2. Always set `id` and `version`.
3. Use versioned cross-references (`name:version`) in fields that reference other specs.
4. Keep IDs stable; bump `version` when introducing breaking changes.
5. Regenerate catalogs in Agent Runtimes (`make specs`) and validate consumers.

## Best Practices

- Use kebab-case IDs for most specs (`analyze-support-tickets`).
- Use UPPER_SNAKE_CASE for env var IDs (`TAVILY_API_KEY`).
- Keep descriptions concise and action-oriented.
- Prefer explicit versioned references, even when alias lookup works.
- Maintain backward compatibility by preserving old versions when possible.

## License

Copyright (c) 2025-2026 Datalayer, Inc.

Distributed under the terms of the Modified BSD License.
