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.0.10.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.0.10-py3-none-any.whl (57.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: open_agent_spec-1.0.10.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.0.10.tar.gz
Algorithm Hash digest
SHA256 b34bef766f89319b67ad4ede3ef82252f13bcf80d3c0df19bff30cab745ad61c
MD5 4225dc7318c7ac937606e1978e43eb86
BLAKE2b-256 e1164918302463243b7d311a4f68e8d9c03274f765d7081bef301d40dd3f507e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for open_agent_spec-1.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 8dcb360e16db0c3053dcd08ef18caffda7e6c2a4114fcbabff7761bb91df42b6
MD5 ac242fe4c1c438636ede284f8cbbf4a0
BLAKE2b-256 f7658b84e6254bcc8dacf2da02ba5443f06f4563ba8dd9a03734dbe8cf8a5570

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