Skip to main content

Open Agent Spec CLI

Define agents in YAML. Run them with one command—or generate a full Python project.

PyPI Python 3.10+ License: MIT


Install

pip install open-agent-spec
# or (isolated CLI)
pipx install open-agent-spec

Command: oas


Use it in 60 seconds

1. Run a spec (no code generation)

Spec lives in YAML; the CLI calls your configured model and prints JSON.

oas init aac
# Creates .agents/example.yaml — edit it, then:

export OPENAI_API_KEY=...   # or ANTHROPIC_API_KEY, etc.

oas run --spec .agents/example.yaml --task greet --input '{"name": "Ada"}' --quiet

2. Generate a full project

Scaffolds agent.py, prompts, requirements.txt, etc.

oas init --spec path/to/spec.yaml --output ./my-agent
cd my-agent
cp .env.example .env   # add API keys
pip install -r requirements.txt
python agent.py

Use a bundled template:

oas init --template minimal --output ./my-agent

3. Refresh generated code after spec changes

oas update --spec path/to/spec.yaml --output ./my-agent

Commands

Command What it does
oas init aac Create .agents/ with example.yaml only
oas init --spec … --output … Generate full agent project
oas init --template minimal --output … Same, using built-in minimal spec
oas run --spec … [--task …] [--input '{"k":"v"}'] [--quiet] Run one task from YAML
oas update --spec … --output … Regenerate into existing folder
oas init … --dry-run Validate + show what would be written
oas --help
oas run --help

Spec at a glance

YAML describes the agent, model, and tasks. Minimal shape:

open_agent_spec: "1.0.9"

agent:
  name: "hello-agent"
  description: "Says hello"

intelligence:
  engine: "openai"
  endpoint: "https://api.openai.com/v1"
  model: "gpt-4"

tasks:
  greet:
    description: "Greet by name"
    input:
      type: "object"
      properties:
        name: { type: "string" }
      required: ["name"]
    output:
      type: "object"
      properties:
        response: { type: "string" }
      required: ["response"]

Engines: openai, anthropic, grok, cortex, local, custom — full tables and examples in the repo: docs/REFERENCE.md.


More detail

Doc Contents
docs/REFERENCE.md Full spec shape, engines, generated layout, templates
Repo Source, issues, CI

License

MIT — see LICENSE.

Open Agent Stack

Metadata

Release files for open-agent-spec 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for open-agent-spec 1.2.1
File Size Uploaded Provenance Actions
open_agent_spec-1.2.1.tar.gz 153.1 kB Without provenance Details for open_agent_spec-1.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for open-agent-spec 1.2.1
File Interpreter ABI Platform Actions
open_agent_spec-1.2.1-py3-none-any.whl Python 3 none any Details for open_agent_spec-1.2.1-py3-none-any.whl

Total release size: 210.5 kB

Release files / open_agent_spec-1.2.1.tar.gz

Download URL open_agent_spec-1.2.1.tar.gz
Size 153.1 kB
Tags Source
SHA-256 checksum
How to use checksums
3d858ceef0299607c0200816626ffe620f0954c3abb210db0da062faa51df519
BLAKE2b-256 checksum
How to use checksums
52faae92113fd042744bb065524fb1680e10f4695c719dfa521be603960b444e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.5

Release files / open_agent_spec-1.2.1-py3-none-any.whl

Download URL open_agent_spec-1.2.1-py3-none-any.whl
Size 57.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7b15ef2efba1bbdbfb515e7e247676f6971baa7ac83d85ec6c33cc35d7d76b33
BLAKE2b-256 checksum
How to use checksums
0863d8343a96b9cb4ecae64438893ca663db8166bb2c02df43b1a14548208769
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.5

Security for open-agent-spec 1.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page