xvadur's picture
Add complete Aethero_App and aethero_protocol directories
46f737d

ASL (Aethero Syntax Language) Overview

Introduction

ASL (Aethero Syntax Language) is a specialized markup language designed for the AetheroOS Protocol. It provides a standardized way to embed metadata, state information, and contextual details within agent communications and system operations.

Core Concepts

1. Tag Structure

{tag_name: value, context: additional_info}

Example:

{mental_state: 'focused', certainty_level: 0.85, aeth_mem_link: 'aeth_mem_0123'}

2. Primary Tag Types

State Tags

  • mental_state: Agent's cognitive state
  • emotion_tone: Emotional context
  • certainty_level: Confidence metric (0.0-1.0)

Memory Tags

  • aeth_mem_link: Reference to memory storage
  • context_id: Conversation context identifier
  • timestamp: ISO-8601 formatted time

Process Tags

  • stage: Current pipeline stage
  • agent_role: Active agent identifier
  • task_status: Execution status

3. Tag Validation Rules

  1. Format Requirements

    • Tags must be JSON-parseable
    • Values must be properly typed
    • Required fields must be present
  2. Context Rules

    • Stage transitions must be sequential
    • Memory links must be valid
    • Timestamps must be properly formatted
  3. Value Constraints

    • Certainty levels: 0.0 to 1.0
    • States: predefined enumeration
    • IDs: valid UUID format

Usage Examples

1. Agent State Tracking

{
    mental_state: 'analytical',
    certainty_level: 0.92,
    timestamp: '2025-05-28T14:32:00Z'
}

2. Memory Reference

{
    aeth_mem_link: 'aeth_mem_0123',
    context_id: 'conv_456',
    access_level: 'restricted'
}

3. Process Flow

{
    stage: 'analysis',
    agent_role: 'AnalystAgent',
    task_status: 'in_progress'
}

Implementation Guidelines

1. Tag Processing

def process_asl_tags(content: str) -> Dict:
    """
    Extract and validate ASL tags from content
    """
    tags = extract_tags(content)
    return validate_tags(tags)

2. Validation

def validate_tags(tags: List[Dict]) -> bool:
    """
    Validate ASL tag structure and content
    """
    for tag in tags:
        if not validate_tag_structure(tag):
            return False
    return True

3. Context Management

def manage_tag_context(tags: List[Dict], context: Dict) -> Dict:
    """
    Manage and update tag context
    """
    updated_context = context.copy()
    for tag in tags:
        updated_context.update(process_tag_context(tag))
    return updated_context

Best Practices

  1. Tag Clarity

    • Use descriptive tag names
    • Include sufficient context
    • Maintain consistent formatting
  2. Performance

    • Minimize tag overhead
    • Batch related tags
    • Cache frequent lookups
  3. Security

    • Validate all inputs
    • Sanitize tag content
    • Respect access levels

Integration Examples

1. Agent Communication

async def send_agent_message(content: str, context: Dict):
    tags = generate_asl_tags(context)
    message = format_with_tags(content, tags)
    await send_message(message)

2. Memory Storage

def store_with_tags(content: str, tags: List[Dict]):
    validated_tags = validate_tags(tags)
    if validated_tags:
        store_content(content, validated_tags)

3. Pipeline Processing

async def process_stage(content: str, stage: str):
    stage_tags = generate_stage_tags(stage)
    processed_content = await process_with_tags(content, stage_tags)
    return processed_content

Future Development

  1. Extended Tag Types

    • Behavioral analysis tags
    • Performance metric tags
    • Security context tags
  2. Enhanced Validation

    • Deep context validation
    • Cross-reference checking
    • Pattern recognition
  3. Integration Features

    • External system tags
    • Custom tag definitions
    • Dynamic tag processing

Version History

  • v1.0 (2025-05-28): Initial release
  • v1.1 (2025-06-15): Added extended tag types
  • v1.2 (2025-07-01): Enhanced validation rules

References

  1. AetheroOS Protocol Specification
  2. Agent Communication Standards
  3. Memory Management Documentation