email-Assistant-Using-Ai / openenv.yaml
Gaurav3134's picture
Upload 43 files
0387a1c verified
# openenv.yaml for Email Assistant OpenEnv
# This file is used for environment configuration and Hugging Face Spaces deployment.
# Hugging Face Spaces Metadata
title: Email Assistant OpenEnv
emoji: 📧
colorFrom: blue
colorTo: indigo
sdk: docker
app_port: 8000
# Environment Configuration
name: email-assistant-env
version: 0.1.0
description: >
An AI-powered email triage and response environment.
Features three benchmark tasks: spam detection, intent classification, and multi-step resolution.
# Action Space Definition
action_space:
type: object
description: One of several possible actions for the agent to take.
schema:
anyOf:
- $ref: "#/components/schemas/ClassifyEmailAction"
- $ref: "#/components/schemas/DraftReplyAction"
- $ref: "#/components/schemas/RequestMoreInfoAction"
- $ref: "#/components/schemas/EscalateAction"
# Observation Space Definition
observation_space:
type: object
schema:
email_id: string
sender: string
subject: string
body_preview: string
full_body: string
thread_context:
type: array
items:
type: object
metadata:
type: object
# Reward Definition
reward_definition:
type: dense
description: Rubric-based dense reward calculated at every step.
components:
positive:
valid_action: 0.1
correct_classification: 1.0
good_reasoning: 0.2
appropriate_tone: 0.3
complete_resolution: 2.0
penalties:
invalid_action: -0.2
incorrect_classification: -0.5
duplicate_action: -0.5
step_penalty: -0.01
max_steps_exceeded: -1.0
# Task Definitions
tasks:
- id: spam_detection
name: Spam Detection
difficulty: easy
description: Classify whether an email is spam or legitimate.
- id: intent_classification
name: Intent Classification (Sales/Support)
difficulty: medium
description: Classify customer emails into Sales or Support categories with reasoning.
- id: multi_step_resolution
name: Multi-Step Resolution
difficulty: hard
description: "Full workflow: classify, request missing info, and draft a final reply."
# Components Schema (internal references)
components:
schemas:
ClassifyEmailAction:
type: object
properties:
type: { const: classify }
category: { type: string, enum: [Spam, Support, Sales, Urgent, General] }
reasoning: { type: string, minLength: 10, maxLength: 500 }
DraftReplyAction:
type: object
properties:
type: { const: draft_reply }
subject: { type: string }
body: { type: string, minLength: 20 }
tone: { type: string, enum: [professional, friendly, urgent] }
RequestMoreInfoAction:
type: object
properties:
type: { const: request_info }
questions: { type: array, items: { type: string }, minItems: 1 }
EscalateAction:
type: object
properties:
type: { const: escalate }
reason: { type: string }
priority: { type: string, enum: [low, medium, high] }