Skip to main content

YAML-first agent specs: run with `oas run` or generate a full Python project with `oas init`.

Project description

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

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

open_agent_spec-1.2.1.tar.gz (153.1 kB view details)

Uploaded Source

Built Distribution

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

open_agent_spec-1.2.1-py3-none-any.whl (57.4 kB view details)

Uploaded Python 3

File details

Details for the file open_agent_spec-1.2.1.tar.gz.

File metadata

  • Download URL: open_agent_spec-1.2.1.tar.gz
  • Upload date:
  • Size: 153.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.5

File hashes

Hashes for open_agent_spec-1.2.1.tar.gz
Algorithm Hash digest
SHA256 3d858ceef0299607c0200816626ffe620f0954c3abb210db0da062faa51df519
MD5 9b66b19490721b1139d232bd07920e96
BLAKE2b-256 52faae92113fd042744bb065524fb1680e10f4695c719dfa521be603960b444e

See more details on using hashes here.

File details

Details for the file open_agent_spec-1.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for open_agent_spec-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7b15ef2efba1bbdbfb515e7e247676f6971baa7ac83d85ec6c33cc35d7d76b33
MD5 30927ab38d6a09774eec4f104dcb4379
BLAKE2b-256 0863d8343a96b9cb4ecae64438893ca663db8166bb2c02df43b1a14548208769

See more details on using hashes here.

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