Skip to main content

Open Agent Spec CLI for bootstrapping AI agent projects

Project description

Open Agent Spec (OAS) CLI

A command-line tool for generating agent projects based on Open Agent Spec YAML files.

Installation

pip install open-agent-spec

Usage

Basic Usage

# Show help
oas --help

# Initialize a new agent project
oas init --spec path/to/spec.yaml --output path/to/output

# Preview what would be created without writing files
oas init --spec path/to/spec.yaml --output path/to/output --dry-run

# Create a base working agent with minimal spec
oas init --template minimal --output path/to/output

Enable verbose logging

oas init --spec path/to/spec.yaml --output path/to/output --verbose


### Spec File Format
The spec file should be in YAML format with the following structure:

```yaml
open_agent_spec: 1.0.4

agent:
  name: hello-world-agent
  role: Responds with a greeting

intelligence:
  type: llm
  engine: openai
  model: gpt-4

tasks:
  greet:
    description: Say hello
    input:
      properties:
        name:
          type: string
    output:
      properties:
        response:
          type: string

prompts:
  system: >
    You are a friendly agent that greets people by name.
    Respond with: "Hello <name>!"
  user: "{{name}}"

behavioural_contract:
  version: "0.1.2"
  description: "Simple contract requiring a greeting response"
  role: "Friendly agent"
  behavioural_flags:
    conservatism: "moderate"
    verbosity: "compact"
  response_contract:
    output_format:
      required_fields: [response]

interface:
  cli:
    enabled: true
    arguments:
      - name: name
        type: string
        required: true

Generated Project Structure

output/
├── agent.py              # Main agent implementation
├── prompts/             # Prompt templates
│   └── analyst_prompt.jinja2
├── requirements.txt     # Project dependencies
└── .env.example        # Environment variables template

Development

Setup

# Clone the repository
git clone https://github.com/aswhitehouse/open-agent-spec.git
cd oas-cli

# Install development dependencies
pip install -e ".[dev]"

Running Tests

pytest

Building

python -m build

Pacakge Installation

PyPI version

License

This project is licensed under the GNU Affero General Public License v3.0 (AGPLv3), which ensures that improvements and deployments of this codebase stay open and benefit the wider community.

If you're a business or enterprise and would like to:

Use this tool in a proprietary or internal-only setting

Avoid open-sourcing your modifications or integrations

Receive custom implementation support or consulting

Discuss a commercial license or enterprise partnership

➡️ Please feel free to reach out: 📧 andrewswhitehouse@gmail.com

Myself and my collaborators would be happy to support your journey with AI agents and ensure responsible, scalable use of this tooling in your stack.

Overview

https://www.openagentstack.ai

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.4.tar.gz (33.3 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.4-py3-none-any.whl (28.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for open_agent_spec-1.0.4.tar.gz
Algorithm Hash digest
SHA256 2f19fdbd8e7c1703f0030513eed96bf6a5691d6930165339602e17853dd39d35
MD5 a465a9fb568f07d94ebeaeb8f78ad172
BLAKE2b-256 682b5e6868770783555ad1e9583ff1e16a40bce7d539fd0ce3e48b3cf8a95989

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for open_agent_spec-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 9de7166ad18d5f3d570991c53faee54f1f86e7c8280ed987ee492fb15bb6667c
MD5 fe216dbdef2de5795ac62b9489eeaeac
BLAKE2b-256 1934671465f85f38bc7b8a3b7e382cbd31f9e77c659bfc6ec1b32e6b76e3c269

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