<?xml version="1.0" encoding="utf-8"?>
<xbrl
  xmlns="http://www.xbrl.org/2003/instance"
  xmlns:dei="http://xbrl.sec.gov/dei/2021q4"
  xmlns:link="http://www.xbrl.org/2003/linkbase"
  xmlns:us-gaap="http://fasb.org/us-gaap/2021-01-31"
  xmlns:xbrldi="http://xbrl.org/2006/xbrldi"
  xmlns:xlink="http://www.w3.org/1999/xlink">
    <link:schemaRef xlink:href="api-20211231.xsd" xlink:type="simple"/>
    <context id="P01_01_2021To12_31_2021">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001802883</identifier>
        </entity>
        <period>
            <startDate>2021-01-01</startDate>
            <endDate>2021-12-31</endDate>
        </period>
    </context>
    <context id="P01_01_2021To12_31_2021_BusinessContactMemberdeiEntityAddressesAddressTypeAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001802883</identifier>
            <segment>
                <xbrldi:explicitMember dimension="dei:EntityAddressesAddressTypeAxis">dei:BusinessContactMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2021-01-01</startDate>
            <endDate>2021-12-31</endDate>
        </period>
    </context>
    <context id="P01_01_2021To12_31_2021_CommonClassAMemberusgaapStatementClassOfStockAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001802883</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementClassOfStockAxis">us-gaap:CommonClassAMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2021-01-01</startDate>
            <endDate>2021-12-31</endDate>
        </period>
    </context>
    <context id="P01_01_2021To12_31_2021_AdrMemberusgaapStatementClassOfStockAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001802883</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementClassOfStockAxis">dei:AdrMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <startDate>2021-01-01</startDate>
            <endDate>2021-12-31</endDate>
        </period>
    </context>
    <context id="PAsOn12_31_2021_CommonClassBMemberusgaapStatementClassOfStockAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001802883</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementClassOfStockAxis">us-gaap:CommonClassBMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2021-12-31</instant>
        </period>
    </context>
    <context id="PAsOn12_31_2021_CommonClassAMemberusgaapStatementClassOfStockAxis">
        <entity>
            <identifier scheme="http://www.sec.gov/CIK">0001802883</identifier>
            <segment>
                <xbrldi:explicitMember dimension="us-gaap:StatementClassOfStockAxis">us-gaap:CommonClassAMember</xbrldi:explicitMember>
            </segment>
        </entity>
        <period>
            <instant>2021-12-31</instant>
        </period>
    </context>
    <unit id="Unit_shares">
        <measure>shares</measure>
    </unit>
    <dei:EntityAddressAddressLine3
      contextRef="P01_01_2021To12_31_2021_BusinessContactMemberdeiEntityAddressesAddressTypeAxis"
      id="hidden48535880">333 Songhu RoadYangpu District</dei:EntityAddressAddressLine3>
    <dei:EntityAddressAddressLine3 contextRef="P01_01_2021To12_31_2021" id="hidden48535881">333 Songhu RoadYangpu District</dei:EntityAddressAddressLine3>
    <dei:EntityCentralIndexKey contextRef="P01_01_2021To12_31_2021">0001802883</dei:EntityCentralIndexKey>
    <dei:DocumentFiscalPeriodFocus contextRef="P01_01_2021To12_31_2021">FY</dei:DocumentFiscalPeriodFocus>
    <dei:AmendmentFlag contextRef="P01_01_2021To12_31_2021">true</dei:AmendmentFlag>
    <dei:DocumentType contextRef="P01_01_2021To12_31_2021">20-F/A</dei:DocumentType>
    <dei:DocumentRegistrationStatement contextRef="P01_01_2021To12_31_2021">false</dei:DocumentRegistrationStatement>
    <dei:DocumentAnnualReport contextRef="P01_01_2021To12_31_2021">true</dei:DocumentAnnualReport>
    <dei:DocumentPeriodEndDate contextRef="P01_01_2021To12_31_2021">2021-12-31</dei:DocumentPeriodEndDate>
    <dei:CurrentFiscalYearEndDate contextRef="P01_01_2021To12_31_2021">--12-31</dei:CurrentFiscalYearEndDate>
    <dei:DocumentFiscalYearFocus contextRef="P01_01_2021To12_31_2021">2021</dei:DocumentFiscalYearFocus>
    <dei:DocumentTransitionReport contextRef="P01_01_2021To12_31_2021">false</dei:DocumentTransitionReport>
    <dei:DocumentShellCompanyReport contextRef="P01_01_2021To12_31_2021">false</dei:DocumentShellCompanyReport>
    <dei:EntityFileNumber contextRef="P01_01_2021To12_31_2021">001-39340</dei:EntityFileNumber>
    <dei:EntityRegistrantName contextRef="P01_01_2021To12_31_2021">Agora, Inc.</dei:EntityRegistrantName>
    <dei:EntityIncorporationStateCountryCode contextRef="P01_01_2021To12_31_2021">E9</dei:EntityIncorporationStateCountryCode>
    <dei:EntityAddressAddressLine1 contextRef="P01_01_2021To12_31_2021">Floor 8, Building 12</dei:EntityAddressAddressLine1>
    <dei:EntityAddressAddressLine2 contextRef="P01_01_2021To12_31_2021">Phase III of ChuangZhiTianDi</dei:EntityAddressAddressLine2>
    <dei:EntityAddressPostalZipCode contextRef="P01_01_2021To12_31_2021">333</dei:EntityAddressPostalZipCode>
    <dei:EntityAddressCityOrTown contextRef="P01_01_2021To12_31_2021">Shanghai</dei:EntityAddressCityOrTown>
    <dei:EntityAddressCountry contextRef="P01_01_2021To12_31_2021">CN</dei:EntityAddressCountry>
    <dei:ContactPersonnelName contextRef="P01_01_2021To12_31_2021_BusinessContactMemberdeiEntityAddressesAddressTypeAxis">Jingbo Wang</dei:ContactPersonnelName>
    <dei:CityAreaCode contextRef="P01_01_2021To12_31_2021_BusinessContactMemberdeiEntityAddressesAddressTypeAxis">86-400</dei:CityAreaCode>
    <dei:LocalPhoneNumber contextRef="P01_01_2021To12_31_2021_BusinessContactMemberdeiEntityAddressesAddressTypeAxis">632-6626</dei:LocalPhoneNumber>
    <dei:EntityAddressAddressLine1 contextRef="P01_01_2021To12_31_2021_BusinessContactMemberdeiEntityAddressesAddressTypeAxis">Floor 8, Building 12</dei:EntityAddressAddressLine1>
    <dei:EntityAddressAddressLine2 contextRef="P01_01_2021To12_31_2021_BusinessContactMemberdeiEntityAddressesAddressTypeAxis">Phase III of ChuangZhiTianDi</dei:EntityAddressAddressLine2>
    <dei:EntityAddressPostalZipCode contextRef="P01_01_2021To12_31_2021_BusinessContactMemberdeiEntityAddressesAddressTypeAxis">333</dei:EntityAddressPostalZipCode>
    <dei:EntityAddressCityOrTown contextRef="P01_01_2021To12_31_2021_BusinessContactMemberdeiEntityAddressesAddressTypeAxis">Shanghai</dei:EntityAddressCityOrTown>
    <dei:EntityAddressCountry contextRef="P01_01_2021To12_31_2021_BusinessContactMemberdeiEntityAddressesAddressTypeAxis">CN</dei:EntityAddressCountry>
    <dei:Security12bTitle contextRef="P01_01_2021To12_31_2021_AdrMemberusgaapStatementClassOfStockAxis">American depositary shares (each American depositary shares representing four Class A ordinary share, par value US$0.0001 each)</dei:Security12bTitle>
    <dei:TradingSymbol contextRef="P01_01_2021To12_31_2021_AdrMemberusgaapStatementClassOfStockAxis">API</dei:TradingSymbol>
    <dei:SecurityExchangeName contextRef="P01_01_2021To12_31_2021_AdrMemberusgaapStatementClassOfStockAxis">NASDAQ</dei:SecurityExchangeName>
    <dei:Security12bTitle contextRef="P01_01_2021To12_31_2021_CommonClassAMemberusgaapStatementClassOfStockAxis">Class A ordinary shares, with a par value of US$0.0001 each*</dei:Security12bTitle>
    <dei:SecurityExchangeName contextRef="P01_01_2021To12_31_2021_CommonClassAMemberusgaapStatementClassOfStockAxis">NASDAQ</dei:SecurityExchangeName>
    <dei:NoTradingSymbolFlag contextRef="P01_01_2021To12_31_2021_CommonClassAMemberusgaapStatementClassOfStockAxis">true</dei:NoTradingSymbolFlag>
    <dei:EntityCommonStockSharesOutstanding
      contextRef="PAsOn12_31_2021_CommonClassAMemberusgaapStatementClassOfStockAxis"
      decimals="INF"
      unitRef="Unit_shares">387302624</dei:EntityCommonStockSharesOutstanding>
    <dei:EntityCommonStockSharesOutstanding
      contextRef="PAsOn12_31_2021_CommonClassBMemberusgaapStatementClassOfStockAxis"
      decimals="INF"
      unitRef="Unit_shares">76179938</dei:EntityCommonStockSharesOutstanding>
    <dei:EntityWellKnownSeasonedIssuer contextRef="P01_01_2021To12_31_2021">No</dei:EntityWellKnownSeasonedIssuer>
    <dei:EntityVoluntaryFilers contextRef="P01_01_2021To12_31_2021">No</dei:EntityVoluntaryFilers>
    <dei:EntityCurrentReportingStatus contextRef="P01_01_2021To12_31_2021">Yes</dei:EntityCurrentReportingStatus>
    <dei:EntityInteractiveDataCurrent contextRef="P01_01_2021To12_31_2021">Yes</dei:EntityInteractiveDataCurrent>
    <dei:EntityFilerCategory contextRef="P01_01_2021To12_31_2021">Large Accelerated Filer</dei:EntityFilerCategory>
    <dei:EntityEmergingGrowthCompany contextRef="P01_01_2021To12_31_2021">false</dei:EntityEmergingGrowthCompany>
    <dei:IcfrAuditorAttestationFlag contextRef="P01_01_2021To12_31_2021">true</dei:IcfrAuditorAttestationFlag>
    <dei:DocumentAccountingStandard contextRef="P01_01_2021To12_31_2021">U.S. GAAP</dei:DocumentAccountingStandard>
    <dei:EntityShellCompany contextRef="P01_01_2021To12_31_2021">false</dei:EntityShellCompany>
    <dei:AuditorName contextRef="P01_01_2021To12_31_2021">PricewaterhouseCoopers Zhong Tian LLP</dei:AuditorName>
    <dei:AuditorLocation contextRef="P01_01_2021To12_31_2021">PricewaterhouseCoopers Zhong Tian LLP</dei:AuditorLocation>
    <dei:AuditorFirmId contextRef="P01_01_2021To12_31_2021">1424</dei:AuditorFirmId>
    <dei:AmendmentDescription contextRef="P01_01_2021To12_31_2021">Explanatory Note  Agora, Inc. (the &#x201c;Company&#x201d;) is filing this Amendment No.&#160;1 to Form 20-F (this &#x201c;Amendment No.&#160;1&#x201d;) to amend its annual report on Form 20-F for the fiscal year ended December&#160;31, 2021, which was filed with the Securities and Exchange Commission on April&#160;28, 2022 (the &#x201c;Original Filing&#x201d;).  This Amendment No.&#160;1 is being filed solely for the purpose of updating the information in Item 16G of Part II of the Original Filing regarding the Company&#x2019;s reliance on home country practices. Accordingly, Item 16G of Part II of the Original Filing is hereby restated and replaced in its entirety in accordance with Rule 12b-15 promulgated under the Securities Exchange Act of 1934, as amended (the &#x201c;Exchange Act&#x201d;). In addition, pursuant to Rule&#160;12b-15&#160;under the&#160;Exchange Act, the Company is including Item 19 of Part III with this Amendment No. 1 solely to file the certifications required under the&#160;Sarbanes-Oxley Act&#160;of 2002.  Except as described above or as otherwise expressly indicated herein, no other change has been made to the Original Filing. This Amendment No.&#160;1 continues to speak as of the date of the Original Filing and other than as set forth above, it does not, and does not purport to, amend, update or restate any other information or disclosure included in the Original Filing, or reflect any events that have occurred since the date thereof.   </dei:AmendmentDescription>
</xbrl>
