Skip to main content

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

Project description

Open Agent (OA)

Define AI agents with YAML. Generate working scaffolding instantly.

PyPI version Python License

Open Agent (OA) is a YAML specification for defining AI agents and generating working scaffolding.

Building AI agents today often requires manually wiring together:

  • prompt templates
  • LLM configuration
  • task routing
  • memory structures
  • runtime logic

Open Agent moves these concerns into a declarative specification.

Define an agent once in YAML and run it directly, or generate a project scaffold for customization.

You can think of OA as something similar to OpenAPI for services or Terraform for infrastructure, but for AI agents.


Quick Start

Install the CLI:

pip install open-agent-spec

Set your LLM API key (example for OpenAI):

export OPENAI_API_KEY=your_api_key_here

Create an agent spec:

agent:
  name: hello-world-agent
  role: chat

intelligence:
  engine: openai
  model: gpt-4

tasks:
  greet:
    description: Say hello to someone
    input:
      type: object
      properties:
        name:
          type: string
      required: [name]

    output:
      type: object
      properties:
        response:
          type: string
      required: [response]

prompts:
  system: >
    You greet people by name.
  user: "{{ name }}"

Run the agent directly from the spec:

oa run --spec agent.yaml --task greet --input '{"name":"Alice"}' --quiet

Generate a Project Scaffold (Optional)

If you want to extend the implementation, generate a project scaffold:

oa init --spec agent.yaml --output ./agent

This produces a Python project you can customize.


Generated Project Structure

agent/
├── agent.py
├── models.py
├── prompts/
├── requirements.txt
├── .env.example
└── README.md

Design Philosophy

Open Agent intentionally keeps the specification minimal.

The goal is to define agents declaratively and generate consistent project scaffolding.

Tasks in an OA specification are intended to represent atomic units of capability for an agent, rather than complex workflows. Higher-level orchestration can be built on top of these primitives by external systems.

OA does not prescribe:

  • runtime orchestration
  • governance systems
  • evaluation frameworks

These concerns can be layered on top by different runtimes, frameworks, or architectures.


Why OA?

Many teams building agents end up recreating the same infrastructure:

  • agent scaffolding
  • prompt organization
  • model configuration
  • task definitions

OA provides a consistent way to define agents once and generate a working structure automatically.


Related Work

Several projects are exploring ways to standardize how AI agents are defined and orchestrated.

Open Agent focuses specifically on developer-facing scaffolding from a declarative YAML specification.

The goal is to make agent architecture easier to reason about and quicker to implement.


Commands

Command Purpose
oa init --spec … --output … Generate project from YAML
oa init --template minimal --output … Same with bundled spec
oa init aac .agents/ + example spec only
oa run --spec … [--task …] [--input JSON] [--quiet] Run task without codegen
oa update --spec … --output … Regenerate into existing dir
oa init … --dry-run Validate only
oa --help

More detail

Resource Contents
docs/REFERENCE.md Full spec, engines, templates
Repository Source, issues, CI

PyPI Python 3.10+ License: MIT


Historical Changes

“CLI command is oa (formerly oas in older releases).”


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.3.tar.gz (154.6 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.3-py3-none-any.whl (58.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: open_agent_spec-1.2.3.tar.gz
  • Upload date:
  • Size: 154.6 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.3.tar.gz
Algorithm Hash digest
SHA256 9742a4fdabd497194a49e1504bcc38e8d440c944605f386da68958e9512bc284
MD5 a940bbb861faef3d87ec514d4ab9952b
BLAKE2b-256 6b65274caec9b19e8546fa2f356648c5424e4306aabf83402d13c40d29abe8a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for open_agent_spec-1.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8cc88194ca12e8c520bb9c95fd91459952316b0499da3da5b6b2c08dddfaca46
MD5 8a0c4a0aef3705fe8a3ee831bc0cf3c0
BLAKE2b-256 50e123ee55f2172ecf9efb88d2bbfd42700245ff8d994eeb86e46523b84f2364

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