Skip to content

Latest commit

Β 

History

History
365 lines (282 loc) Β· 10.2 KB

File metadata and controls

365 lines (282 loc) Β· 10.2 KB

Sabre Red 360 Flight Search System

Complete solution for searching flight tickets using Sabre Red 360 commands and API.

🎯 Overview

This project provides two complementary components:

  1. Command Reference Guide - Comprehensive documentation of Sabre Red 360 terminal commands
  2. AI Flight Search Agent - Intelligent subagent that executes searches via Sabre SOAP API

πŸ“š Components

1. Sabre Red 360 Command Guide

File: SABRE_RED_360_TICKET_SEARCH_GUIDE.md

Comprehensive instruction manual covering:

  • Basic and advanced availability commands
  • Search modifiers (airlines, classes, times, direct/indirect flights)
  • Flight segment selling procedures
  • PNR (Passenger Name Record) creation workflow
  • Reservation management and retrieval
  • Quick reference tables and troubleshooting

Perfect for:

  • Travel agents learning Sabre Red 360
  • Quick command reference
  • Understanding GDS search syntax

2. Flight Search Agent

Directory: sabre_agent/

Intelligent AI agent specialized in flight searches:

  • Plans multi-step search strategies
  • Executes Sabre commands via SOAP API
  • Interprets and analyzes results
  • Adapts search approach based on findings
  • Presents clear, actionable recommendations

Perfect for:

  • Automated flight searches
  • Integration with booking systems
  • Claude Code subagent deployment
  • API-based GDS access

πŸš€ Quick Start

Using the Command Guide

Simply open and read:

cat SABRE_RED_360_TICKET_SEARCH_GUIDE.md

Using the Flight Search Agent

1. Install Dependencies:

cd sabre_agent
pip install -r requirements.txt

2. Test Setup:

./test_agent.sh

3. Search for Flights:

python3 tools/sabre_api.py '115JUNNYCLAX'

4. Use with Claude Code:

Use the Sabre flight search agent at /home/user/Tutorial/sabre_agent/
to find flights from New York to London on June 15th.

πŸ“– Documentation

Document Description
SABRE_RED_360_TICKET_SEARCH_GUIDE.md Complete command reference guide
sabre_agent/README.md Agent overview and architecture
sabre_agent/QUICK_START.md 5-minute getting started guide
sabre_agent/INTEGRATION_GUIDE.md Claude Code integration instructions
sabre_agent/examples/search_examples.md Real-world usage examples

πŸŽ“ Learning Path

For Beginners

  1. Read SABRE_RED_360_TICKET_SEARCH_GUIDE.md
  2. Try sabre_agent/QUICK_START.md
  3. Experiment with basic commands
  4. Review examples/search_examples.md

For Integration

  1. Read sabre_agent/README.md
  2. Follow sabre_agent/INTEGRATION_GUIDE.md
  3. Test with ./test_agent.sh
  4. Integrate with your workflow

πŸ”§ Architecture

Tutorial/
β”œβ”€β”€ SABRE_RED_360_TICKET_SEARCH_GUIDE.md  # Command reference
β”œβ”€β”€ README.md                              # This file
└── sabre_agent/                           # AI Agent
    β”œβ”€β”€ tools/
    β”‚   └── sabre_api.py                   # SOAP API client
    β”œβ”€β”€ agent_prompt.md                    # Agent instructions
    β”œβ”€β”€ config.json                        # Configuration
    β”œβ”€β”€ requirements.txt                   # Python dependencies
    β”œβ”€β”€ test_agent.sh                      # Test suite
    β”œβ”€β”€ README.md                          # Agent documentation
    β”œβ”€β”€ QUICK_START.md                     # Quick start guide
    β”œβ”€β”€ INTEGRATION_GUIDE.md               # Integration instructions
    └── examples/
        └── search_examples.md             # Usage examples

🌟 Features

Command Guide Features

βœ… Complete Sabre command syntax reference βœ… Real-world examples for every command type βœ… Quick reference tables βœ… Troubleshooting section βœ… Best practices from industry experts

Agent Features

βœ… Intelligent search planning βœ… Sabre SOAP API integration βœ… Adaptive search strategies βœ… Result interpretation and analysis βœ… Error handling and alternatives βœ… Claude Code integration βœ… JSON output support

🎯 Common Use Cases

Manual Terminal Use

Use the Command Guide to learn Sabre syntax and work directly in Red 360 terminal:

1. Open Sabre Red 360
2. Refer to SABRE_RED_360_TICKET_SEARCH_GUIDE.md
3. Type commands directly
4. Create PNR and book flights

Automated API Searches

Use the Flight Search Agent for programmatic access:

# Single command
python3 sabre_agent/tools/sabre_api.py '115JUNNYCLAX' --json

# Or let the agent plan and execute
# (via Claude Code or custom integration)

Learning and Training

Use both components together:

  1. Read command guide to understand syntax
  2. Use agent to see commands in action
  3. Experiment with different searches
  4. Build your Sabre expertise

πŸ” API Credentials

The agent is pre-configured with CERT (test) environment credentials:

⚠️ Note: These are test credentials. For production use, obtain your own credentials from Sabre and update sabre_agent/config.json.

πŸ“ Example Commands

Basic Availability

115JUNNYCLAX      # NYC to LAX, June 15
120DECLHRJFK      # London to NYC, December 20
101JULSFOTYO      # SF to Tokyo, July 1

With Modifiers

115JUNNYCLAXΒ₯AA        # American Airlines only
115JUNNYCLAX-J         # Business class
115JUNNYCLAXΒ€          # Direct flights
115JUNNYCLAX0800       # Morning (8 AM) departure
115JUNNYCLAX0800Β₯AA-JΒ€ # Combined: AA, 8AM, Business, Direct

Using the API

# Basic search
python3 sabre_agent/tools/sabre_api.py '115JUNNYCLAX'

# JSON output
python3 sabre_agent/tools/sabre_api.py '115JUNNYCLAX' --json

# With filters
python3 sabre_agent/tools/sabre_api.py '115JUNNYCLAXΒ₯AA-J' --json

πŸ› οΈ Troubleshooting

Command Guide Issues

  • Q: What does "Invalid Format" mean?
  • A: Check command syntax in the guide, verify date format (DDMMM)

Agent Issues

  • Q: API returns "Authentication failed"

  • A: Verify credentials in sabre_agent/config.json

  • Q: "No availability" for every search

  • A: Check date format, verify route exists, try removing filters

  • Q: Python packages missing

  • A: Run pip install -r sabre_agent/requirements.txt

Test the Setup

cd sabre_agent
./test_agent.sh

πŸ”— Resources

Sabre Documentation

Project Documentation

  • Command Reference: SABRE_RED_360_TICKET_SEARCH_GUIDE.md
  • Agent README: sabre_agent/README.md
  • Quick Start: sabre_agent/QUICK_START.md
  • Examples: sabre_agent/examples/search_examples.md

🀝 Integration Examples

With Claude Code

# Natural language request
"Use the Sabre agent to find business class flights from
London to Singapore on August 20th"

# Claude Code will:
# 1. Load agent prompt
# 2. Plan search strategy
# 3. Execute Sabre commands
# 4. Present results

With Python

from sabre_agent.tools.sabre_api import SabreAPIClient

client = SabreAPIClient("302596", "lon23don", "U3VL", "cert")
result = client.execute_command("115JUNNYCLAX")

if result['success']:
    print(result['response_text'])

client.close_session()

Command Line

# Pipe to JSON processor
python3 sabre_agent/tools/sabre_api.py '115JUNNYCLAX' --json | jq '.response_text'

# Save to file
python3 sabre_agent/tools/sabre_api.py '115JUNNYCLAX' > results.txt

πŸ“Š Supported Search Types

Search Type Command Guide Agent Support Example
Basic Availability βœ… βœ… 115JUNNYCLAX
Airline Specific βœ… βœ… 115JUNNYCLAXΒ₯AA
Direct Flights βœ… βœ… 115JUNNYCLAXΒ€
By Class βœ… βœ… 115JUNNYCLAX-J
By Time βœ… βœ… 115JUNNYCLAX0800
Complex Queries βœ… βœ… 115JUNNYCLAX0800Β₯AA-JΒ€
Multi-leg βœ… βœ… Sequential searches
Flexible Dates βœ… βœ… Agent adapts automatically

πŸŽ“ Best Practices

Command Guide Usage

  1. Start with basic commands
  2. Add modifiers incrementally
  3. Use quick reference tables
  4. Refer to troubleshooting section

Agent Usage

  1. Be specific in search requests
  2. Let agent create search plan
  3. Trust adaptive strategies
  4. Review and refine results

General Tips

  1. Test in CERT before production
  2. Verify airport codes are valid
  3. Use proper date format (DDMMM)
  4. Consider time zones for international flights
  5. Check multiple options before booking

πŸ“œ License

This project is provided for educational and development purposes. Sabre API usage is subject to Sabre's terms of service.

πŸ”„ Version History

v1.0.0 (2025-11-05)

  • βœ… Complete Sabre Red 360 command reference guide
  • βœ… AI-powered flight search agent
  • βœ… SOAP API integration
  • βœ… Claude Code subagent support
  • βœ… Comprehensive documentation
  • βœ… Example library
  • βœ… Test suite

🚦 Getting Started Checklist

  • Read SABRE_RED_360_TICKET_SEARCH_GUIDE.md
  • Install Python dependencies
  • Run sabre_agent/test_agent.sh
  • Try a basic search command
  • Review example searches
  • Test Claude Code integration (if using)
  • Customize agent prompt (optional)
  • Update credentials for production (if needed)

πŸ’‘ Tips for Success

  1. Start Simple: Begin with basic availability commands
  2. Use Documentation: Reference the guide frequently
  3. Test Thoroughly: Always test in CERT environment first
  4. Learn Patterns: Notice how similar routes/searches work
  5. Leverage Agent: Let the AI handle complex searches
  6. Provide Feedback: The agent adapts based on results

πŸ“ž Support

For issues with:

  • Command Syntax: Refer to SABRE_RED_360_TICKET_SEARCH_GUIDE.md
  • Agent Logic: Check sabre_agent/agent_prompt.md
  • API Issues: Review sabre_agent/README.md troubleshooting
  • Sabre Platform: Contact Sabre support or check Dev Studio

Ready to search for flights! πŸ›«

Start with the Quick Start guide or dive into the comprehensive documentation.