Skip to content

Design TodoAI Protocol v0.1 Specification #1

@djdarcy

Description

@djdarcy

TodoAI Protocol v0.1 Design

Overview

Define the task specification language that enables representing any computational or real-world task in a unified format.

Core Requirements

1. Task Representation

  • Support natural language: "Order pepperoni pizza from PizzaHut"
  • Support code execution: "Run Python script to analyze data"
  • Support system operations: "Move file from A to B"
  • Support composite tasks: "Prepare weekly report" (multiple subtasks)

2. Task Structure (Proposed)

task:
  id: <uuid>
  version: "0.1"
  metadata:
    created: <timestamp>
    author: <user-id>
    tags: [optional-tags]
  
  definition:
    type: "action"  < /dev/null |  "query" | "monitor" | "composite"
    title: "Human readable title"
    description: "Detailed description"
    
  specification:
    language: "natural" | "code" | "structured"
    content: |
      <task specification in chosen language>
    parameters:
      - name: <param>
        type: <type>
        required: true|false
        default: <value>
  
  execution:
    agent: <agent-id> | "auto"
    environment:
      platform: ["windows", "mac", "linux", "any"]
      capabilities: [required-capabilities]
    constraints:
      timeout: <seconds>
      memory: <MB>
      network: true|false
      filesystem: "read" | "write" | "none"
    
  completion:
    criteria:
      type: "result" | "state" | "confirmation"
      specification: <success-criteria>
    verification:
      method: "automatic" | "manual" | "agent"
      specification: <verification-details>
    output:
      format: "text" | "json" | "file" | "none"
      schema: <output-schema>

3. Examples

Natural Language Task

task:
  id: "550e8400-e29b-41d4-a716-446655440000"
  version: "0.1"
  definition:
    type: "action"
    title: "Order Pizza"
    description: "Order a large pepperoni pizza for delivery"
  specification:
    language: "natural"
    content: |
      Order a large pepperoni pizza from PizzaHut
      Deliver to: 123 Main St
      Payment: Use saved card ending in 4242
      Tip: 20%
  execution:
    agent: "food-delivery-agent"
    constraints:
      network: true
      timeout: 300
  completion:
    criteria:
      type: "confirmation"
      specification: "Order confirmation received"

Code Execution Task

task:
  id: "660e8400-e29b-41d4-a716-446655440001"
  version: "0.1"
  definition:
    type: "action"
    title: "Analyze Sales Data"
    description: "Run monthly sales analysis"
  specification:
    language: "code"
    content: |
      import pandas as pd
      df = pd.read_csv('sales.csv')
      monthly_summary = df.groupby('month').agg({
        'revenue': 'sum',
        'units': 'count'
      })
      monthly_summary.to_csv('summary.csv')
    parameters:
      - name: "input_file"
        type: "string"
        default: "sales.csv"
  execution:
    agent: "python-runtime"
    environment:
      capabilities: ["python3", "pandas"]
    constraints:
      filesystem: "write"
      memory: 1024
  completion:
    criteria:
      type: "result"
      specification: "summary.csv exists"

Design Questions

  1. Serialization Format: YAML vs JSON vs custom DSL?
  2. Type System: How strict should parameter typing be?
  3. Security Model: How to specify agent capabilities safely?
  4. Composition: How do composite tasks reference subtasks?
  5. State Management: How to handle long-running tasks?
  6. Error Handling: How to specify fallback behaviors?
  7. Versioning: How to handle protocol evolution?

Next Steps

  1. Review and refine task structure
  2. Define standard task types taxonomy
  3. Create reference implementation parser
  4. Build example task library
  5. Design agent communication protocol

Please provide feedback on this initial design!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions