What's the difference between AGI and AMI

Dear All,
I’m new here. I have a question:
What’s the difference between AGI and AMI.

Thank you in advance,
Behzad[/quote]

AGI - Asterisk Gateway Interface - provides synchronous control over a channel in asterisk using stdio and stderr. Basically anything that can read from standard input and write to standard output can control an asterisk channel via AGI.

voip-info.org/wiki/view/Asterisk+AGI

AMI - Asterisk Manager Interface - an asynchronous TCP based plain text protocol which allows asterisk to send events and receive commands.

voip-info.org/wiki/view/Asterisk+manager+API

Thank you for your reply.